@syncfusion/ej2-image-editor 29.1.37 → 29.1.38

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.
@@ -10486,18 +10486,22 @@ var Selection = /** @__PURE__ @class */ (function () {
10486
10486
  var endY = isStart ? actPoint.endY : actPoint.startY;
10487
10487
  var wrapperWidth = parent.upperCanvas.width;
10488
10488
  var wrapperHeight = parent.upperCanvas.height;
10489
+ var minX = destLeft < 0 ? 0 : destLeft;
10490
+ var minY = destTop < 0 ? 0 : destTop;
10491
+ var maxX = destLeft + destWidth > wrapperWidth ? wrapperWidth : destLeft + destWidth;
10492
+ var maxY = destTop + destHeight > wrapperHeight ? wrapperHeight : destTop + destHeight;
10489
10493
  if (Browser.isDevice) {
10490
- if (startX < 0 && destLeft < 0) {
10491
- startX = 0;
10494
+ if (startX < minX) {
10495
+ startX = minX;
10492
10496
  }
10493
- if (startY < 0 && destTop < 0) {
10494
- startY = 0;
10497
+ if (startY < minY) {
10498
+ startY = minY;
10495
10499
  }
10496
- if (endX > wrapperWidth && destLeft + destWidth > wrapperWidth) {
10497
- endX = wrapperWidth;
10500
+ if (endX > maxX) {
10501
+ endX = maxX;
10498
10502
  }
10499
- if (endY > wrapperHeight && destTop + destHeight > wrapperHeight) {
10500
- endY = wrapperHeight;
10503
+ if (endY > maxY) {
10504
+ endY = maxY;
10501
10505
  }
10502
10506
  }
10503
10507
  else {