@syncfusion/ej2-image-editor 21.1.41 → 21.2.3

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.
@@ -447,6 +447,12 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
447
447
  if (isNullOrUndefined(this.zoomSettings.zoomTrigger)) {
448
448
  this.zoomSettings.zoomTrigger = (ZoomTrigger.MouseWheel | ZoomTrigger.Pinch | ZoomTrigger.Toolbar | ZoomTrigger.Commands);
449
449
  }
450
+ if (isNullOrUndefined(this.zoomSettings.zoomFactor)) {
451
+ this.zoomSettings.zoomFactor = 1;
452
+ }
453
+ if (isNullOrUndefined(this.zoomSettings.maxZoomFactor)) {
454
+ this.zoomSettings.maxZoomFactor = 10;
455
+ }
450
456
  }
451
457
  getDefaultFilter() {
452
458
  return 'brightness(' + 1 + ') ' + 'contrast(' + 100 + '%) ' + 'hue-rotate(' + 0 + 'deg) ' +
@@ -13223,28 +13229,8 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
13223
13229
  * @returns {ImageData}.
13224
13230
  */
13225
13231
  getImageData() {
13226
- if (!isNullOrUndefined(this.activeObj.shape)) {
13227
- this.performCancel();
13228
- }
13229
- let currentObj;
13230
- if (this.defaultZoomFactor > 0) {
13231
- currentObj = this.getCurrentObj();
13232
- currentObj.objColl = extend([], this.objColl, [], true);
13233
- currentObj.pointColl = extend([], this.pointColl, [], true);
13234
- currentObj.afterCropActions = extend([], this.afterCropActions, [], true);
13235
- }
13236
- this.resetZoom();
13237
- const data = this.lowerContext.getImageData(this.destLeft, this.destTop, this.destWidth, this.destHeight);
13238
- if (!isNullOrUndefined(currentObj)) {
13239
- this.setCurrentObj(currentObj);
13240
- this.objColl = extend([], currentObj.objColl, [], true);
13241
- this.pointColl = extend([], currentObj.pointColl, [], true);
13242
- this.freehandCounter = this.pointColl.length;
13243
- this.lowerContext.filter = 'none';
13244
- this.zoomObjColl();
13245
- this.zoomFreehandDrawColl();
13246
- this.lowerContext.filter = currentObj.filter;
13247
- }
13232
+ const canvas = this.exportChangesToCanvas();
13233
+ const data = canvas.getContext('2d').getImageData(0, 0, canvas.width, canvas.height);
13248
13234
  return data;
13249
13235
  }
13250
13236
  /**
@@ -14614,7 +14600,7 @@ var ShapeType;
14614
14600
  /**
14615
14601
  * An enumeration representing the different ways to trigger zooming in the image editor.
14616
14602
  *
14617
- * @enum {number}
14603
+ * @aspNumberEnum
14618
14604
  */
14619
14605
  var ZoomTrigger;
14620
14606
  (function (ZoomTrigger) {