@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
|
@@ -20380,6 +20380,7 @@ var Transform = /** @__PURE__ @class */ (function () {
|
|
|
20380
20380
|
};
|
|
20381
20381
|
Transform.prototype.resize = function (width, height, isAspectRatio) {
|
|
20382
20382
|
var parent = this.parent;
|
|
20383
|
+
var aspectHeight;
|
|
20383
20384
|
parent.isResize = true;
|
|
20384
20385
|
if (isNullOrUndefined(parent.prevCropObj) && isNullOrUndefined(parent.prevObj)) {
|
|
20385
20386
|
parent.notify('transform', { prop: 'updateResize', value: { bool: false } });
|
|
@@ -20393,7 +20394,12 @@ var Transform = /** @__PURE__ @class */ (function () {
|
|
|
20393
20394
|
}
|
|
20394
20395
|
}
|
|
20395
20396
|
var aspectRatioHeight = parent.element.querySelector('#' + parent.element.id + '_resizeHeight');
|
|
20396
|
-
|
|
20397
|
+
if (aspectRatioHeight) {
|
|
20398
|
+
aspectHeight = aspectRatioHeight.value === '' ? aspectRatioHeight.placeholder : aspectRatioHeight.value;
|
|
20399
|
+
}
|
|
20400
|
+
else {
|
|
20401
|
+
aspectHeight = height + 'px';
|
|
20402
|
+
}
|
|
20397
20403
|
var resizeEventArgs = { cancel: false, previousWidth: Math.ceil(parent.img.destWidth),
|
|
20398
20404
|
previousHeight: Math.ceil(parent.img.destHeight), width: Math.ceil(width), height: height && height !== 0 ? Math.ceil(height) :
|
|
20399
20405
|
(isAspectRatio ? Math.ceil(parseFloat(aspectHeight)) : Math.ceil(parent.img.destHeight)),
|
|
@@ -20423,8 +20429,8 @@ var Transform = /** @__PURE__ @class */ (function () {
|
|
|
20423
20429
|
var originalWidth = parent.img.destWidth;
|
|
20424
20430
|
var originalHeight = parent.img.destHeight;
|
|
20425
20431
|
var aspectRatioWidthValue = void 0;
|
|
20426
|
-
aspectRatioWidthValue = parseFloat(aspectRatioWidth.value === '' ? aspectRatioWidth.placeholder : aspectRatioWidth.value);
|
|
20427
20432
|
if (aspectRatioHeight) {
|
|
20433
|
+
aspectRatioWidthValue = parseFloat(aspectRatioWidth.value === '' ? aspectRatioWidth.placeholder : aspectRatioWidth.value);
|
|
20428
20434
|
var value = aspectRatioWidthValue / (originalWidth / originalHeight);
|
|
20429
20435
|
// eslint-disable-next-line max-len
|
|
20430
20436
|
var height = value % 1 >= 0.5 || value % 1 <= -0.5 ? Math.round(value) : (value < 0) ? Math.ceil(value) : Math.floor(value);
|