@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.
@@ -13354,10 +13354,6 @@ var Selection = /** @__PURE__ @class */ (function () {
13354
13354
  };
13355
13355
  Selection.prototype.handleScroll = function (e) {
13356
13356
  this.mouseWheel++;
13357
- if (this.mouseWheel === 2) {
13358
- this.mouseWheel = 0;
13359
- return;
13360
- }
13361
13357
  var parent = this.parent;
13362
13358
  var x;
13363
13359
  var y;
@@ -13374,6 +13370,13 @@ var Selection = /** @__PURE__ @class */ (function () {
13374
13370
  y < parent.img.destTop + parent.img.destHeight) {
13375
13371
  isInsideCanvas = true;
13376
13372
  }
13373
+ if (this.mouseWheel === 2) {
13374
+ this.mouseWheel = 0;
13375
+ if (e.ctrlKey === true && isInsideCanvas) {
13376
+ e.preventDefault();
13377
+ }
13378
+ return;
13379
+ }
13377
13380
  e.stopPropagation();
13378
13381
  if (e.ctrlKey === true && isInsideCanvas) {
13379
13382
  e.preventDefault();
@@ -20377,6 +20380,7 @@ var Transform = /** @__PURE__ @class */ (function () {
20377
20380
  };
20378
20381
  Transform.prototype.resize = function (width, height, isAspectRatio) {
20379
20382
  var parent = this.parent;
20383
+ var aspectHeight;
20380
20384
  parent.isResize = true;
20381
20385
  if (isNullOrUndefined(parent.prevCropObj) && isNullOrUndefined(parent.prevObj)) {
20382
20386
  parent.notify('transform', { prop: 'updateResize', value: { bool: false } });
@@ -20390,7 +20394,12 @@ var Transform = /** @__PURE__ @class */ (function () {
20390
20394
  }
20391
20395
  }
20392
20396
  var aspectRatioHeight = parent.element.querySelector('#' + parent.element.id + '_resizeHeight');
20393
- var aspectHeight = aspectRatioHeight.value === '' ? aspectRatioHeight.placeholder : aspectRatioHeight.value;
20397
+ if (aspectRatioHeight) {
20398
+ aspectHeight = aspectRatioHeight.value === '' ? aspectRatioHeight.placeholder : aspectRatioHeight.value;
20399
+ }
20400
+ else {
20401
+ aspectHeight = height + 'px';
20402
+ }
20394
20403
  var resizeEventArgs = { cancel: false, previousWidth: Math.ceil(parent.img.destWidth),
20395
20404
  previousHeight: Math.ceil(parent.img.destHeight), width: Math.ceil(width), height: height && height !== 0 ? Math.ceil(height) :
20396
20405
  (isAspectRatio ? Math.ceil(parseFloat(aspectHeight)) : Math.ceil(parent.img.destHeight)),
@@ -20420,8 +20429,8 @@ var Transform = /** @__PURE__ @class */ (function () {
20420
20429
  var originalWidth = parent.img.destWidth;
20421
20430
  var originalHeight = parent.img.destHeight;
20422
20431
  var aspectRatioWidthValue = void 0;
20423
- aspectRatioWidthValue = parseFloat(aspectRatioWidth.value === '' ? aspectRatioWidth.placeholder : aspectRatioWidth.value);
20424
20432
  if (aspectRatioHeight) {
20433
+ aspectRatioWidthValue = parseFloat(aspectRatioWidth.value === '' ? aspectRatioWidth.placeholder : aspectRatioWidth.value);
20425
20434
  var value = aspectRatioWidthValue / (originalWidth / originalHeight);
20426
20435
  // eslint-disable-next-line max-len
20427
20436
  var height = value % 1 >= 0.5 || value % 1 <= -0.5 ? Math.round(value) : (value < 0) ? Math.ceil(value) : Math.floor(value);