@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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 21.1.41
3
+ * version : 21.2.5
4
4
  * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-image-editor@*",
3
- "_id": "@syncfusion/ej2-image-editor@21.1.39",
3
+ "_id": "@syncfusion/ej2-image-editor@21.2.3",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-yghuHGhw2u6arzUN34xnHVZB4nYTmvI0c1Xmuw6GZ8bqshm/xZw4yIJTy/iclyErSVJD2thRzewX0YpNN5uY8Q==",
5
+ "_integrity": "sha512-Z7InCNgVrgwr+Zil7yis3xs3unU8IQYazv92PqwOIMqsXG2UN6vpbJ8CaMASA5TXMAd64lUym1vbfht5zaMKFw==",
6
6
  "_location": "/@syncfusion/ej2-image-editor",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -23,8 +23,8 @@
23
23
  "/@syncfusion/ej2-react-image-editor",
24
24
  "/@syncfusion/ej2-vue-image-editor"
25
25
  ],
26
- "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-image-editor/-/ej2-image-editor-21.1.39.tgz",
27
- "_shasum": "58530b3c61b36d1e81395a3a1bb53f5f5217ef45",
26
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-image-editor/-/ej2-image-editor-21.2.3.tgz",
27
+ "_shasum": "c3da0151afadfe9e604da48605032e49e16ac9ae",
28
28
  "_spec": "@syncfusion/ej2-image-editor@*",
29
29
  "_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
30
30
  "author": {
@@ -32,12 +32,12 @@
32
32
  },
33
33
  "bundleDependencies": false,
34
34
  "dependencies": {
35
- "@syncfusion/ej2-base": "~21.1.40",
36
- "@syncfusion/ej2-buttons": "~21.1.37",
37
- "@syncfusion/ej2-inputs": "~21.1.39",
38
- "@syncfusion/ej2-navigations": "~21.1.39",
39
- "@syncfusion/ej2-popups": "~21.1.41",
40
- "@syncfusion/ej2-splitbuttons": "~21.1.41"
35
+ "@syncfusion/ej2-base": "~21.2.3",
36
+ "@syncfusion/ej2-buttons": "~21.2.5",
37
+ "@syncfusion/ej2-inputs": "~21.2.4",
38
+ "@syncfusion/ej2-navigations": "~21.2.5",
39
+ "@syncfusion/ej2-popups": "~21.2.4",
40
+ "@syncfusion/ej2-splitbuttons": "~21.2.5"
41
41
  },
42
42
  "deprecated": false,
43
43
  "description": "Essential JS 2 ImageEditor",
@@ -67,7 +67,7 @@
67
67
  "url": "https://github.com/syncfusion/ej2-javascript-ui-controls/tree/master/controls/imageeditor"
68
68
  },
69
69
  "typings": "index.d.ts",
70
- "version": "21.1.41",
70
+ "version": "21.2.5",
71
71
  "sideEffects": false,
72
72
  "homepage": "https://www.syncfusion.com/javascript-ui-controls"
73
73
  }
@@ -110,6 +110,7 @@ export interface ZoomSettingsModel {
110
110
  *
111
111
  * By default, this property is set to `null`, which enables all types of zooming.
112
112
  *
113
+ * @aspNumberEnum
113
114
  * @default null
114
115
  */
115
116
  zoomTrigger?: ZoomTrigger;
@@ -124,6 +124,7 @@ export declare class ZoomSettings extends ChildProperty<ZoomSettings> {
124
124
  *
125
125
  * By default, this property is set to `null`, which enables all types of zooming.
126
126
  *
127
+ * @aspNumberEnum
127
128
  * @default null
128
129
  */
129
130
  zoomTrigger: ZoomTrigger;
@@ -1446,7 +1447,7 @@ export declare enum ShapeType {
1446
1447
  /**
1447
1448
  * An enumeration representing the different ways to trigger zooming in the image editor.
1448
1449
  *
1449
- * @enum {number}
1450
+ * @aspNumberEnum
1450
1451
  */
1451
1452
  export declare enum ZoomTrigger {
1452
1453
  /** Zooming triggered by mouse wheel. */
@@ -476,6 +476,12 @@ var ImageEditor = /** @class */ (function (_super) {
476
476
  if (isNullOrUndefined(this.zoomSettings.zoomTrigger)) {
477
477
  this.zoomSettings.zoomTrigger = (ZoomTrigger.MouseWheel | ZoomTrigger.Pinch | ZoomTrigger.Toolbar | ZoomTrigger.Commands);
478
478
  }
479
+ if (isNullOrUndefined(this.zoomSettings.zoomFactor)) {
480
+ this.zoomSettings.zoomFactor = 1;
481
+ }
482
+ if (isNullOrUndefined(this.zoomSettings.maxZoomFactor)) {
483
+ this.zoomSettings.maxZoomFactor = 10;
484
+ }
479
485
  };
480
486
  ImageEditor.prototype.getDefaultFilter = function () {
481
487
  return 'brightness(' + 1 + ') ' + 'contrast(' + 100 + '%) ' + 'hue-rotate(' + 0 + 'deg) ' +
@@ -6750,7 +6756,9 @@ var ImageEditor = /** @class */ (function (_super) {
6750
6756
  var x = points.x;
6751
6757
  var y = points.y;
6752
6758
  isShape = this.findTargetObj(x, y, isCropSelection);
6753
- this.upperContext.clearRect(0, 0, this.upperCanvas.width, this.upperCanvas.height);
6759
+ if (!isCropSelection) {
6760
+ this.upperContext.clearRect(0, 0, this.upperCanvas.width, this.upperCanvas.height);
6761
+ }
6754
6762
  if (isTextArea) {
6755
6763
  this.textArea.value = this.objColl[this.objColl.length - 1].keyHistory;
6756
6764
  this.textArea.style.display = 'block';
@@ -6790,7 +6798,9 @@ var ImageEditor = /** @class */ (function (_super) {
6790
6798
  var x = points.x;
6791
6799
  var y = points.y;
6792
6800
  isShape = this.findTargetObj(x, y, isCropSelection);
6793
- this.upperContext.clearRect(0, 0, this.upperCanvas.width, this.upperCanvas.height);
6801
+ if (!isCropSelection) {
6802
+ this.upperContext.clearRect(0, 0, this.upperCanvas.width, this.upperCanvas.height);
6803
+ }
6794
6804
  if (isTextArea) {
6795
6805
  this.textArea.value = this.objColl[this.objColl.length - 1].keyHistory;
6796
6806
  this.textArea.style.display = 'block';
@@ -13273,28 +13283,8 @@ var ImageEditor = /** @class */ (function (_super) {
13273
13283
  * @returns {ImageData}.
13274
13284
  */
13275
13285
  ImageEditor.prototype.getImageData = function () {
13276
- if (!isNullOrUndefined(this.activeObj.shape)) {
13277
- this.performCancel();
13278
- }
13279
- var currentObj;
13280
- if (this.defaultZoomFactor > 0) {
13281
- currentObj = this.getCurrentObj();
13282
- currentObj.objColl = extend([], this.objColl, [], true);
13283
- currentObj.pointColl = extend([], this.pointColl, [], true);
13284
- currentObj.afterCropActions = extend([], this.afterCropActions, [], true);
13285
- }
13286
- this.resetZoom();
13287
- var data = this.lowerContext.getImageData(this.destLeft, this.destTop, this.destWidth, this.destHeight);
13288
- if (!isNullOrUndefined(currentObj)) {
13289
- this.setCurrentObj(currentObj);
13290
- this.objColl = extend([], currentObj.objColl, [], true);
13291
- this.pointColl = extend([], currentObj.pointColl, [], true);
13292
- this.freehandCounter = this.pointColl.length;
13293
- this.lowerContext.filter = 'none';
13294
- this.zoomObjColl();
13295
- this.zoomFreehandDrawColl();
13296
- this.lowerContext.filter = currentObj.filter;
13297
- }
13286
+ var canvas = this.exportChangesToCanvas();
13287
+ var data = canvas.getContext('2d').getImageData(0, 0, canvas.width, canvas.height);
13298
13288
  return data;
13299
13289
  };
13300
13290
  /**
@@ -14668,7 +14658,7 @@ export var ShapeType;
14668
14658
  /**
14669
14659
  * An enumeration representing the different ways to trigger zooming in the image editor.
14670
14660
  *
14671
- * @enum {number}
14661
+ * @aspNumberEnum
14672
14662
  */
14673
14663
  export var ZoomTrigger;
14674
14664
  (function (ZoomTrigger) {