@syncfusion/ej2-image-editor 30.2.5 → 31.1.17

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 (51) hide show
  1. package/dist/ej2-image-editor.umd.min.js +2 -2
  2. package/dist/ej2-image-editor.umd.min.js.map +1 -1
  3. package/dist/es6/ej2-image-editor.es2015.js +7 -39
  4. package/dist/es6/ej2-image-editor.es2015.js.map +1 -1
  5. package/dist/es6/ej2-image-editor.es5.js +7 -39
  6. package/dist/es6/ej2-image-editor.es5.js.map +1 -1
  7. package/dist/global/ej2-image-editor.min.js +2 -2
  8. package/dist/global/ej2-image-editor.min.js.map +1 -1
  9. package/dist/global/index.d.ts +1 -1
  10. package/dist/ts/image-editor/action/crop.d.ts +44 -0
  11. package/dist/ts/image-editor/action/crop.ts +867 -0
  12. package/dist/ts/image-editor/action/draw.d.ts +187 -0
  13. package/dist/ts/image-editor/action/draw.ts +4924 -0
  14. package/dist/ts/image-editor/action/export.d.ts +29 -0
  15. package/dist/ts/image-editor/action/export.ts +509 -0
  16. package/dist/ts/image-editor/action/filter.d.ts +48 -0
  17. package/dist/ts/image-editor/action/filter.ts +872 -0
  18. package/dist/ts/image-editor/action/freehand-draw.d.ts +68 -0
  19. package/dist/ts/image-editor/action/freehand-draw.ts +1135 -0
  20. package/dist/ts/image-editor/action/index.d.ts +9 -0
  21. package/dist/ts/image-editor/action/index.ts +9 -0
  22. package/dist/ts/image-editor/action/selection.d.ts +178 -0
  23. package/dist/ts/image-editor/action/selection.ts +5241 -0
  24. package/dist/ts/image-editor/action/shape.d.ts +130 -0
  25. package/dist/ts/image-editor/action/shape.ts +3917 -0
  26. package/dist/ts/image-editor/action/transform.d.ts +77 -0
  27. package/dist/ts/image-editor/action/transform.ts +2008 -0
  28. package/dist/ts/image-editor/action/undo-redo.d.ts +52 -0
  29. package/dist/ts/image-editor/action/undo-redo.ts +1169 -0
  30. package/dist/ts/image-editor/base/enum.d.ts +277 -0
  31. package/dist/ts/image-editor/base/enum.ts +288 -0
  32. package/dist/ts/image-editor/base/image-editor-model.d.ts +770 -0
  33. package/dist/ts/image-editor/base/image-editor.d.ts +1928 -0
  34. package/dist/ts/image-editor/base/image-editor.ts +5496 -0
  35. package/dist/ts/image-editor/base/index.d.ts +4 -0
  36. package/dist/ts/image-editor/base/index.ts +4 -0
  37. package/dist/ts/image-editor/base/interface.d.ts +1637 -0
  38. package/dist/ts/image-editor/base/interface.ts +1709 -0
  39. package/dist/ts/image-editor/index.d.ts +3 -0
  40. package/dist/ts/image-editor/index.ts +3 -0
  41. package/dist/ts/image-editor/renderer/index.d.ts +1 -0
  42. package/dist/ts/image-editor/renderer/index.ts +1 -0
  43. package/dist/ts/image-editor/renderer/toolbar.d.ts +171 -0
  44. package/dist/ts/image-editor/renderer/toolbar.ts +6356 -0
  45. package/dist/ts/index.d.ts +4 -0
  46. package/dist/ts/index.ts +4 -0
  47. package/package.json +47 -15
  48. package/src/image-editor/action/export.js +1 -1
  49. package/src/image-editor/action/freehand-draw.d.ts +0 -1
  50. package/src/image-editor/action/freehand-draw.js +3 -25
  51. package/src/image-editor/action/undo-redo.js +3 -13
@@ -6454,7 +6454,7 @@ var Export = /** @__PURE__ @class */ (function () {
6454
6454
  this.toSVGImg(fileName);
6455
6455
  }
6456
6456
  else {
6457
- this.toBlobFn(fileName, lowerCaseType, observableSaveArgs.imageQuality || imgQuality);
6457
+ this.toBlobFn(fileName, lowerCaseType, imgQuality);
6458
6458
  }
6459
6459
  var saved = { fileName: fileName ? fileName : imageName, fileType: type };
6460
6460
  parent.trigger('saved', saved);
@@ -7937,15 +7937,6 @@ var FreehandDrawing = /** @__PURE__ @class */ (function () {
7937
7937
  case 'resetFreehandDrawSelectedId':
7938
7938
  this.fhdSelID = null;
7939
7939
  break;
7940
- case 'getFHDSelected':
7941
- args.value['obj']['isSelected'] = (this.parent.pointColl[this.fhdSelIdx] && this.parent.pointColl[this.fhdSelIdx].isSelected) ? this.parent.pointColl[this.fhdSelIdx].isSelected : false;
7942
- break;
7943
- case 'resetFHDIdx':
7944
- this.fhdHovIdx = this.fhdSelID = this.fhdSelIdx = null;
7945
- break;
7946
- case 'getHighestOrder':
7947
- this.getHighestOrder();
7948
- break;
7949
7940
  case 'getTempFreeHandDrawEditingStyles':
7950
7941
  args.value['obj']['tempFreeHandDrawEditingStyles'] = this.tempFHDStyles;
7951
7942
  break;
@@ -8128,11 +8119,10 @@ var FreehandDrawing = /** @__PURE__ @class */ (function () {
8128
8119
  parent.notify('freehand-draw', { prop: 'getSelPointColl', onPropertyChange: false, value: { obj: selPointCollObj } });
8129
8120
  prevObj.selPointColl = extend([], selPointCollObj['selPointColl'], [], true);
8130
8121
  var fhCnt = parent.freehandCounter;
8131
- var penIndex = this.getHighestOrder();
8132
- var order = parent.objColl.length + penIndex + 1;
8122
+ var order = parent.objColl.length + parent.freehandCounter + 1;
8133
8123
  parent.pointColl[fhCnt] = { points: extend([], parent.points), strokeColor: parent.activeObj.strokeSettings.strokeColor,
8134
8124
  strokeWidth: this.penStrokeWidth, flipState: parent.transform.currFlipState,
8135
- id: 'pen_' + (penIndex + 1), order: order };
8125
+ id: 'pen_' + (this.currFHDIdx + 1), order: order };
8136
8126
  parent.points = [];
8137
8127
  this.dummyPoints = [];
8138
8128
  this.selPointColl[fhCnt] = { points: extend([], this.selPoints) };
@@ -8147,7 +8137,7 @@ var FreehandDrawing = /** @__PURE__ @class */ (function () {
8147
8137
  previousCropObj: prevCropObj, previousText: null,
8148
8138
  currentText: null, previousFilter: null, isCircleCrop: null } });
8149
8139
  }
8150
- var shapeSettings = { id: 'pen_' + (penIndex + 1), type: ShapeType.FreehandDraw,
8140
+ var shapeSettings = { id: 'pen_' + (this.currFHDIdx + 1), type: ShapeType.FreehandDraw,
8151
8141
  startX: this.freehandDownPoint.x, startY: this.freehandDownPoint.y,
8152
8142
  strokeColor: parent.activeObj.strokeSettings.strokeColor, strokeWidth: this.penStrokeWidth,
8153
8143
  points: parent.pointColl[this.currFHDIdx].points, index: order };
@@ -8156,17 +8146,6 @@ var FreehandDrawing = /** @__PURE__ @class */ (function () {
8156
8146
  this.triggerShapeChanging(shapeChangingArgs);
8157
8147
  this.currFHDIdx++;
8158
8148
  };
8159
- FreehandDrawing.prototype.getHighestOrder = function () {
8160
- var parent = this.parent;
8161
- var index = 0;
8162
- for (var i = 0; i < parent.pointColl.length; i++) {
8163
- var value = parseInt(parent.pointColl[i].id.split('_')[1], 10);
8164
- if (index < value) {
8165
- index = value;
8166
- }
8167
- }
8168
- return index;
8169
- };
8170
8149
  FreehandDrawing.prototype.freehandMoveHandler = function (e) {
8171
8150
  this.isFreehandPointMoved = true;
8172
8151
  var rect = this.parent.upperCanvas.getBoundingClientRect();
@@ -8555,7 +8534,6 @@ var FreehandDrawing = /** @__PURE__ @class */ (function () {
8555
8534
  }
8556
8535
  parent.freehandCounter -= 1;
8557
8536
  this.fhdHovIdx = this.fhdSelIdx = null;
8558
- this.currFHDIdx--;
8559
8537
  parent.notify('selection', { prop: 'resetFreehandDrawVariables' });
8560
8538
  parent.notify('draw', { prop: 'render-image', value: { isMouseWheel: null } });
8561
8539
  parent.notify('toolbar', { prop: 'refresh-main-toolbar', onPropertyChange: false });
@@ -21286,15 +21264,15 @@ var UndoRedo = /** @__PURE__ @class */ (function () {
21286
21264
  this.updateUndoRedoStack();
21287
21265
  }
21288
21266
  break;
21289
- case 'reset':
21290
- this.reset();
21291
- break;
21292
21267
  case 'preventEditComplete':
21293
21268
  args.value['obj']['bool'] = this.preventEditComplete;
21294
21269
  break;
21295
21270
  case 'preventApplyEditComplete':
21296
21271
  this.preventApplyEditComplete = args.value['bool'];
21297
21272
  break;
21273
+ case 'reset':
21274
+ this.reset();
21275
+ break;
21298
21276
  }
21299
21277
  };
21300
21278
  UndoRedo.prototype.getModuleName = function () {
@@ -21558,12 +21536,6 @@ var UndoRedo = /** @__PURE__ @class */ (function () {
21558
21536
  parent.initialAdjustmentValue = this.lowerContext.filter;
21559
21537
  parent.notify('filter', { prop: 'setBevelFilter', onPropertyChange: false, value: { bevelFilter: this.lowerContext.filter } });
21560
21538
  var editCompleteArgs = { action: this.getUndoRedoAction(obj.operation) };
21561
- var isSelected = void 0;
21562
- if (obj.operation === 'freehanddraw' || obj.operation === 'freehand-draw') {
21563
- var object = { isSelected: null };
21564
- parent.notify('freehand-draw', { prop: 'getFHDSelected', onPropertyChange: false, value: { obj: object } });
21565
- isSelected = object['isSelected'];
21566
- }
21567
21539
  switch (obj.operation) {
21568
21540
  case 'shapeTransform':
21569
21541
  case 'brightness':
@@ -21591,10 +21563,6 @@ var UndoRedo = /** @__PURE__ @class */ (function () {
21591
21563
  this.updateFreehandDraw(obj.previousPointColl, obj.previousSelPointColl);
21592
21564
  parent.notify('freehand-draw', { prop: 'setCurrentFreehandDrawIndex',
21593
21565
  value: { value: parent.pointColl.length } });
21594
- if (isSelected) {
21595
- parent.notify('freehand-draw', { prop: 'resetFHDIdx' });
21596
- parent.notify('selection', { prop: 'resetFreehandDrawVariables' });
21597
- }
21598
21566
  break;
21599
21567
  case 'freehanddrawCustomized':
21600
21568
  this.updateFreehandDrawCustomized(obj.previousObjColl, obj.previousPointColl);