@syncfusion/ej2-image-editor 23.1.36 → 23.1.39

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.
Files changed (57) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/ej2-image-editor.umd.min.js +3 -3
  3. package/dist/ej2-image-editor.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-image-editor.es2015.js +249 -31
  5. package/dist/es6/ej2-image-editor.es2015.js.map +1 -1
  6. package/dist/es6/ej2-image-editor.es5.js +266 -48
  7. package/dist/es6/ej2-image-editor.es5.js.map +1 -1
  8. package/dist/global/ej2-image-editor.min.js +3 -3
  9. package/dist/global/ej2-image-editor.min.js.map +1 -1
  10. package/dist/global/index.d.ts +2 -2
  11. package/package.json +10 -10
  12. package/src/image-editor/action/draw.js +5 -1
  13. package/src/image-editor/action/freehand-draw.d.ts +1 -0
  14. package/src/image-editor/action/freehand-draw.js +53 -26
  15. package/src/image-editor/action/selection.js +38 -3
  16. package/src/image-editor/action/shape.js +33 -16
  17. package/src/image-editor/base/enum.d.ts +28 -1
  18. package/src/image-editor/base/enum.js +27 -0
  19. package/src/image-editor/base/image-editor-model.d.ts +1 -1
  20. package/src/image-editor/base/image-editor.d.ts +8 -0
  21. package/src/image-editor/base/image-editor.js +110 -3
  22. package/src/image-editor/renderer/toolbar.js +1 -0
  23. package/styles/bootstrap-dark.css +5 -0
  24. package/styles/bootstrap.css +5 -0
  25. package/styles/bootstrap4.css +5 -0
  26. package/styles/bootstrap5-dark.css +5 -0
  27. package/styles/bootstrap5.css +5 -0
  28. package/styles/fabric-dark.css +5 -0
  29. package/styles/fabric.css +5 -0
  30. package/styles/fluent-dark.css +5 -0
  31. package/styles/fluent.css +5 -0
  32. package/styles/highcontrast-light.css +5 -0
  33. package/styles/highcontrast.css +5 -0
  34. package/styles/image-editor/_layout.scss +6 -0
  35. package/styles/image-editor/bootstrap-dark.css +5 -0
  36. package/styles/image-editor/bootstrap.css +5 -0
  37. package/styles/image-editor/bootstrap4.css +5 -0
  38. package/styles/image-editor/bootstrap5-dark.css +5 -0
  39. package/styles/image-editor/bootstrap5.css +5 -0
  40. package/styles/image-editor/fabric-dark.css +5 -0
  41. package/styles/image-editor/fabric.css +5 -0
  42. package/styles/image-editor/fluent-dark.css +5 -0
  43. package/styles/image-editor/fluent.css +5 -0
  44. package/styles/image-editor/highcontrast-light.css +5 -0
  45. package/styles/image-editor/highcontrast.css +5 -0
  46. package/styles/image-editor/material-dark.css +5 -0
  47. package/styles/image-editor/material.css +5 -0
  48. package/styles/image-editor/material3-dark.css +5 -0
  49. package/styles/image-editor/material3.css +5 -0
  50. package/styles/image-editor/tailwind-dark.css +5 -0
  51. package/styles/image-editor/tailwind.css +5 -0
  52. package/styles/material-dark.css +5 -0
  53. package/styles/material.css +5 -0
  54. package/styles/material3-dark.css +5 -0
  55. package/styles/material3.css +5 -0
  56. package/styles/tailwind-dark.css +5 -0
  57. package/styles/tailwind.css +5 -0
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 23.1.36
4
- * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
3
+ * version : 23.1.39
4
+ * Copyright Syncfusion Inc. 2001 - 2023. 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,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-image-editor@*",
3
- "_id": "@syncfusion/ej2-image-editor@20.18.0",
3
+ "_id": "@syncfusion/ej2-image-editor@23.1.38",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-y/5mhKXiQuPoGSnd0cKEjsAtldx4Im5PvldVEM96ccVUBeTfC/wOOmCMl1cOkWzwzNEgpkQoES9xFqC1Xht6EA==",
5
+ "_integrity": "sha512-uuXxNE5Haq0i5Nm7+59rT9+cSlFOZVkbVfRZaWoO8d3ZmCowMTc9JKJys+M7QS2VOfAl01wmwFkl0baHvKUoOA==",
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-release/@syncfusion/ej2-image-editor/-/ej2-image-editor-20.18.0.tgz",
27
- "_shasum": "7f64d41fb7f16402d12e35a546644dd7e73d160f",
26
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-image-editor/-/ej2-image-editor-23.1.38.tgz",
27
+ "_shasum": "9797d280c96410779d9338fe418f75e4ca993819",
28
28
  "_spec": "@syncfusion/ej2-image-editor@*",
29
29
  "_where": "/jenkins/workspace/elease-automation_release_23.1.1/packages/included",
30
30
  "author": {
@@ -32,11 +32,11 @@
32
32
  },
33
33
  "bundleDependencies": false,
34
34
  "dependencies": {
35
- "@syncfusion/ej2-base": "~23.1.36",
36
- "@syncfusion/ej2-buttons": "~23.1.36",
37
- "@syncfusion/ej2-inputs": "~23.1.36",
38
- "@syncfusion/ej2-navigations": "~23.1.36",
39
- "@syncfusion/ej2-popups": "~23.1.36",
35
+ "@syncfusion/ej2-base": "~23.1.38",
36
+ "@syncfusion/ej2-buttons": "~23.1.39",
37
+ "@syncfusion/ej2-inputs": "~23.1.38",
38
+ "@syncfusion/ej2-navigations": "~23.1.39",
39
+ "@syncfusion/ej2-popups": "~23.1.38",
40
40
  "@syncfusion/ej2-splitbuttons": "~23.1.36"
41
41
  },
42
42
  "deprecated": false,
@@ -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": "23.1.36",
70
+ "version": "23.1.39",
71
71
  "sideEffects": false,
72
72
  "homepage": "https://www.syncfusion.com/javascript-ui-controls"
73
73
  }
@@ -3434,7 +3434,11 @@ var Draw = /** @class */ (function () {
3434
3434
  /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
3435
3435
  filesData = fileData = args.filesData[0].rawFile;
3436
3436
  }
3437
- var fileExtension = fileData.name && fileData.name.split('.')[1].toLowerCase();
3437
+ var fileExtension = void 0;
3438
+ if (fileData.name) {
3439
+ var fileExtensionArray = fileData.name.split('.');
3440
+ fileExtension = fileExtensionArray[fileExtensionArray.length - 1].toLowerCase();
3441
+ }
3438
3442
  if (fileExtension && ['jpg', 'jpeg', 'png', 'svg'].indexOf(fileExtension) === -1) {
3439
3443
  this.errorLoading();
3440
3444
  return;
@@ -59,4 +59,5 @@ export declare class FreehandDrawing {
59
59
  private freeHandDraw;
60
60
  private isFHDIdx;
61
61
  private updateCropPtsForSel;
62
+ private triggerShapeChanging;
62
63
  }
@@ -251,6 +251,13 @@ var FreehandDrawing = /** @class */ (function () {
251
251
  }
252
252
  this.isFreehandPointMoved = false;
253
253
  EventHandler.add(canvas, 'mousemove touchmove', this.freehandMoveHandler, this);
254
+ var shapeSettings = { id: 'pen_' + (this.currFHDIdx + 1), type: ShapeType.FreehandDraw,
255
+ startX: this.freehandDownPoint.x, startY: this.freehandDownPoint.y,
256
+ strokeColor: this.parent.activeObj.strokeSettings.strokeColor, strokeWidth: this.penStrokeWidth,
257
+ points: null };
258
+ var shapeChangingArgs = { action: 'draw-start', previousShapeSettings: shapeSettings,
259
+ currentShapeSettings: shapeSettings };
260
+ this.triggerShapeChanging(shapeChangingArgs);
254
261
  };
255
262
  FreehandDrawing.prototype.freehandUpHandler = function (e, canvas, context) {
256
263
  var rect = canvas.getBoundingClientRect();
@@ -295,13 +302,20 @@ var FreehandDrawing = /** @class */ (function () {
295
302
  this.selPoints = [];
296
303
  this.pointCounter = 0;
297
304
  parent.freehandCounter++;
298
- this.currFHDIdx++;
299
305
  this.isFreehandDrawing = false;
300
306
  parent.notify('undo-redo', { prop: 'updateUndoRedoColl', onPropertyChange: false,
301
307
  value: { operation: 'freehand-draw', previousObj: prevObj, previousObjColl: prevObj.objColl,
302
308
  previousPointColl: prevObj.pointColl, previousSelPointColl: prevObj.selPointColl,
303
309
  previousCropObj: prevCropObj, previousText: null,
304
310
  currentText: null, previousFilter: null, isCircleCrop: null } });
311
+ var shapeSettings = { id: 'pen_' + (this.currFHDIdx + 1), type: ShapeType.FreehandDraw,
312
+ startX: this.freehandDownPoint.x, startY: this.freehandDownPoint.y,
313
+ strokeColor: this.parent.activeObj.strokeSettings.strokeColor, strokeWidth: this.penStrokeWidth,
314
+ points: this.parent.pointColl[this.currFHDIdx].points };
315
+ var shapeChangingArgs = { action: 'draw-end', previousShapeSettings: shapeSettings,
316
+ currentShapeSettings: shapeSettings };
317
+ this.triggerShapeChanging(shapeChangingArgs);
318
+ this.currFHDIdx++;
305
319
  };
306
320
  FreehandDrawing.prototype.freehandMoveHandler = function (e) {
307
321
  this.isFreehandPointMoved = true;
@@ -317,6 +331,7 @@ var FreehandDrawing = /** @class */ (function () {
317
331
  y = e.touches[0].clientY - rect.top;
318
332
  }
319
333
  if (this.isFreehandDrawing) {
334
+ this.upperContext.fillStyle = this.parent.activeObj.strokeSettings.strokeColor;
320
335
  this.processPoint(x, y, false, this.upperContext);
321
336
  }
322
337
  };
@@ -637,7 +652,6 @@ var FreehandDrawing = /** @class */ (function () {
637
652
  }
638
653
  };
639
654
  FreehandDrawing.prototype.selectFhd = function (index) {
640
- var _this = this;
641
655
  var parent = this.parent;
642
656
  parent.notify('selection', { prop: 'setFreehandDrawEditing', onPropertyChange: false, value: { bool: true } });
643
657
  if (index || index === 0) {
@@ -668,30 +682,7 @@ var FreehandDrawing = /** @class */ (function () {
668
682
  points: parent.pointColl[this.fhdSelIdx].points };
669
683
  var shapeChangingArgs = { action: 'select', previousShapeSettings: shapeSettings,
670
684
  currentShapeSettings: shapeSettings };
671
- if (isBlazor() && parent.events && parent.events.shapeChanging.hasDelegate === true) {
672
- /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
673
- parent.dotNetRef.invokeMethodAsync('ShapeEventAsync', 'OnShape', shapeChangingArgs).then(function (shapeChangingArgs) {
674
- parent.activeObj.strokeSettings.strokeColor = parent.pointColl[_this.fhdSelIdx].strokeColor =
675
- shapeChangingArgs.currentShapeSettings.strokeColor;
676
- parent.activeObj.strokeSettings.strokeWidth = parent.pointColl[_this.fhdSelIdx].strokeWidth =
677
- shapeChangingArgs.currentShapeSettings.strokeWidth;
678
- parent.pointColl[_this.fhdSelIdx].points = shapeChangingArgs.currentShapeSettings.points;
679
- _this.freehandRedraw(_this.upperContext);
680
- parent.updateToolbar(parent.element, 'imageLoaded');
681
- parent.updateToolbar(parent.element, 'pen');
682
- });
683
- }
684
- else {
685
- parent.trigger('shapeChanging', shapeChangingArgs);
686
- parent.activeObj.strokeSettings.strokeColor = parent.pointColl[this.fhdSelIdx].strokeColor =
687
- shapeChangingArgs.currentShapeSettings.strokeColor;
688
- parent.activeObj.strokeSettings.strokeWidth = parent.pointColl[this.fhdSelIdx].strokeWidth =
689
- shapeChangingArgs.currentShapeSettings.strokeWidth;
690
- parent.pointColl[this.fhdSelIdx].points = shapeChangingArgs.currentShapeSettings.points;
691
- this.freehandRedraw(this.upperContext);
692
- parent.notify('toolbar', { prop: 'refresh-toolbar', onPropertyChange: false, value: { type: 'pen',
693
- isApplyBtn: null, isCropping: null, isZooming: null, cType: null } });
694
- }
685
+ this.triggerShapeChanging(shapeChangingArgs);
695
686
  }
696
687
  else {
697
688
  parent.okBtn();
@@ -1071,6 +1062,42 @@ var FreehandDrawing = /** @class */ (function () {
1071
1062
  }
1072
1063
  }
1073
1064
  };
1065
+ FreehandDrawing.prototype.triggerShapeChanging = function (shapeChangingArgs) {
1066
+ var _this = this;
1067
+ var parent = this.parent;
1068
+ if (isBlazor() && parent.events && parent.events.shapeChanging.hasDelegate === true) {
1069
+ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
1070
+ parent.dotNetRef.invokeMethodAsync('ShapeEventAsync', 'OnShape', shapeChangingArgs).then(function (shapeChangingArgs) {
1071
+ parent.activeObj.strokeSettings.strokeColor = shapeChangingArgs.currentShapeSettings.strokeColor;
1072
+ _this.penStrokeWidth = shapeChangingArgs.currentShapeSettings.strokeWidth;
1073
+ if (_this.fhdSelID) {
1074
+ parent.pointColl[_this.fhdSelIdx].strokeColor = shapeChangingArgs.currentShapeSettings.strokeColor;
1075
+ parent.pointColl[_this.fhdSelIdx].strokeWidth = shapeChangingArgs.currentShapeSettings.strokeWidth;
1076
+ parent.pointColl[_this.fhdSelIdx].points = shapeChangingArgs.currentShapeSettings.points;
1077
+ }
1078
+ if (shapeChangingArgs.action === 'select') {
1079
+ _this.freehandRedraw(_this.upperContext);
1080
+ parent.updateToolbar(parent.element, 'imageLoaded');
1081
+ parent.updateToolbar(parent.element, 'pen');
1082
+ }
1083
+ });
1084
+ }
1085
+ else {
1086
+ parent.trigger('shapeChanging', shapeChangingArgs);
1087
+ parent.activeObj.strokeSettings.strokeColor = shapeChangingArgs.currentShapeSettings.strokeColor;
1088
+ this.penStrokeWidth = shapeChangingArgs.currentShapeSettings.strokeWidth;
1089
+ if (this.fhdSelID) {
1090
+ parent.pointColl[this.fhdSelIdx].strokeColor = shapeChangingArgs.currentShapeSettings.strokeColor;
1091
+ parent.pointColl[this.fhdSelIdx].strokeWidth = shapeChangingArgs.currentShapeSettings.strokeWidth;
1092
+ parent.pointColl[this.fhdSelIdx].points = shapeChangingArgs.currentShapeSettings.points;
1093
+ }
1094
+ if (shapeChangingArgs.action === 'select') {
1095
+ this.freehandRedraw(this.upperContext);
1096
+ parent.notify('toolbar', { prop: 'refresh-toolbar', onPropertyChange: false, value: { type: 'pen',
1097
+ isApplyBtn: null, isCropping: null, isZooming: null, cType: null } });
1098
+ }
1099
+ }
1100
+ };
1074
1101
  return FreehandDrawing;
1075
1102
  }());
1076
1103
  export { FreehandDrawing };
@@ -256,6 +256,9 @@ var Selection = /** @class */ (function () {
256
256
  case 'upgradeImageQuality':
257
257
  this.upgradeImageQuality();
258
258
  break;
259
+ case 'triggerShapeChange':
260
+ this.triggerShapeChange(args.value['shapeResizingArgs'], args.value['shapeMovingArgs'], args.value['type']);
261
+ break;
259
262
  }
260
263
  };
261
264
  Selection.prototype.getModuleName = function () {
@@ -1078,8 +1081,14 @@ var Selection = /** @class */ (function () {
1078
1081
  parent.activeObj.activePoint.width = parent.activeObj.activePoint.endX - parent.activeObj.activePoint.startX;
1079
1082
  parent.activeObj.activePoint.height = parent.activeObj.activePoint.endY - parent.activeObj.activePoint.startY;
1080
1083
  var currentShapeSettings = this.updatePrevShapeSettings();
1081
- shapeResizingArgs.currentShapeSettings = this.shapeResizingArgs.currentShapeSettings = currentShapeSettings;
1082
- shapeMovingArgs.currentShapeSettings = this.shapeMovingArgs.currentShapeSettings = currentShapeSettings;
1084
+ if (!isNullOrUndefined(this.shapeResizingArgs) && !isNullOrUndefined(this.shapeMovingArgs)) {
1085
+ shapeResizingArgs.currentShapeSettings = this.shapeResizingArgs.currentShapeSettings = currentShapeSettings;
1086
+ shapeMovingArgs.currentShapeSettings = this.shapeMovingArgs.currentShapeSettings = currentShapeSettings;
1087
+ }
1088
+ else {
1089
+ shapeResizingArgs.currentShapeSettings = currentShapeSettings;
1090
+ shapeMovingArgs.currentShapeSettings = currentShapeSettings;
1091
+ }
1083
1092
  if (type === 'resize') {
1084
1093
  this.isCropSelection = false;
1085
1094
  var splitWords = void 0;
@@ -1134,6 +1143,20 @@ var Selection = /** @class */ (function () {
1134
1143
  }
1135
1144
  }
1136
1145
  }
1146
+ else if (type === 'mouse-down' || type === 'mouse-up') {
1147
+ if (isBlazor() && parent.events && parent.events.shapeChanging.hasDelegate === true) {
1148
+ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
1149
+ parent.dotNetRef.invokeMethodAsync('ShapeEventAsync', 'OnShape', shapeResizingArgs).then(function (shapeResizingArgs) {
1150
+ parent.notify('shape', { prop: 'updateShapeChangeEventArgs', onPropertyChange: false,
1151
+ value: { shapeSettings: shapeResizingArgs.currentShapeSettings } });
1152
+ });
1153
+ }
1154
+ else {
1155
+ parent.trigger('shapeChanging', shapeResizingArgs);
1156
+ parent.notify('shape', { prop: 'updateShapeChangeEventArgs', onPropertyChange: false,
1157
+ value: { shapeSettings: shapeResizingArgs.currentShapeSettings } });
1158
+ }
1159
+ }
1137
1160
  else {
1138
1161
  if (isBlazor() && isNullOrUndefined(this.parent.eventType) && parent.events &&
1139
1162
  parent.events.onShapeDragStart.hasDelegate === true) {
@@ -2845,6 +2868,12 @@ var Selection = /** @class */ (function () {
2845
2868
  parent.activeObj.activePoint.endX = parent.activeObj.activePoint.startX;
2846
2869
  parent.activeObj.activePoint.endY = parent.activeObj.activePoint.startY;
2847
2870
  parent.currObjType.isDragging = true;
2871
+ var previousShapeSettings = this.updatePrevShapeSettings();
2872
+ var shapeResizingArgs = { action: 'draw-start', previousShapeSettings: previousShapeSettings };
2873
+ var shapeMovingArgs = { action: 'move', previousShapeSettings: previousShapeSettings };
2874
+ this.shapeResizingArgs = shapeResizingArgs;
2875
+ this.shapeMovingArgs = shapeMovingArgs;
2876
+ this.triggerShapeChange(shapeResizingArgs, shapeMovingArgs, 'mouse-down');
2848
2877
  return;
2849
2878
  }
2850
2879
  parent.notify('draw', { prop: 'resetFrameZoom', onPropertyChange: false });
@@ -3249,7 +3278,7 @@ var Selection = /** @class */ (function () {
3249
3278
  }
3250
3279
  if (this.currentDrawingShape === 'path') {
3251
3280
  var elem = e.srcElement;
3252
- if (e.currentTarget !== parent.upperCanvas && e.currentTarget !== parent.lowerCanvas &&
3281
+ if (e.currentTarget !== parent.upperCanvas && e.currentTarget !== parent.lowerCanvas && parent.activeObj.pointColl.length > 0 &&
3253
3282
  (elem.classList.contains('e-upload-icon') || elem.parentElement.id === parent.element.id + '_zoomIn' ||
3254
3283
  elem.parentElement.id === parent.element.id + '_zoomOut' || elem.parentElement.id === parent.element.id + '_annotationBtn' ||
3255
3284
  elem.parentElement.id === parent.element.id + '_borderColorBtn' || elem.parentElement.id === parent.element.id + '_borderWidthBtn' ||
@@ -3280,6 +3309,12 @@ var Selection = /** @class */ (function () {
3280
3309
  if (parent.activeObj.activePoint.width === 0 && parent.activeObj.activePoint.height === 0) {
3281
3310
  parent.notify('draw', { prop: 'performCancel', value: { isContextualToolbar: null } });
3282
3311
  }
3312
+ var previousShapeSettings = this.updatePrevShapeSettings();
3313
+ var shapeResizingArgs = { action: 'draw-end', previousShapeSettings: previousShapeSettings };
3314
+ var shapeMovingArgs = { action: 'move', previousShapeSettings: previousShapeSettings };
3315
+ this.shapeResizingArgs = shapeResizingArgs;
3316
+ this.shapeMovingArgs = shapeMovingArgs;
3317
+ this.triggerShapeChange(shapeResizingArgs, shapeMovingArgs, 'mouse-up');
3283
3318
  }
3284
3319
  this.adjustActObjForLineArrow();
3285
3320
  this.updPtCollForShpRot();
@@ -752,6 +752,9 @@ var Shape = /** @class */ (function () {
752
752
  parent.activeObj.activePoint.endY = parent.activeObj.activePoint.startY + parent.activeObj.activePoint.height;
753
753
  parent.activeObj.strokeSettings.strokeColor = shapeSettings.strokeColor;
754
754
  parent.activeObj.strokeSettings.fillColor = shapeSettings.fillColor;
755
+ if (isNullOrUndefined(shapeSettings.degree)) {
756
+ shapeSettings.degree = 0;
757
+ }
755
758
  switch (parent.activeObj.shape) {
756
759
  case 'ellipse':
757
760
  parent.activeObj.activePoint.width = shapeSettings.radius * 2;
@@ -1582,6 +1585,13 @@ var Shape = /** @class */ (function () {
1582
1585
  else {
1583
1586
  parent.updateToolbar(parent.element, 'quickAccessToolbar', parent.activeObj.shape);
1584
1587
  }
1588
+ var obj_1 = { shapeSettingsObj: {} };
1589
+ parent.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: obj_1 } });
1590
+ var shapeSettings = obj_1['shapeSettingsObj'];
1591
+ var shapeResizingArgs = { action: 'draw-end', previousShapeSettings: shapeSettings };
1592
+ var shapeMovingArgs = { action: 'move', previousShapeSettings: shapeSettings };
1593
+ parent.notify('selection', { prop: 'triggerShapeChange', onPropertyChange: false,
1594
+ value: { shapeResizingArgs: shapeResizingArgs, shapeMovingArgs: shapeMovingArgs, type: 'mouse-up' } });
1585
1595
  }
1586
1596
  }
1587
1597
  };
@@ -1751,10 +1761,10 @@ var Shape = /** @class */ (function () {
1751
1761
  value: { width: this.shapeImg.width, height: this.shapeImg.height, obj: dimObj, isImgShape: null } });
1752
1762
  if (width && height) {
1753
1763
  if (isAspectRatio) {
1754
- var obj_1 = { ratio: null };
1764
+ var obj_2 = { ratio: null };
1755
1765
  parent.notify('selection', { prop: 'findImageRatio', onPropertyChange: false,
1756
- value: { width: this.shapeImg.width, height: this.shapeImg.height, obj: obj_1 } });
1757
- dimObj = this.resizeImage(width, obj_1['ratio']);
1766
+ value: { width: this.shapeImg.width, height: this.shapeImg.height, obj: obj_2 } });
1767
+ dimObj = this.resizeImage(width, obj_2['ratio']);
1758
1768
  }
1759
1769
  else {
1760
1770
  dimObj = { width: width, height: height };
@@ -1767,10 +1777,10 @@ var Shape = /** @class */ (function () {
1767
1777
  value: { width: this.shapeImg.width, height: this.shapeImg.height, obj: dimObj, isImgShape: true } });
1768
1778
  if (width && height) {
1769
1779
  if (isAspectRatio) {
1770
- var obj_2 = { ratio: null };
1780
+ var obj_3 = { ratio: null };
1771
1781
  parent.notify('selection', { prop: 'findImageRatio', onPropertyChange: false,
1772
- value: { width: this.shapeImg.width, height: this.shapeImg.height, obj: obj_2 } });
1773
- dimObj = this.resizeImage(width, obj_2['ratio']);
1782
+ value: { width: this.shapeImg.width, height: this.shapeImg.height, obj: obj_3 } });
1783
+ dimObj = this.resizeImage(width, obj_3['ratio']);
1774
1784
  }
1775
1785
  else {
1776
1786
  dimObj = { width: width, height: height };
@@ -2078,6 +2088,9 @@ var Shape = /** @class */ (function () {
2078
2088
  };
2079
2089
  Shape.prototype.applyFontStyle = function (item) {
2080
2090
  var parent = this.parent;
2091
+ var obj = { shapeSettingsObj: {} };
2092
+ parent.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: obj } });
2093
+ var shapeSettings = obj['shapeSettingsObj'];
2081
2094
  this.pushActItemIntoObj();
2082
2095
  var objColl = extend([], parent.objColl, [], true);
2083
2096
  parent.objColl.pop();
@@ -2101,6 +2114,10 @@ var Shape = /** @class */ (function () {
2101
2114
  this.updateFontStyle(item, objColl, 'bold', 'italic');
2102
2115
  break;
2103
2116
  }
2117
+ var shapeChangedArgs = { action: 'font-style', previousShapeSettings: extend({}, shapeSettings, {}, true),
2118
+ currentShapeSettings: extend({}, shapeSettings, {}, true) };
2119
+ shapeChangedArgs.currentShapeSettings.fontStyle = [item];
2120
+ parent.triggerShapeChanged(shapeChangedArgs);
2104
2121
  };
2105
2122
  Shape.prototype.updateFontStyle = function (item, objColl, fontWeight, fontStyle) {
2106
2123
  var parent = this.parent;
@@ -2464,14 +2481,14 @@ var Shape = /** @class */ (function () {
2464
2481
  if (!parent.disabled && parent.isImageLoaded) {
2465
2482
  this.applyActObj();
2466
2483
  if (id.split('_')[0] === 'shape') {
2467
- var obj_3;
2484
+ var obj_4;
2468
2485
  for (var i = 0, len = parent.objColl.length; i < len; i++) {
2469
2486
  if (parent.objColl[i].currIndex === id) {
2470
- obj_3 = extend({}, parent.objColl[i], {}, true);
2487
+ obj_4 = extend({}, parent.objColl[i], {}, true);
2471
2488
  break;
2472
2489
  }
2473
2490
  }
2474
- shapeDetails = this.getObjDetails(obj_3);
2491
+ shapeDetails = this.getObjDetails(obj_4);
2475
2492
  }
2476
2493
  else if (id.split('_')[0] === 'pen') {
2477
2494
  shapeDetails = this.getFreehandDrawDetails(parseInt(id.split('_')[1], 10) - 1);
@@ -2623,19 +2640,19 @@ var Shape = /** @class */ (function () {
2623
2640
  if (!parent.disabled && parent.isImageLoaded) {
2624
2641
  this.applyActObj();
2625
2642
  if (id.split('_')[0] === 'shape') {
2626
- var obj_4;
2643
+ var obj_5;
2627
2644
  for (var i = 0, len = parent.objColl.length; i < len; i++) {
2628
2645
  if (parent.objColl[i].currIndex === id) {
2629
- obj_4 = extend({}, parent.objColl[i], {}, true);
2646
+ obj_5 = extend({}, parent.objColl[i], {}, true);
2630
2647
  break;
2631
2648
  }
2632
2649
  }
2633
- if (isNullOrUndefined(obj_4)) {
2650
+ if (isNullOrUndefined(obj_5)) {
2634
2651
  isSelected = false;
2635
2652
  }
2636
2653
  else {
2637
2654
  isSelected = true;
2638
- parent.activeObj = obj_4;
2655
+ parent.activeObj = obj_5;
2639
2656
  var object = { canvasFilter: null };
2640
2657
  parent.notify('toolbar', { prop: 'getCanvasFilter', onPropertyChange: false, value: { obj: object } });
2641
2658
  this.lowerContext.filter = object['canvasFilter'];
@@ -2674,9 +2691,9 @@ var Shape = /** @class */ (function () {
2674
2691
  if (object['bool']) {
2675
2692
  parent.okBtn();
2676
2693
  }
2677
- var obj_5 = { isIndex: false };
2678
- parent.notify('freehand-draw', { prop: 'isFHDIdx', value: { index: parseInt(id.split('_')[1], 10) - 1, obj: obj_5 } });
2679
- if (obj_5['isIndex']) {
2694
+ var obj_6 = { isIndex: false };
2695
+ parent.notify('freehand-draw', { prop: 'isFHDIdx', value: { index: parseInt(id.split('_')[1], 10) - 1, obj: obj_6 } });
2696
+ if (obj_6['isIndex']) {
2680
2697
  isSelected = true;
2681
2698
  parent.notify('freehand-draw', { prop: 'selectFhd', value: { id: id } });
2682
2699
  if (!isBlazor()) {
@@ -122,7 +122,34 @@ export declare enum ImageEditorCommand {
122
122
  RotateLeft = "RotateLeft",
123
123
  RotateRight = "RotateRight",
124
124
  FlipHorizontal = "FlipHorizontal",
125
- FlipVertical = "FlipVertical"
125
+ FlipVertical = "FlipVertical",
126
+ Undo = "Undo",
127
+ Redo = "Redo",
128
+ None = "None",
129
+ Mat = "Mat",
130
+ Bevel = "Bevel",
131
+ Inset = "Inset",
132
+ Hook = "Hook",
133
+ Finetune = "Finetune",
134
+ Filter = "Filter",
135
+ Frame = "Frame",
136
+ Resize = "Resize",
137
+ HorizontalFlip = "HorizontalFlip",
138
+ VerticalFlip = "VerticalFlip",
139
+ Brightness = "Brightness",
140
+ Contrast = "Contrast",
141
+ Hue = "Hue",
142
+ Saturation = "Saturation",
143
+ Opacity = "Opacity",
144
+ Blur = "Blur",
145
+ Exposure = "Exposure",
146
+ Default = "Default",
147
+ Chrome = "Chrome",
148
+ Cold = "Cold",
149
+ Warm = "Warm",
150
+ Grayscale = "Grayscale",
151
+ Sepia = "Sepia",
152
+ Invert = "Invert"
126
153
  }
127
154
  /**
128
155
  * An enumeration of available image filter options.
@@ -129,6 +129,33 @@ export var ImageEditorCommand;
129
129
  ImageEditorCommand["RotateRight"] = "RotateRight";
130
130
  ImageEditorCommand["FlipHorizontal"] = "FlipHorizontal";
131
131
  ImageEditorCommand["FlipVertical"] = "FlipVertical";
132
+ ImageEditorCommand["Undo"] = "Undo";
133
+ ImageEditorCommand["Redo"] = "Redo";
134
+ ImageEditorCommand["None"] = "None";
135
+ ImageEditorCommand["Mat"] = "Mat";
136
+ ImageEditorCommand["Bevel"] = "Bevel";
137
+ ImageEditorCommand["Inset"] = "Inset";
138
+ ImageEditorCommand["Hook"] = "Hook";
139
+ ImageEditorCommand["Finetune"] = "Finetune";
140
+ ImageEditorCommand["Filter"] = "Filter";
141
+ ImageEditorCommand["Frame"] = "Frame";
142
+ ImageEditorCommand["Resize"] = "Resize";
143
+ ImageEditorCommand["HorizontalFlip"] = "HorizontalFlip";
144
+ ImageEditorCommand["VerticalFlip"] = "VerticalFlip";
145
+ ImageEditorCommand["Brightness"] = "Brightness";
146
+ ImageEditorCommand["Contrast"] = "Contrast";
147
+ ImageEditorCommand["Hue"] = "Hue";
148
+ ImageEditorCommand["Saturation"] = "Saturation";
149
+ ImageEditorCommand["Opacity"] = "Opacity";
150
+ ImageEditorCommand["Blur"] = "Blur";
151
+ ImageEditorCommand["Exposure"] = "Exposure";
152
+ ImageEditorCommand["Default"] = "Default";
153
+ ImageEditorCommand["Chrome"] = "Chrome";
154
+ ImageEditorCommand["Cold"] = "Cold";
155
+ ImageEditorCommand["Warm"] = "Warm";
156
+ ImageEditorCommand["Grayscale"] = "Grayscale";
157
+ ImageEditorCommand["Sepia"] = "Sepia";
158
+ ImageEditorCommand["Invert"] = "Invert";
132
159
  })(ImageEditorCommand || (ImageEditorCommand = {}));
133
160
  /**
134
161
  * An enumeration of available image filter options.
@@ -1,4 +1,4 @@
1
- import { Component, NotifyPropertyChanges, INotifyPropertyChanged, Property, addClass, removeClass, ModuleDeclaration, extend, isBlazor, BlazorDotnetObject } from '@syncfusion/ej2-base';
1
+ import { Component, NotifyPropertyChanges, INotifyPropertyChanged, Property, addClass, removeClass, ModuleDeclaration, extend, isBlazor, BlazorDotnetObject } from '@syncfusion/ej2-base';
2
2
  import {ComponentModel} from '@syncfusion/ej2-base';
3
3
 
4
4
  /**
@@ -1424,4 +1424,12 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
1424
1424
  * @returns {void}.
1425
1425
  */
1426
1426
  updateToolbar(element: HTMLDivElement, type: string, value?: string): void;
1427
+ /**
1428
+ * Trigger the shapeChanging event for after the shape applied.
1429
+ *
1430
+ * @param { ShapeChangeEventArgs } shapeChangedArgs - Specifies the shapeChaning event args.
1431
+ * @hidden
1432
+ * @returns {void}.
1433
+ */
1434
+ triggerShapeChanged(shapeChangedArgs: ShapeChangeEventArgs): void;
1427
1435
  }