@syncfusion/ej2-image-editor 30.2.5 → 31.1.21

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 : 30.2.5
3
+ * version : 31.1.21
4
4
  * Copyright Syncfusion Inc. 2001 - 2024. 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": "30.2.5",
3
+ "version": "31.1.21",
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": "~30.2.4",
12
- "@syncfusion/ej2-buttons": "~30.2.4",
13
- "@syncfusion/ej2-dropdowns": "~30.2.5",
14
- "@syncfusion/ej2-inputs": "~30.2.4",
15
- "@syncfusion/ej2-navigations": "~30.2.5",
16
- "@syncfusion/ej2-popups": "~30.2.4",
17
- "@syncfusion/ej2-splitbuttons": "~30.2.4"
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"
18
18
  },
19
19
  "devDependencies": {},
20
20
  "keywords": [
@@ -65,8 +65,12 @@ var Export = /** @class */ (function () {
65
65
  type = type ? type : 'Png';
66
66
  parent.notify('shape', { prop: 'redrawActObj', onPropertyChange: false,
67
67
  value: { x: null, y: null, isMouseDown: null } });
68
+ var imageQualityObj = { currentImageQuality: 1 };
69
+ if (type.toLowerCase() === 'jpeg') {
70
+ parent.notify('toolbar', { prop: 'getcurrentImageQuality', onPropertyChange: false, value: { obj: imageQualityObj } });
71
+ }
68
72
  var beforeSave = { cancel: false, fileName: fileName ? fileName : imageName,
69
- fileType: type, imageQuality: imgQuality };
73
+ fileType: type, imageQuality: imgQuality || imageQualityObj['currentImageQuality'] };
70
74
  parent.trigger('beforeSave', beforeSave);
71
75
  this.beforeSaveEvent(beforeSave, type, fileName, imageName, imgQuality);
72
76
  }
@@ -1164,6 +1164,11 @@ var FreehandDrawing = /** @class */ (function () {
1164
1164
  var parent = this.parent;
1165
1165
  var point = parent.pointColl[this.fhdSelIdx];
1166
1166
  parent.trigger('shapeChanging', shapeChangingArgs);
1167
+ if (shapeChangingArgs.cancel) {
1168
+ parent.editCompleteArgs = shapeChangingArgs;
1169
+ this.cancelFhd();
1170
+ return;
1171
+ }
1167
1172
  if (parent.element.getAttribute('data-value') === 'mask-drawing' && !this.isMasking) {
1168
1173
  this.isMasking = true;
1169
1174
  parent.upperCanvas.style.cursor = 'crosshair';
@@ -3463,6 +3463,9 @@ var Selection = /** @class */ (function () {
3463
3463
  var objColl = extend([], parent.objColl, [], true);
3464
3464
  if (!isNullOrUndefined(obj['index']) && obj['index'] > -1) {
3465
3465
  parent.notify('freehand-draw', { prop: 'selectFhd', value: { type: 'ok' } });
3466
+ if (!this.isFhdPoint) {
3467
+ return;
3468
+ }
3466
3469
  parent.notify('freehand-draw', { prop: 'hoverFhd', onPropertyChange: false,
3467
3470
  value: { strokeColor: null, strokeWidth: null } });
3468
3471
  parent.notify('toolbar', { prop: 'renderQAT', onPropertyChange: false, value: { isPenEdit: true } });
@@ -4007,7 +4010,9 @@ var Selection = /** @class */ (function () {
4007
4010
  this.currentDrawingShape = parent.drawingShape.toLowerCase();
4008
4011
  if (dummyClick) {
4009
4012
  parent.enableShapeDrawing(parent.toPascalCase(parent.drawingShape), true);
4010
- parent.upperCanvas.style.cursor = 'crosshair';
4013
+ if (parent.cursor !== 'move') {
4014
+ parent.upperCanvas.style.cursor = 'crosshair';
4015
+ }
4011
4016
  }
4012
4017
  }
4013
4018
  parent.isShapeDrawing = false;
@@ -5029,7 +5034,14 @@ var Selection = /** @class */ (function () {
5029
5034
  }
5030
5035
  if (!this.isCropSelection && parent.activeObj.shape !== 'redact') {
5031
5036
  parent.trigger('shapeChanging', shapeChangingArgs);
5032
- this.shapeEvent(shapeChangingArgs);
5037
+ if (shapeChangingArgs.cancel) {
5038
+ parent.objColl.splice(i, 0, temp);
5039
+ parent.notify('shape', { prop: 'refreshActiveObj', onPropertyChange: false });
5040
+ parent.notify('draw', { prop: 'render-image', value: { isMouseWheel: null } });
5041
+ }
5042
+ else {
5043
+ this.shapeEvent(shapeChangingArgs);
5044
+ }
5033
5045
  parent.editCompleteArgs = shapeChangingArgs;
5034
5046
  }
5035
5047
  else {
@@ -87,15 +87,15 @@ var UndoRedo = /** @class */ (function () {
87
87
  this.updateUndoRedoStack();
88
88
  }
89
89
  break;
90
- case 'reset':
91
- this.reset();
92
- break;
93
90
  case 'preventEditComplete':
94
91
  args.value['obj']['bool'] = this.preventEditComplete;
95
92
  break;
96
93
  case 'preventApplyEditComplete':
97
94
  this.preventApplyEditComplete = args.value['bool'];
98
95
  break;
96
+ case 'reset':
97
+ this.reset();
98
+ break;
99
99
  }
100
100
  };
101
101
  UndoRedo.prototype.getModuleName = function () {
@@ -280,6 +280,9 @@ var ToolbarModule = /** @class */ (function () {
280
280
  case 'getToolbarHeight':
281
281
  args.value['obj']['toolbarHeight'] = this.toolbarHeight;
282
282
  break;
283
+ case 'getcurrentImageQuality':
284
+ args.value['obj']['currentImageQuality'] = this.currentQuality;
285
+ break;
283
286
  case 'setToolbarHeight':
284
287
  if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.length > 0 && parent.toolbar.indexOf('Open') > -1)) {
285
288
  this.toolbarHeight = args.value['height'];