@syncfusion/ej2-image-editor 27.1.53 → 27.1.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ej2-image-editor.umd.min.js +2 -2
- package/dist/ej2-image-editor.umd.min.js.map +1 -1
- package/dist/es6/ej2-image-editor.es2015.js +15 -6
- package/dist/es6/ej2-image-editor.es2015.js.map +1 -1
- package/dist/es6/ej2-image-editor.es5.js +15 -6
- package/dist/es6/ej2-image-editor.es5.js.map +1 -1
- package/dist/global/ej2-image-editor.min.js +2 -2
- package/dist/global/ej2-image-editor.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +12 -12
- package/src/image-editor/action/selection.js +7 -4
- package/src/image-editor/action/transform.js +8 -2
|
@@ -13292,10 +13292,6 @@ class Selection {
|
|
|
13292
13292
|
}
|
|
13293
13293
|
handleScroll(e) {
|
|
13294
13294
|
this.mouseWheel++;
|
|
13295
|
-
if (this.mouseWheel === 2) {
|
|
13296
|
-
this.mouseWheel = 0;
|
|
13297
|
-
return;
|
|
13298
|
-
}
|
|
13299
13295
|
const parent = this.parent;
|
|
13300
13296
|
let x;
|
|
13301
13297
|
let y;
|
|
@@ -13312,6 +13308,13 @@ class Selection {
|
|
|
13312
13308
|
y < parent.img.destTop + parent.img.destHeight) {
|
|
13313
13309
|
isInsideCanvas = true;
|
|
13314
13310
|
}
|
|
13311
|
+
if (this.mouseWheel === 2) {
|
|
13312
|
+
this.mouseWheel = 0;
|
|
13313
|
+
if (e.ctrlKey === true && isInsideCanvas) {
|
|
13314
|
+
e.preventDefault();
|
|
13315
|
+
}
|
|
13316
|
+
return;
|
|
13317
|
+
}
|
|
13315
13318
|
e.stopPropagation();
|
|
13316
13319
|
if (e.ctrlKey === true && isInsideCanvas) {
|
|
13317
13320
|
e.preventDefault();
|
|
@@ -20310,6 +20313,7 @@ class Transform {
|
|
|
20310
20313
|
}
|
|
20311
20314
|
resize(width, height, isAspectRatio) {
|
|
20312
20315
|
const parent = this.parent;
|
|
20316
|
+
let aspectHeight;
|
|
20313
20317
|
parent.isResize = true;
|
|
20314
20318
|
if (isNullOrUndefined(parent.prevCropObj) && isNullOrUndefined(parent.prevObj)) {
|
|
20315
20319
|
parent.notify('transform', { prop: 'updateResize', value: { bool: false } });
|
|
@@ -20323,7 +20327,12 @@ class Transform {
|
|
|
20323
20327
|
}
|
|
20324
20328
|
}
|
|
20325
20329
|
const aspectRatioHeight = parent.element.querySelector('#' + parent.element.id + '_resizeHeight');
|
|
20326
|
-
|
|
20330
|
+
if (aspectRatioHeight) {
|
|
20331
|
+
aspectHeight = aspectRatioHeight.value === '' ? aspectRatioHeight.placeholder : aspectRatioHeight.value;
|
|
20332
|
+
}
|
|
20333
|
+
else {
|
|
20334
|
+
aspectHeight = height + 'px';
|
|
20335
|
+
}
|
|
20327
20336
|
const resizeEventArgs = { cancel: false, previousWidth: Math.ceil(parent.img.destWidth),
|
|
20328
20337
|
previousHeight: Math.ceil(parent.img.destHeight), width: Math.ceil(width), height: height && height !== 0 ? Math.ceil(height) :
|
|
20329
20338
|
(isAspectRatio ? Math.ceil(parseFloat(aspectHeight)) : Math.ceil(parent.img.destHeight)),
|
|
@@ -20353,8 +20362,8 @@ class Transform {
|
|
|
20353
20362
|
const originalWidth = parent.img.destWidth;
|
|
20354
20363
|
const originalHeight = parent.img.destHeight;
|
|
20355
20364
|
let aspectRatioWidthValue;
|
|
20356
|
-
aspectRatioWidthValue = parseFloat(aspectRatioWidth.value === '' ? aspectRatioWidth.placeholder : aspectRatioWidth.value);
|
|
20357
20365
|
if (aspectRatioHeight) {
|
|
20366
|
+
aspectRatioWidthValue = parseFloat(aspectRatioWidth.value === '' ? aspectRatioWidth.placeholder : aspectRatioWidth.value);
|
|
20358
20367
|
let value = aspectRatioWidthValue / (originalWidth / originalHeight);
|
|
20359
20368
|
// eslint-disable-next-line max-len
|
|
20360
20369
|
const height = value % 1 >= 0.5 || value % 1 <= -0.5 ? Math.round(value) : (value < 0) ? Math.ceil(value) : Math.floor(value);
|