@syncfusion/ej2-image-editor 27.1.57 → 27.2.2
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 +8 -2
- package/dist/es6/ej2-image-editor.es2015.js.map +1 -1
- package/dist/es6/ej2-image-editor.es5.js +8 -2
- 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/transform.js +8 -2
|
@@ -20313,6 +20313,7 @@ class Transform {
|
|
|
20313
20313
|
}
|
|
20314
20314
|
resize(width, height, isAspectRatio) {
|
|
20315
20315
|
const parent = this.parent;
|
|
20316
|
+
let aspectHeight;
|
|
20316
20317
|
parent.isResize = true;
|
|
20317
20318
|
if (isNullOrUndefined(parent.prevCropObj) && isNullOrUndefined(parent.prevObj)) {
|
|
20318
20319
|
parent.notify('transform', { prop: 'updateResize', value: { bool: false } });
|
|
@@ -20326,7 +20327,12 @@ class Transform {
|
|
|
20326
20327
|
}
|
|
20327
20328
|
}
|
|
20328
20329
|
const aspectRatioHeight = parent.element.querySelector('#' + parent.element.id + '_resizeHeight');
|
|
20329
|
-
|
|
20330
|
+
if (aspectRatioHeight) {
|
|
20331
|
+
aspectHeight = aspectRatioHeight.value === '' ? aspectRatioHeight.placeholder : aspectRatioHeight.value;
|
|
20332
|
+
}
|
|
20333
|
+
else {
|
|
20334
|
+
aspectHeight = height + 'px';
|
|
20335
|
+
}
|
|
20330
20336
|
const resizeEventArgs = { cancel: false, previousWidth: Math.ceil(parent.img.destWidth),
|
|
20331
20337
|
previousHeight: Math.ceil(parent.img.destHeight), width: Math.ceil(width), height: height && height !== 0 ? Math.ceil(height) :
|
|
20332
20338
|
(isAspectRatio ? Math.ceil(parseFloat(aspectHeight)) : Math.ceil(parent.img.destHeight)),
|
|
@@ -20356,8 +20362,8 @@ class Transform {
|
|
|
20356
20362
|
const originalWidth = parent.img.destWidth;
|
|
20357
20363
|
const originalHeight = parent.img.destHeight;
|
|
20358
20364
|
let aspectRatioWidthValue;
|
|
20359
|
-
aspectRatioWidthValue = parseFloat(aspectRatioWidth.value === '' ? aspectRatioWidth.placeholder : aspectRatioWidth.value);
|
|
20360
20365
|
if (aspectRatioHeight) {
|
|
20366
|
+
aspectRatioWidthValue = parseFloat(aspectRatioWidth.value === '' ? aspectRatioWidth.placeholder : aspectRatioWidth.value);
|
|
20361
20367
|
let value = aspectRatioWidthValue / (originalWidth / originalHeight);
|
|
20362
20368
|
// eslint-disable-next-line max-len
|
|
20363
20369
|
const height = value % 1 >= 0.5 || value % 1 <= -0.5 ? Math.round(value) : (value < 0) ? Math.ceil(value) : Math.floor(value);
|