@syncfusion/ej2-image-editor 31.1.21 → 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,7 +1,7 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 31.1.21
4
- * Copyright Syncfusion Inc. 2001 - 2024. All rights reserved.
3
+ * version : 31.2.2
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
7
7
  * licensing@syncfusion.com. Any infringement will be prosecuted under
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncfusion/ej2-image-editor",
3
- "version": "31.1.21",
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.20",
12
- "@syncfusion/ej2-buttons": "~31.1.21",
13
- "@syncfusion/ej2-dropdowns": "~31.1.20",
14
- "@syncfusion/ej2-inputs": "~31.1.21",
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();
@@ -1925,4 +1925,5 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
1925
1925
  * @returns {boolean}.
1926
1926
  */
1927
1927
  drawRedact(type?: RedactType, x?: number, y?: number, width?: number, height?: number, value?: number): boolean;
1928
+ private handlePenActiveState;
1928
1929
  }
@@ -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
  /**
@@ -2101,7 +2107,7 @@ var ImageEditor = /** @class */ (function (_super) {
2101
2107
  * @returns {void}.
2102
2108
  */
2103
2109
  ImageEditor.prototype.undo = function () {
2104
- this.manageActiveAction();
2110
+ this.handlePenActiveState();
2105
2111
  this.notify('undo-redo', { prop: 'undo', onPropertyChange: false });
2106
2112
  this.notify('draw', { prop: 'redrawDownScale' });
2107
2113
  };
@@ -2113,7 +2119,7 @@ var ImageEditor = /** @class */ (function (_super) {
2113
2119
  * @returns {void}.
2114
2120
  */
2115
2121
  ImageEditor.prototype.redo = function () {
2116
- this.manageActiveAction();
2122
+ this.handlePenActiveState();
2117
2123
  this.notify('undo-redo', { prop: 'redo', onPropertyChange: false });
2118
2124
  this.notify('draw', { prop: 'redrawDownScale' });
2119
2125
  };
@@ -4881,6 +4887,13 @@ var ImageEditor = /** @class */ (function (_super) {
4881
4887
  }
4882
4888
  return isRedact;
4883
4889
  };
4890
+ ImageEditor.prototype.handlePenActiveState = function () {
4891
+ var freehandDrawObj = { freehandDrawSelectedId: null };
4892
+ this.notify('freehand-draw', { prop: 'getFreehandDrawSelectedId', onPropertyChange: false, value: { obj: freehandDrawObj } });
4893
+ if (isNullOrUndefined(freehandDrawObj['freehandDrawSelectedId'])) {
4894
+ this.manageActiveAction();
4895
+ }
4896
+ };
4884
4897
  var ImageEditor_1;
4885
4898
  __decorate([
4886
4899
  Property('')