@syncfusion/ej2-image-editor 22.2.11 → 23.1.36

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 (118) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/ej2-image-editor.umd.min.js +2 -2
  3. package/dist/ej2-image-editor.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-image-editor.es2015.js +4269 -687
  5. package/dist/es6/ej2-image-editor.es2015.js.map +1 -1
  6. package/dist/es6/ej2-image-editor.es5.js +4232 -641
  7. package/dist/es6/ej2-image-editor.es5.js.map +1 -1
  8. package/dist/global/ej2-image-editor.min.js +2 -2
  9. package/dist/global/ej2-image-editor.min.js.map +1 -1
  10. package/dist/global/index.d.ts +1 -1
  11. package/package.json +12 -12
  12. package/src/image-editor/action/crop.js +47 -30
  13. package/src/image-editor/action/draw.d.ts +16 -0
  14. package/src/image-editor/action/draw.js +827 -81
  15. package/src/image-editor/action/export.d.ts +3 -0
  16. package/src/image-editor/action/export.js +84 -20
  17. package/src/image-editor/action/filter.d.ts +0 -1
  18. package/src/image-editor/action/filter.js +28 -41
  19. package/src/image-editor/action/freehand-draw.js +42 -32
  20. package/src/image-editor/action/selection.d.ts +6 -0
  21. package/src/image-editor/action/selection.js +380 -66
  22. package/src/image-editor/action/shape.d.ts +8 -0
  23. package/src/image-editor/action/shape.js +286 -91
  24. package/src/image-editor/action/transform.d.ts +9 -0
  25. package/src/image-editor/action/transform.js +402 -52
  26. package/src/image-editor/action/undo-redo.d.ts +1 -0
  27. package/src/image-editor/action/undo-redo.js +138 -10
  28. package/src/image-editor/base/enum.d.ts +38 -1
  29. package/src/image-editor/base/enum.js +39 -0
  30. package/src/image-editor/base/image-editor-model.d.ts +16 -2
  31. package/src/image-editor/base/image-editor.d.ts +134 -7
  32. package/src/image-editor/base/image-editor.js +611 -69
  33. package/src/image-editor/base/interface.d.ts +233 -2
  34. package/src/image-editor/renderer/toolbar.d.ts +25 -0
  35. package/src/image-editor/renderer/toolbar.js +1273 -72
  36. package/styles/bootstrap-dark.css +68 -1
  37. package/styles/bootstrap.css +68 -1
  38. package/styles/bootstrap4.css +68 -1
  39. package/styles/bootstrap5-dark.css +68 -1
  40. package/styles/bootstrap5.css +68 -1
  41. package/styles/fabric-dark.css +68 -1
  42. package/styles/fabric.css +68 -1
  43. package/styles/fluent-dark.css +68 -1
  44. package/styles/fluent.css +68 -1
  45. package/styles/highcontrast-light.css +70 -3
  46. package/styles/highcontrast.css +69 -7
  47. package/styles/image-editor/_bootstrap-dark-definition.scss +1 -0
  48. package/styles/image-editor/_bootstrap-definition.scss +1 -0
  49. package/styles/image-editor/_bootstrap4-definition.scss +1 -0
  50. package/styles/image-editor/_bootstrap5-definition.scss +1 -0
  51. package/styles/image-editor/_fabric-dark-definition.scss +1 -0
  52. package/styles/image-editor/_fabric-definition.scss +1 -0
  53. package/styles/image-editor/_fluent-definition.scss +1 -0
  54. package/styles/image-editor/_fusionnew-definition.scss +1 -0
  55. package/styles/image-editor/_highcontrast-definition.scss +2 -1
  56. package/styles/image-editor/_highcontrast-light-definition.scss +2 -1
  57. package/styles/image-editor/_layout.scss +92 -0
  58. package/styles/image-editor/_material-dark-definition.scss +1 -0
  59. package/styles/image-editor/_material-definition.scss +1 -0
  60. package/styles/image-editor/_material3-definition.scss +2 -1
  61. package/styles/image-editor/_tailwind-definition.scss +1 -0
  62. package/styles/image-editor/_theme.scss +4 -2
  63. package/styles/image-editor/bootstrap-dark.css +68 -1
  64. package/styles/image-editor/bootstrap-dark.scss +1 -1
  65. package/styles/image-editor/bootstrap.css +68 -1
  66. package/styles/image-editor/bootstrap.scss +1 -1
  67. package/styles/image-editor/bootstrap4.css +68 -1
  68. package/styles/image-editor/bootstrap4.scss +1 -1
  69. package/styles/image-editor/bootstrap5-dark.css +68 -1
  70. package/styles/image-editor/bootstrap5-dark.scss +1 -1
  71. package/styles/image-editor/bootstrap5.css +68 -1
  72. package/styles/image-editor/bootstrap5.scss +1 -1
  73. package/styles/image-editor/fabric-dark.css +68 -1
  74. package/styles/image-editor/fabric-dark.scss +1 -1
  75. package/styles/image-editor/fabric.css +68 -1
  76. package/styles/image-editor/fabric.scss +1 -1
  77. package/styles/image-editor/fluent-dark.css +68 -1
  78. package/styles/image-editor/fluent-dark.scss +1 -1
  79. package/styles/image-editor/fluent.css +68 -1
  80. package/styles/image-editor/fluent.scss +1 -1
  81. package/styles/image-editor/highcontrast-light.css +70 -3
  82. package/styles/image-editor/highcontrast-light.scss +1 -1
  83. package/styles/image-editor/highcontrast.css +69 -7
  84. package/styles/image-editor/highcontrast.scss +1 -1
  85. package/styles/image-editor/icons/_bootstrap-dark.scss +1 -0
  86. package/styles/image-editor/icons/_bootstrap.scss +1 -0
  87. package/styles/image-editor/icons/_bootstrap4.scss +1 -0
  88. package/styles/image-editor/icons/_bootstrap5.scss +1 -0
  89. package/styles/image-editor/icons/_fabric-dark.scss +1 -0
  90. package/styles/image-editor/icons/_fabric.scss +1 -0
  91. package/styles/image-editor/icons/_fluent.scss +1 -0
  92. package/styles/image-editor/icons/_fusionnew.scss +1 -0
  93. package/styles/image-editor/icons/_highcontrast-light.scss +1 -0
  94. package/styles/image-editor/icons/_highcontrast.scss +1 -0
  95. package/styles/image-editor/icons/_material-dark.scss +1 -0
  96. package/styles/image-editor/icons/_material.scss +1 -0
  97. package/styles/image-editor/icons/_material3.scss +1 -0
  98. package/styles/image-editor/icons/_tailwind.scss +1 -0
  99. package/styles/image-editor/material-dark.css +68 -2
  100. package/styles/image-editor/material-dark.scss +1 -1
  101. package/styles/image-editor/material.css +68 -2
  102. package/styles/image-editor/material.scss +1 -1
  103. package/styles/image-editor/material3-dark.css +73 -4
  104. package/styles/image-editor/material3-dark.scss +1 -1
  105. package/styles/image-editor/material3.css +73 -4
  106. package/styles/image-editor/material3.scss +1 -1
  107. package/styles/image-editor/tailwind-dark.css +68 -2
  108. package/styles/image-editor/tailwind-dark.scss +1 -1
  109. package/styles/image-editor/tailwind.css +68 -2
  110. package/styles/image-editor/tailwind.scss +1 -1
  111. package/styles/material-dark.css +68 -2
  112. package/styles/material.css +68 -2
  113. package/styles/material3-dark.css +73 -4
  114. package/styles/material3-dark.scss +1 -1
  115. package/styles/material3.css +73 -4
  116. package/styles/material3.scss +1 -1
  117. package/styles/tailwind-dark.css +68 -2
  118. package/styles/tailwind.css +68 -2
@@ -27,6 +27,7 @@ export declare class UndoRedo {
27
27
  private callRedo;
28
28
  private undo;
29
29
  private redo;
30
+ private imageFlip;
30
31
  private shapeTransform;
31
32
  private updateFreehandDraw;
32
33
  private updateFreehandDrawCustomized;
@@ -115,6 +115,9 @@ var UndoRedo = /** @class */ (function () {
115
115
  };
116
116
  UndoRedo.prototype.updateCurrUrc = function (type) {
117
117
  var parent = this.parent;
118
+ if (parent.isResize) {
119
+ return;
120
+ }
118
121
  if (!isBlazor()) {
119
122
  parent.notify('toolbar', { prop: 'setEnableDisableUndoRedo', value: { isPrevent: false } });
120
123
  }
@@ -133,7 +136,7 @@ var UndoRedo = /** @class */ (function () {
133
136
  prevObj.previousText = collection[0].previousText;
134
137
  }
135
138
  }
136
- else {
139
+ else if (prevObj.operation !== 'imageHFlip' && prevObj.operation !== 'imageVFlip') {
137
140
  prevObj.previousCropObj = this.appliedUndoRedoColl[this.appliedUndoRedoColl.length - 1].currentCropObj;
138
141
  prevObj.previousObj = this.appliedUndoRedoColl[this.appliedUndoRedoColl.length - 1].currentObj;
139
142
  prevObj.previousObjColl = this.appliedUndoRedoColl[this.appliedUndoRedoColl.length - 1].currentObjColl;
@@ -141,9 +144,11 @@ var UndoRedo = /** @class */ (function () {
141
144
  prevObj.previousText = this.appliedUndoRedoColl[this.appliedUndoRedoColl.length - 1].currentText;
142
145
  }
143
146
  if (prevObj) {
144
- var obj = this.getZeroZoomObjPointValue(prevObj.currentObjColl, prevObj.currentPointColl);
145
- prevObj.currentObjColl = obj['obj'];
146
- prevObj.currentPointColl = obj['point'];
147
+ if (prevObj.operation !== 'imageHFlip' && prevObj.operation !== 'imageVFlip') {
148
+ var obj = this.getZeroZoomObjPointValue(prevObj.currentObjColl, prevObj.currentPointColl);
149
+ prevObj.currentObjColl = obj['obj'];
150
+ prevObj.currentPointColl = obj['point'];
151
+ }
147
152
  this.appliedUndoRedoColl.push(prevObj);
148
153
  }
149
154
  this.tempUndoRedoColl = [];
@@ -280,11 +285,27 @@ var UndoRedo = /** @class */ (function () {
280
285
  parent.canvasFilter = this.lowerContext.filter;
281
286
  switch (obj.operation) {
282
287
  case 'shapeTransform':
288
+ case 'brightness':
289
+ case 'contrast':
290
+ case 'hue':
291
+ case 'saturation':
292
+ case 'opacity':
293
+ case 'blur':
294
+ case 'exposure':
295
+ case 'default':
296
+ case 'chrome':
297
+ case 'cold':
298
+ case 'warm':
299
+ case 'grayscale':
300
+ case 'blackandwhite':
301
+ case 'sepia':
302
+ case 'invert':
303
+ case 'sharpen':
283
304
  this.shapeTransform(obj.previousObjColl);
284
305
  break;
285
306
  case 'freehanddraw':
286
307
  case 'freehand-draw':
287
- this.updateFreehandDraw(obj.previousPointColl);
308
+ this.updateFreehandDraw(obj.previousPointColl, obj.previousSelPointColl);
288
309
  break;
289
310
  case 'freehanddrawCustomized':
290
311
  this.updateFreehandDrawCustomized(obj.previousPointColl);
@@ -299,6 +320,20 @@ var UndoRedo = /** @class */ (function () {
299
320
  case 'text':
300
321
  this.updateText(obj.previousObjColl, true);
301
322
  break;
323
+ case 'frame':
324
+ parent.transform.zoomFactor = parent.transform.defaultZoomFactor = obj.previousObj.defaultZoom;
325
+ parent.setProperties({ zoomSettings: { zoomFactor: obj.previousObj.zoomFactor } }, true);
326
+ parent.notify('transform', { prop: 'setPreviousZoomValue', onPropertyChange: false,
327
+ value: { previousZoomValue: parent.zoomSettings.zoomFactor } });
328
+ extend(parent.frameObj, obj.previousObj.frameObj);
329
+ parent.notify('draw', { prop: 'render-image', value: { isMouseWheel: true, isPreventClearRect: null, isFrame: true } });
330
+ break;
331
+ case 'imageHFlip':
332
+ this.imageFlip('horizontal', obj.previousObjColl);
333
+ break;
334
+ case 'imageVFlip':
335
+ this.imageFlip('vertical', obj.previousObjColl);
336
+ break;
302
337
  default:
303
338
  this.undoDefault(obj);
304
339
  parent.notify('filter', { prop: 'set-adjustment', value: { operation: obj.operation } });
@@ -320,6 +355,7 @@ var UndoRedo = /** @class */ (function () {
320
355
  parent.currSelectionPoint = null;
321
356
  }
322
357
  parent.notify('draw', { prop: 'performCancel', value: { isContextualToolbar: null } });
358
+ parent.currObjType.isActiveObj = false;
323
359
  }
324
360
  if ((this.undoRedoColl[this.undoRedoStep - 1]
325
361
  && this.undoRedoColl[this.undoRedoStep - 1].isCircleCrop)) {
@@ -366,11 +402,27 @@ var UndoRedo = /** @class */ (function () {
366
402
  var activeObj = void 0;
367
403
  switch (obj.operation) {
368
404
  case 'shapeTransform':
405
+ case 'brightness':
406
+ case 'contrast':
407
+ case 'hue':
408
+ case 'saturation':
409
+ case 'opacity':
410
+ case 'blur':
411
+ case 'exposure':
412
+ case 'default':
413
+ case 'chrome':
414
+ case 'cold':
415
+ case 'warm':
416
+ case 'grayscale':
417
+ case 'blackandwhite':
418
+ case 'sepia':
419
+ case 'invert':
420
+ case 'sharpen':
369
421
  this.shapeTransform(obj.currentObjColl);
370
422
  break;
371
423
  case 'freehanddraw':
372
424
  case 'freehand-draw':
373
- this.updateFreehandDraw(obj.currentPointColl);
425
+ this.updateFreehandDraw(obj.currentPointColl, obj.currentSelPointColl);
374
426
  break;
375
427
  case 'freehanddrawCustomized':
376
428
  this.updateFreehandDrawCustomized(obj.currentPointColl);
@@ -385,6 +437,16 @@ var UndoRedo = /** @class */ (function () {
385
437
  case 'text':
386
438
  this.updateText(obj.currentObjColl, false);
387
439
  break;
440
+ case 'frame':
441
+ extend(parent.frameObj, obj.currentObj.frameObj);
442
+ parent.notify('draw', { prop: 'render-image', value: { isMouseWheel: true, isPreventClearRect: null, isFrame: true } });
443
+ break;
444
+ case 'imageHFlip':
445
+ this.imageFlip('horizontal', obj.currentObjColl);
446
+ break;
447
+ case 'imageVFlip':
448
+ this.imageFlip('vertical', obj.currentObjColl);
449
+ break;
388
450
  default:
389
451
  parent.objColl = [];
390
452
  parent.pointColl = [];
@@ -431,6 +493,50 @@ var UndoRedo = /** @class */ (function () {
431
493
  }
432
494
  }
433
495
  };
496
+ UndoRedo.prototype.imageFlip = function (type, objColl) {
497
+ var parent = this.parent;
498
+ parent.objColl = extend([], objColl, [], true);
499
+ parent.activeObj = extend({}, parent.objColl[parent.objColl.length - 1], {}, true);
500
+ parent.objColl.pop();
501
+ if (parent.activeObj.shape && parent.activeObj.shape === 'image') {
502
+ if (type === 'horizontal') {
503
+ if (isNullOrUndefined(parent.activeObj.isHorImageFlip) && parent.activeObj.isVerImageFlip) {
504
+ parent.activeObj.isHorImageFlip = true;
505
+ parent.activeObj.isVerImageFlip = null;
506
+ parent.horizontalFlip(this.upperContext, true);
507
+ }
508
+ else {
509
+ if (isNullOrUndefined(parent.activeObj.isHorImageFlip) || !parent.activeObj.isHorImageFlip) {
510
+ parent.activeObj.isHorImageFlip = true;
511
+ }
512
+ else {
513
+ parent.activeObj.isHorImageFlip = null;
514
+ }
515
+ parent.horizontalFlip(this.upperContext, true);
516
+ }
517
+ }
518
+ else if (type === 'vertical') {
519
+ if (isNullOrUndefined(parent.activeObj.isVerImageFlip) && parent.activeObj.isHorImageFlip) {
520
+ parent.activeObj.isVerImageFlip = true;
521
+ parent.activeObj.isHorImageFlip = null;
522
+ parent.verticalFlip(this.upperContext, true);
523
+ }
524
+ else {
525
+ if (isNullOrUndefined(parent.activeObj.isVerImageFlip) || !parent.activeObj.isVerImageFlip) {
526
+ parent.activeObj.isVerImageFlip = true;
527
+ }
528
+ else {
529
+ parent.activeObj.isVerImageFlip = null;
530
+ }
531
+ parent.verticalFlip(this.upperContext, true);
532
+ }
533
+ }
534
+ parent.notify('shape', { prop: 'applyActObj', onPropertyChange: false, value: { isMouseDown: true } });
535
+ }
536
+ else {
537
+ parent.notify('draw', { prop: 'render-image', value: { isMouseWheel: true } });
538
+ }
539
+ };
434
540
  UndoRedo.prototype.shapeTransform = function (objColl) {
435
541
  var parent = this.parent;
436
542
  parent.objColl = extend([], objColl, [], true);
@@ -441,9 +547,11 @@ var UndoRedo = /** @class */ (function () {
441
547
  parent.notify('draw', { prop: 'redrawImgWithObj', onPropertyChange: false });
442
548
  parent.notify('shape', { prop: 'refreshActiveObj', onPropertyChange: false });
443
549
  };
444
- UndoRedo.prototype.updateFreehandDraw = function (pointColl) {
550
+ UndoRedo.prototype.updateFreehandDraw = function (pointColl, selPointColl) {
445
551
  var parent = this.parent;
446
552
  parent.pointColl = pointColl;
553
+ parent.notify('freehand-draw', { prop: 'setSelPointColl', onPropertyChange: false,
554
+ value: { obj: { selPointColl: selPointColl } } });
447
555
  parent.freehandCounter = parent.pointColl.length;
448
556
  parent.notify('freehand-draw', { prop: 'zoomFHDColl', onPropertyChange: false, value: { isPreventApply: null } });
449
557
  this.lowerContext.clearRect(0, 0, parent.lowerCanvas.width, parent.lowerCanvas.height);
@@ -591,6 +699,11 @@ var UndoRedo = /** @class */ (function () {
591
699
  };
592
700
  UndoRedo.prototype.endUndoRedo = function (operation, isUndo) {
593
701
  var parent = this.parent;
702
+ var frameObj = { type: 'none', color: '#fff', size: 20, inset: 20, offset: 20, radius: 0, amount: 1, border: 'solid', gradientColor: '' };
703
+ if (((parent.currSelectionPoint && parent.currSelectionPoint.shape === 'crop-circle') || parent.isCircleCrop) &&
704
+ JSON.stringify(parent.frameObj) !== JSON.stringify(frameObj)) {
705
+ parent.notify('draw', { prop: 'render-image', value: { isMouseWheel: true } });
706
+ }
594
707
  parent.notify('draw', { prop: 'clearOuterCanvas', onPropertyChange: false, value: { context: this.lowerContext } });
595
708
  if (parent.isCircleCrop && ((isUndo && operation !== 'crop') || !isUndo)) {
596
709
  parent.notify('crop', { prop: 'cropCircle', onPropertyChange: false,
@@ -632,6 +745,9 @@ var UndoRedo = /** @class */ (function () {
632
745
  };
633
746
  UndoRedo.prototype.updateUrc = function (operation, previousObj, previousObjColl, previousPointColl, previousSelPointColl, previousCropObj, previousText, currentText, previousFilter, isCircleCrop) {
634
747
  var parent = this.parent;
748
+ if (parent.isResize) {
749
+ return;
750
+ }
635
751
  var obj = { isInitialLoaded: false };
636
752
  if (parent.currObjType.isUndoAction) {
637
753
  this.refreshUrc(true);
@@ -651,6 +767,12 @@ var UndoRedo = /** @class */ (function () {
651
767
  if (operation === 'crop') {
652
768
  currentObj.currSelectionPoint = extend({}, parent.currSelectionPoint, {}, true);
653
769
  }
770
+ else if (operation === 'frame') {
771
+ previousObj.destPoints = { startX: parent.frameDestPoints.destLeft, startY: parent.frameDestPoints.destTop,
772
+ width: parent.frameDestPoints.destWidth, height: parent.frameDestPoints.destHeight };
773
+ currentObj.destPoints = { startX: parent.frameDestPoints.destLeft, startY: parent.frameDestPoints.destTop,
774
+ width: parent.frameDestPoints.destWidth, height: parent.frameDestPoints.destHeight };
775
+ }
654
776
  this.undoRedoColl.push({ operation: operation, previousObj: previousObj, currentObj: currentObj,
655
777
  previousObjColl: previousObjColl, currentObjColl: currentObj.objColl,
656
778
  previousPointColl: previousPointColl, currentPointColl: currentObj.pointColl,
@@ -659,8 +781,9 @@ var UndoRedo = /** @class */ (function () {
659
781
  previousText: previousText, currentText: currentText, filter: previousFilter, isCircleCrop: isCircleCrop });
660
782
  if (!isBlazor()) {
661
783
  parent.notify('toolbar', { prop: 'enable-disable-btns', onPropertyChange: false });
784
+ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
662
785
  }
663
- else {
786
+ else if (parent.currentToolbar !== 'pen-toolbar') {
664
787
  parent.updateToolbar(parent.element, 'enableDisableToolbarBtn');
665
788
  }
666
789
  }
@@ -749,11 +872,11 @@ var UndoRedo = /** @class */ (function () {
749
872
  var zoomSettings = extend({}, parent.zoomSettings, null, true);
750
873
  if (parent.transform.zoomFactor > 0) {
751
874
  parent.notify('transform', { prop: 'zoomAction', onPropertyChange: false,
752
- value: { zoomFactor: -parent.transform.zoomFactor, zoomPoint: null } });
875
+ value: { zoomFactor: -parent.transform.zoomFactor, zoomPoint: null, isResize: null } });
753
876
  }
754
877
  else {
755
878
  parent.notify('transform', { prop: 'zoomAction', onPropertyChange: false,
756
- value: { zoomFactor: Math.abs(parent.transform.zoomFactor), zoomPoint: null } });
879
+ value: { zoomFactor: Math.abs(parent.transform.zoomFactor), zoomPoint: null, isResize: null } });
757
880
  }
758
881
  parent.zoomSettings = zoomSettings;
759
882
  parent.isCropTab = false;
@@ -793,6 +916,11 @@ var UndoRedo = /** @class */ (function () {
793
916
  parent.notify('transform', { prop: 'drawPannedImage', onPropertyChange: false,
794
917
  value: { xDiff: 0, yDiff: 0 } });
795
918
  }
919
+ parent.notify('draw', { prop: 'clearOuterCanvas', onPropertyChange: false, value: { context: this.lowerContext } });
920
+ if (parent.isCircleCrop || (parent.currSelectionPoint && parent.currSelectionPoint.shape === 'crop-circle')) {
921
+ parent.notify('crop', { prop: 'cropCircle', onPropertyChange: false,
922
+ value: { context: this.lowerContext, isSave: null, isFlip: null } });
923
+ }
796
924
  }
797
925
  }
798
926
  return { obj: getZeroZoomObjColl, point: getZeroZoomPointColl };
@@ -41,7 +41,9 @@ export declare enum ShapeType {
41
41
  /** A text shape. */
42
42
  Text = "Text",
43
43
  /** A freehand drawing shape. */
44
- FreehandDraw = "FreehandDraw"
44
+ FreehandDraw = "FreehandDraw",
45
+ /** An Image shape. */
46
+ Image = "Image"
45
47
  }
46
48
  /**
47
49
  * An enumeration representing the different ways to trigger zooming in the image editor.
@@ -110,6 +112,7 @@ export declare enum ImageEditorCommand {
110
112
  Arrow = "Arrow",
111
113
  Path = "Path",
112
114
  Rectangle = "Rectangle",
115
+ Image = "Image",
113
116
  Ellipse = "Ellipse",
114
117
  Text = "Text",
115
118
  CustomSelection = "CustomSelection",
@@ -187,3 +190,37 @@ export declare enum ArrowheadType {
187
190
  /** Indicates a bar shaped arrowhead should be drawn. */
188
191
  Bar = "Bar"
189
192
  }
193
+ /**
194
+ * An enumeration of available frame options.
195
+ *
196
+ * @remarks
197
+ * These options can be used with the `drawFrame` method of the image editor control to draw frames on an image.
198
+ */
199
+ export declare enum FrameType {
200
+ /** Represents a no frame. */
201
+ None = "None",
202
+ /** Represents a mat frame. */
203
+ Mat = "Mat",
204
+ /** Represents a bevel frame. */
205
+ Bevel = "Bevel",
206
+ /** Represents a line frame. */
207
+ Line = "Line",
208
+ /** Represents an inset frame. */
209
+ Inset = "Inset",
210
+ /** Represents a hook frame. */
211
+ Hook = "Hook"
212
+ }
213
+ /**
214
+ * An enumeration of available line options.
215
+ *
216
+ * @remarks
217
+ * These options can be used with the `drawFrame` method of the image editor control to draw frames on an image.
218
+ */
219
+ export declare enum FrameLineStyle {
220
+ /** Represents a solid line. */
221
+ Solid = "Solid",
222
+ /** Represents a dashed line. */
223
+ Dashed = "Dashed",
224
+ /** Represents a dotted line. */
225
+ Dotted = "Dotted"
226
+ }
@@ -45,6 +45,8 @@ export var ShapeType;
45
45
  ShapeType["Text"] = "Text";
46
46
  /** A freehand drawing shape. */
47
47
  ShapeType["FreehandDraw"] = "FreehandDraw";
48
+ /** An Image shape. */
49
+ ShapeType["Image"] = "Image";
48
50
  })(ShapeType || (ShapeType = {}));
49
51
  /**
50
52
  * An enumeration representing the different ways to trigger zooming in the image editor.
@@ -116,6 +118,7 @@ export var ImageEditorCommand;
116
118
  ImageEditorCommand["Arrow"] = "Arrow";
117
119
  ImageEditorCommand["Path"] = "Path";
118
120
  ImageEditorCommand["Rectangle"] = "Rectangle";
121
+ ImageEditorCommand["Image"] = "Image";
119
122
  ImageEditorCommand["Ellipse"] = "Ellipse";
120
123
  ImageEditorCommand["Text"] = "Text";
121
124
  ImageEditorCommand["CustomSelection"] = "CustomSelection";
@@ -196,3 +199,39 @@ export var ArrowheadType;
196
199
  /** Indicates a bar shaped arrowhead should be drawn. */
197
200
  ArrowheadType["Bar"] = "Bar";
198
201
  })(ArrowheadType || (ArrowheadType = {}));
202
+ /**
203
+ * An enumeration of available frame options.
204
+ *
205
+ * @remarks
206
+ * These options can be used with the `drawFrame` method of the image editor control to draw frames on an image.
207
+ */
208
+ export var FrameType;
209
+ (function (FrameType) {
210
+ /** Represents a no frame. */
211
+ FrameType["None"] = "None";
212
+ /** Represents a mat frame. */
213
+ FrameType["Mat"] = "Mat";
214
+ /** Represents a bevel frame. */
215
+ FrameType["Bevel"] = "Bevel";
216
+ /** Represents a line frame. */
217
+ FrameType["Line"] = "Line";
218
+ /** Represents an inset frame. */
219
+ FrameType["Inset"] = "Inset";
220
+ /** Represents a hook frame. */
221
+ FrameType["Hook"] = "Hook";
222
+ })(FrameType || (FrameType = {}));
223
+ /**
224
+ * An enumeration of available line options.
225
+ *
226
+ * @remarks
227
+ * These options can be used with the `drawFrame` method of the image editor control to draw frames on an image.
228
+ */
229
+ export var FrameLineStyle;
230
+ (function (FrameLineStyle) {
231
+ /** Represents a solid line. */
232
+ FrameLineStyle["Solid"] = "Solid";
233
+ /** Represents a dashed line. */
234
+ FrameLineStyle["Dashed"] = "Dashed";
235
+ /** Represents a dotted line. */
236
+ FrameLineStyle["Dotted"] = "Dotted";
237
+ })(FrameLineStyle || (FrameLineStyle = {}));
@@ -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
  /**
@@ -261,7 +261,7 @@ export interface ImageEditorModel extends ComponentModel{
261
261
  * If the property is defined as empty collection, the toolbar will not be rendered.
262
262
  * The preconfigured toolbar commands are
263
263
  * - Crop: helps to crop an image as ellipse, square, various ratio aspects, custom selection with resize, drag and drop.
264
- * - Annotate: help to insert a shape on image that supports rectangle, ellipse, line, arrow, path, text and freehand drawing with resize, drag and drop, and customize its appearance.
264
+ * - Annotate: help to insert a shape on image that supports rectangle, ellipse, line, arrow, path, text, image and freehand drawing with resize, drag and drop, and customize its appearance.
265
265
  * - Transform: helps to rotate and flip an image.
266
266
  * - Finetunes: helps to perform adjustments on an image.
267
267
  * - Filters: helps to perform predefined color filters.
@@ -615,6 +615,13 @@ export interface ImageEditorModel extends ComponentModel{
615
615
  */
616
616
  quickAccessToolbarOpen?: EmitType<QuickAccessToolbarEventArgs>
617
617
 
618
+ /**
619
+ * Event callback that is raised while resizing an image.
620
+ *
621
+ * @event resizing
622
+ */
623
+ resizing?: EmitType<ResizeEventArgs>
624
+
618
625
  /**
619
626
  * Event callback that is raised once the quick access toolbar item is clicked.
620
627
  *
@@ -623,4 +630,11 @@ export interface ImageEditorModel extends ComponentModel{
623
630
  */
624
631
  quickAccessToolbarItemClick?: EmitType<ClickEventArgs>
625
632
 
633
+ /**
634
+ * Event callback that is raised while applying frames on an image.
635
+ *
636
+ * @event frameChange
637
+ */
638
+ frameChange?: EmitType<FrameChangeEventArgs>
639
+
626
640
  }