@syncfusion/ej2-image-editor 21.1.41 → 21.2.5

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.
@@ -473,6 +473,12 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
473
473
  if (isNullOrUndefined(this.zoomSettings.zoomTrigger)) {
474
474
  this.zoomSettings.zoomTrigger = (ZoomTrigger.MouseWheel | ZoomTrigger.Pinch | ZoomTrigger.Toolbar | ZoomTrigger.Commands);
475
475
  }
476
+ if (isNullOrUndefined(this.zoomSettings.zoomFactor)) {
477
+ this.zoomSettings.zoomFactor = 1;
478
+ }
479
+ if (isNullOrUndefined(this.zoomSettings.maxZoomFactor)) {
480
+ this.zoomSettings.maxZoomFactor = 10;
481
+ }
476
482
  };
477
483
  ImageEditor.prototype.getDefaultFilter = function () {
478
484
  return 'brightness(' + 1 + ') ' + 'contrast(' + 100 + '%) ' + 'hue-rotate(' + 0 + 'deg) ' +
@@ -6747,7 +6753,9 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
6747
6753
  var x = points.x;
6748
6754
  var y = points.y;
6749
6755
  isShape = this.findTargetObj(x, y, isCropSelection);
6750
- this.upperContext.clearRect(0, 0, this.upperCanvas.width, this.upperCanvas.height);
6756
+ if (!isCropSelection) {
6757
+ this.upperContext.clearRect(0, 0, this.upperCanvas.width, this.upperCanvas.height);
6758
+ }
6751
6759
  if (isTextArea) {
6752
6760
  this.textArea.value = this.objColl[this.objColl.length - 1].keyHistory;
6753
6761
  this.textArea.style.display = 'block';
@@ -6787,7 +6795,9 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
6787
6795
  var x = points.x;
6788
6796
  var y = points.y;
6789
6797
  isShape = this.findTargetObj(x, y, isCropSelection);
6790
- this.upperContext.clearRect(0, 0, this.upperCanvas.width, this.upperCanvas.height);
6798
+ if (!isCropSelection) {
6799
+ this.upperContext.clearRect(0, 0, this.upperCanvas.width, this.upperCanvas.height);
6800
+ }
6791
6801
  if (isTextArea) {
6792
6802
  this.textArea.value = this.objColl[this.objColl.length - 1].keyHistory;
6793
6803
  this.textArea.style.display = 'block';
@@ -13270,28 +13280,8 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
13270
13280
  * @returns {ImageData}.
13271
13281
  */
13272
13282
  ImageEditor.prototype.getImageData = function () {
13273
- if (!isNullOrUndefined(this.activeObj.shape)) {
13274
- this.performCancel();
13275
- }
13276
- var currentObj;
13277
- if (this.defaultZoomFactor > 0) {
13278
- currentObj = this.getCurrentObj();
13279
- currentObj.objColl = extend([], this.objColl, [], true);
13280
- currentObj.pointColl = extend([], this.pointColl, [], true);
13281
- currentObj.afterCropActions = extend([], this.afterCropActions, [], true);
13282
- }
13283
- this.resetZoom();
13284
- var data = this.lowerContext.getImageData(this.destLeft, this.destTop, this.destWidth, this.destHeight);
13285
- if (!isNullOrUndefined(currentObj)) {
13286
- this.setCurrentObj(currentObj);
13287
- this.objColl = extend([], currentObj.objColl, [], true);
13288
- this.pointColl = extend([], currentObj.pointColl, [], true);
13289
- this.freehandCounter = this.pointColl.length;
13290
- this.lowerContext.filter = 'none';
13291
- this.zoomObjColl();
13292
- this.zoomFreehandDrawColl();
13293
- this.lowerContext.filter = currentObj.filter;
13294
- }
13283
+ var canvas = this.exportChangesToCanvas();
13284
+ var data = canvas.getContext('2d').getImageData(0, 0, canvas.width, canvas.height);
13295
13285
  return data;
13296
13286
  };
13297
13287
  /**
@@ -14664,7 +14654,7 @@ var ShapeType;
14664
14654
  /**
14665
14655
  * An enumeration representing the different ways to trigger zooming in the image editor.
14666
14656
  *
14667
- * @enum {number}
14657
+ * @aspNumberEnum
14668
14658
  */
14669
14659
  var ZoomTrigger;
14670
14660
  (function (ZoomTrigger) {