@syncfusion/ej2-image-editor 33.2.3 → 33.2.7

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 : 33.2.3
3
+ * version : 33.2.7
4
4
  * Copyright Syncfusion Inc. 2001 - 2025. 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,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncfusion/ej2-image-editor",
3
- "version": "33.2.3",
3
+ "version": "33.2.7",
4
4
  "description": "Essential JS 2 ImageEditor",
5
5
  "author": "Syncfusion Inc.",
6
6
  "license": "SEE LICENSE IN license",
@@ -9,12 +9,12 @@
9
9
  "es2015": "./dist/es6/ej2-image-editor.es5.js",
10
10
  "dependencies": {
11
11
  "@syncfusion/ej2-base": "~33.2.3",
12
- "@syncfusion/ej2-buttons": "~33.2.3",
13
- "@syncfusion/ej2-dropdowns": "~33.2.3",
14
- "@syncfusion/ej2-inputs": "~33.2.3",
15
- "@syncfusion/ej2-navigations": "~33.2.3",
16
- "@syncfusion/ej2-popups": "~33.2.3",
17
- "@syncfusion/ej2-splitbuttons": "~33.2.3"
12
+ "@syncfusion/ej2-buttons": "~33.2.5",
13
+ "@syncfusion/ej2-dropdowns": "~33.2.7",
14
+ "@syncfusion/ej2-inputs": "~33.2.5",
15
+ "@syncfusion/ej2-navigations": "~33.2.7",
16
+ "@syncfusion/ej2-popups": "~33.2.7",
17
+ "@syncfusion/ej2-splitbuttons": "~33.2.6"
18
18
  },
19
19
  "devDependencies": {},
20
20
  "keywords": [
@@ -94,6 +94,7 @@ export declare class Shape {
94
94
  private pushActItemIntoObj;
95
95
  private clearActObj;
96
96
  private refreshActiveObj;
97
+ private removeDuplicates;
97
98
  private applyActObj;
98
99
  private getNewShapeId;
99
100
  private getNewOrder;
@@ -1045,9 +1045,18 @@ var Shape = /** @class */ (function () {
1045
1045
  if (parent.activeObj.rotatedAngle !== 0) {
1046
1046
  parent.notify('selection', { prop: 'updPtCollForShpRot', onPropertyChange: false, value: { obj: parent.activeObj } });
1047
1047
  }
1048
+ var isDuplicate = false;
1049
+ for (var i = 0; i < parent.objColl.length; i++) {
1050
+ if (parent.objColl[i].currIndex === parent.activeObj.currIndex) {
1051
+ isDuplicate = true;
1052
+ break;
1053
+ }
1054
+ }
1048
1055
  if (allowUndoRedo) {
1049
1056
  this.apply(parent.activeObj.shape, parent.activeObj);
1050
- parent.objColl.push(extend({}, parent.activeObj, {}, true));
1057
+ if (!isDuplicate) {
1058
+ parent.objColl.push(extend({}, parent.activeObj, {}, true));
1059
+ }
1051
1060
  parent.notify('undo-redo', { prop: 'updateUndoRedoColl', onPropertyChange: false,
1052
1061
  value: { operation: 'text', previousObj: prevObj, previousObjColl: prevObj.objColl,
1053
1062
  previousPointColl: prevObj.pointColl, previousSelPointColl: prevObj.selPointColl,
@@ -1056,7 +1065,9 @@ var Shape = /** @class */ (function () {
1056
1065
  }
1057
1066
  else {
1058
1067
  this.apply(parent.activeObj.shape, parent.activeObj);
1059
- parent.objColl.push(extend({}, parent.activeObj, {}, true));
1068
+ if (!isDuplicate) {
1069
+ parent.objColl.push(extend({}, parent.activeObj, {}, true));
1070
+ }
1060
1071
  }
1061
1072
  };
1062
1073
  Shape.prototype.iterateObjColl = function () {
@@ -3057,6 +3068,18 @@ var Shape = /** @class */ (function () {
3057
3068
  parent.activeObj.redactBlur = parent.tempRedactBlur;
3058
3069
  parent.activeObj.redactPixelate = parent.tempRedactPixel;
3059
3070
  };
3071
+ Shape.prototype.removeDuplicates = function (collection) {
3072
+ for (var i = 0; i < collection.length; i++) {
3073
+ var currentObj = collection[i];
3074
+ for (var j = 0; j < i; j++) {
3075
+ if (collection[j].currIndex === currentObj.currIndex) {
3076
+ collection.splice(i, 1);
3077
+ i--;
3078
+ break;
3079
+ }
3080
+ }
3081
+ }
3082
+ };
3060
3083
  Shape.prototype.applyActObj = function (isMouseDown) {
3061
3084
  var parent = this.parent;
3062
3085
  var isActObj = false;
@@ -3094,6 +3117,17 @@ var Shape = /** @class */ (function () {
3094
3117
  var splitWords_1 = parent.activeObj.currIndex.split('_');
3095
3118
  var tempObjColl = parent.objColl.splice(0, parseInt(splitWords_1[1], 10) - 1);
3096
3119
  tempObjColl.push(extend({}, parent.activeObj, {}, true));
3120
+ this.removeDuplicates(parent.objColl);
3121
+ this.removeDuplicates(tempObjColl);
3122
+ for (var i = 0; i < parent.objColl.length; i++) {
3123
+ var currentObj = parent.objColl[i];
3124
+ for (var j = 0; j < tempObjColl.length; j++) {
3125
+ if (tempObjColl[j].currIndex === currentObj.currIndex) {
3126
+ tempObjColl.splice(j, 1);
3127
+ j--;
3128
+ }
3129
+ }
3130
+ }
3097
3131
  for (var i = 0; i < parent.objColl.length; i++) {
3098
3132
  tempObjColl.push(parent.objColl[i]);
3099
3133
  }
@@ -4114,7 +4148,9 @@ var Shape = /** @class */ (function () {
4114
4148
  var order = 1;
4115
4149
  var isBreak;
4116
4150
  var isCrop = false;
4117
- while (tempObjColl.length !== 0 || tempPointColl.length !== 0) {
4151
+ var count = 0;
4152
+ while ((tempObjColl.length !== 0 || tempPointColl.length !== 0) && count < 100) {
4153
+ count++;
4118
4154
  isBreak = isCrop = false;
4119
4155
  for (var i = 0; i < tempObjColl.length; i++) {
4120
4156
  if (tempObjColl[i].order === order ||