@syncfusion/ej2-image-editor 31.1.22 → 31.2.2

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 : 31.1.22
3
+ * version : 31.2.2
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": "31.1.22",
3
+ "version": "31.2.2",
4
4
  "description": "Essential JS 2 ImageEditor",
5
5
  "author": "Syncfusion Inc.",
6
6
  "license": "SEE LICENSE IN license",
@@ -8,13 +8,13 @@
8
8
  "module": "./index.js",
9
9
  "es2015": "./dist/es6/ej2-image-editor.es5.js",
10
10
  "dependencies": {
11
- "@syncfusion/ej2-base": "~31.1.22",
12
- "@syncfusion/ej2-buttons": "~31.1.21",
13
- "@syncfusion/ej2-dropdowns": "~31.1.22",
14
- "@syncfusion/ej2-inputs": "~31.1.22",
15
- "@syncfusion/ej2-navigations": "~31.1.20",
16
- "@syncfusion/ej2-popups": "~31.1.20",
17
- "@syncfusion/ej2-splitbuttons": "~31.1.17"
11
+ "@syncfusion/ej2-base": "~31.2.2",
12
+ "@syncfusion/ej2-buttons": "~31.2.2",
13
+ "@syncfusion/ej2-dropdowns": "~31.2.2",
14
+ "@syncfusion/ej2-inputs": "~31.2.2",
15
+ "@syncfusion/ej2-navigations": "~31.2.2",
16
+ "@syncfusion/ej2-popups": "~31.2.2",
17
+ "@syncfusion/ej2-splitbuttons": "~31.2.2"
18
18
  },
19
19
  "devDependencies": {},
20
20
  "keywords": [
@@ -10,6 +10,7 @@ export declare class Shape {
10
10
  private shapeImg;
11
11
  private preventFrameAnnotation;
12
12
  private redactType;
13
+ private isPublicUpdateShape;
13
14
  constructor(parent: ImageEditor);
14
15
  destroy(): void;
15
16
  private addEventListener;
@@ -8,6 +8,7 @@ var Shape = /** @class */ (function () {
8
8
  this.keyHistory = ''; // text history
9
9
  this.preventFrameAnnotation = false;
10
10
  this.redactType = 'blur';
11
+ this.isPublicUpdateShape = false;
11
12
  this.parent = parent;
12
13
  this.addEventListener();
13
14
  }
@@ -281,6 +282,9 @@ var Shape = /** @class */ (function () {
281
282
  case 'setRedactType':
282
283
  this.redactType = args.value['redactType'];
283
284
  break;
285
+ case 'setPublicUpdateShape':
286
+ this.isPublicUpdateShape = args.value['isPublicUpdateShape'];
287
+ break;
284
288
  }
285
289
  };
286
290
  Shape.prototype.getModuleName = function () {
@@ -307,7 +311,7 @@ var Shape = /** @class */ (function () {
307
311
  this.textSettings =
308
312
  { text: 'Enter Text', fontFamily: this.parent.fontFamily.default, fontSize: null, fontRatio: null, bold: false, italic: false, underline: false, strikethrough: false };
309
313
  this.strokeSettings = { strokeColor: '#fff', fillColor: '', strokeWidth: null, radius: null, outlineColor: '', outlineWidth: null };
310
- this.preventFrameAnnotation = false;
314
+ this.preventFrameAnnotation = this.isPublicUpdateShape = false;
311
315
  };
312
316
  Shape.prototype.drawEllipse = function (x, y, radiusX, radiusY, strokeWidth, strokeColor, fillColor, degree, isSelected) {
313
317
  this.initializeShape('ellipse');
@@ -1019,7 +1023,7 @@ var Shape = /** @class */ (function () {
1019
1023
  }
1020
1024
  parent.notify('selection', { prop: 'setTextSelection', onPropertyChange: false,
1021
1025
  value: { width: width, height: height } });
1022
- if (parent.activeObj.rotatedAngle !== 0) {
1026
+ if (parent.activeObj.rotatedAngle !== 0 && !this.isPublicUpdateShape) {
1023
1027
  var width_1 = parent.activeObj.activePoint.width - tempActiveObj.activePoint.width;
1024
1028
  var height_1 = parent.activeObj.activePoint.height - tempActiveObj.activePoint.height;
1025
1029
  var value = '';
@@ -1038,6 +1042,20 @@ var Shape = /** @class */ (function () {
1038
1042
  parent.notify('shape', { prop: 'updateFontSize', onPropertyChange: false,
1039
1043
  value: { obj: parent.activeObj } });
1040
1044
  }
1045
+ else if (this.isPublicUpdateShape) {
1046
+ var width_2 = parent.activeObj.activePoint.width - tempActiveObj.activePoint.width;
1047
+ var height_2 = parent.activeObj.activePoint.height - tempActiveObj.activePoint.height;
1048
+ var value = '';
1049
+ if (parent.transform.degree === 0 || parent.transform.degree === 180) {
1050
+ value = 'width';
1051
+ }
1052
+ else if (parent.transform.degree === 90 || parent.transform.degree === 270) {
1053
+ value = 'height';
1054
+ }
1055
+ parent.activeObj.activePoint = extend({}, tempActiveObj.activePoint, {}, true);
1056
+ parent.notify('selection', { prop: 'adjustRotationPoints', onPropertyChange: false, value: { rectangle: parent.activeObj.activePoint,
1057
+ x: width_2, y: height_2, angle: parent.activeObj.rotatedAngle, type: 'text', elem: value } });
1058
+ }
1041
1059
  parent.notify('draw', { prop: 'updateActiveObject', onPropertyChange: false, value: { actPoint: parent.activeObj.activePoint, obj: parent.activeObj,
1042
1060
  isMouseMove: null, x: null, y: null } });
1043
1061
  this.updImgRatioForActObj();
@@ -1817,6 +1817,9 @@ var ImageEditor = /** @class */ (function (_super) {
1817
1817
  *
1818
1818
  */
1819
1819
  ImageEditor.prototype.updateShape = function (setting, isSelected) {
1820
+ if (setting.type.toLowerCase() === 'text') {
1821
+ this.notify('shape', { prop: 'setPublicUpdateShape', onPropertyChange: false, value: { isPublicUpdateShape: true } });
1822
+ }
1820
1823
  var obj = { isSelected: false };
1821
1824
  var isTextArea = false;
1822
1825
  var freehandObj = { bool: false };
@@ -1888,6 +1891,9 @@ var ImageEditor = /** @class */ (function (_super) {
1888
1891
  }
1889
1892
  }
1890
1893
  }
1894
+ if (setting.type.toLowerCase() === 'text') {
1895
+ this.notify('shape', { prop: 'setPublicUpdateShape', onPropertyChange: false, value: { isPublicUpdateShape: false } });
1896
+ }
1891
1897
  return obj['isSelected'];
1892
1898
  };
1893
1899
  /**