@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.
@@ -6437,8 +6437,12 @@ var Export = /** @__PURE__ @class */ (function () {
6437
6437
  type = type ? type : 'Png';
6438
6438
  parent.notify('shape', { prop: 'redrawActObj', onPropertyChange: false,
6439
6439
  value: { x: null, y: null, isMouseDown: null } });
6440
+ var imageQualityObj = { currentImageQuality: 1 };
6441
+ if (type.toLowerCase() === 'jpeg') {
6442
+ parent.notify('toolbar', { prop: 'getcurrentImageQuality', onPropertyChange: false, value: { obj: imageQualityObj } });
6443
+ }
6440
6444
  var beforeSave = { cancel: false, fileName: fileName ? fileName : imageName,
6441
- fileType: type, imageQuality: imgQuality };
6445
+ fileType: type, imageQuality: imgQuality || imageQualityObj['currentImageQuality'] };
6442
6446
  parent.trigger('beforeSave', beforeSave);
6443
6447
  this.beforeSaveEvent(beforeSave, type, fileName, imageName, imgQuality);
6444
6448
  }
@@ -8952,6 +8956,11 @@ var FreehandDrawing = /** @__PURE__ @class */ (function () {
8952
8956
  var parent = this.parent;
8953
8957
  var point = parent.pointColl[this.fhdSelIdx];
8954
8958
  parent.trigger('shapeChanging', shapeChangingArgs);
8959
+ if (shapeChangingArgs.cancel) {
8960
+ parent.editCompleteArgs = shapeChangingArgs;
8961
+ this.cancelFhd();
8962
+ return;
8963
+ }
8955
8964
  if (parent.element.getAttribute('data-value') === 'mask-drawing' && !this.isMasking) {
8956
8965
  this.isMasking = true;
8957
8966
  parent.upperCanvas.style.cursor = 'crosshair';
@@ -12476,6 +12485,9 @@ var Selection = /** @__PURE__ @class */ (function () {
12476
12485
  var objColl = extend([], parent.objColl, [], true);
12477
12486
  if (!isNullOrUndefined(obj['index']) && obj['index'] > -1) {
12478
12487
  parent.notify('freehand-draw', { prop: 'selectFhd', value: { type: 'ok' } });
12488
+ if (!this.isFhdPoint) {
12489
+ return;
12490
+ }
12479
12491
  parent.notify('freehand-draw', { prop: 'hoverFhd', onPropertyChange: false,
12480
12492
  value: { strokeColor: null, strokeWidth: null } });
12481
12493
  parent.notify('toolbar', { prop: 'renderQAT', onPropertyChange: false, value: { isPenEdit: true } });
@@ -13020,7 +13032,9 @@ var Selection = /** @__PURE__ @class */ (function () {
13020
13032
  this.currentDrawingShape = parent.drawingShape.toLowerCase();
13021
13033
  if (dummyClick) {
13022
13034
  parent.enableShapeDrawing(parent.toPascalCase(parent.drawingShape), true);
13023
- parent.upperCanvas.style.cursor = 'crosshair';
13035
+ if (parent.cursor !== 'move') {
13036
+ parent.upperCanvas.style.cursor = 'crosshair';
13037
+ }
13024
13038
  }
13025
13039
  }
13026
13040
  parent.isShapeDrawing = false;
@@ -14042,7 +14056,14 @@ var Selection = /** @__PURE__ @class */ (function () {
14042
14056
  }
14043
14057
  if (!this.isCropSelection && parent.activeObj.shape !== 'redact') {
14044
14058
  parent.trigger('shapeChanging', shapeChangingArgs);
14045
- this.shapeEvent(shapeChangingArgs);
14059
+ if (shapeChangingArgs.cancel) {
14060
+ parent.objColl.splice(i, 0, temp);
14061
+ parent.notify('shape', { prop: 'refreshActiveObj', onPropertyChange: false });
14062
+ parent.notify('draw', { prop: 'render-image', value: { isMouseWheel: null } });
14063
+ }
14064
+ else {
14065
+ this.shapeEvent(shapeChangingArgs);
14066
+ }
14046
14067
  parent.editCompleteArgs = shapeChangingArgs;
14047
14068
  }
14048
14069
  else {
@@ -21286,15 +21307,15 @@ var UndoRedo = /** @__PURE__ @class */ (function () {
21286
21307
  this.updateUndoRedoStack();
21287
21308
  }
21288
21309
  break;
21289
- case 'reset':
21290
- this.reset();
21291
- break;
21292
21310
  case 'preventEditComplete':
21293
21311
  args.value['obj']['bool'] = this.preventEditComplete;
21294
21312
  break;
21295
21313
  case 'preventApplyEditComplete':
21296
21314
  this.preventApplyEditComplete = args.value['bool'];
21297
21315
  break;
21316
+ case 'reset':
21317
+ this.reset();
21318
+ break;
21298
21319
  }
21299
21320
  };
21300
21321
  UndoRedo.prototype.getModuleName = function () {
@@ -27978,6 +27999,9 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
27978
27999
  case 'getToolbarHeight':
27979
28000
  args.value['obj']['toolbarHeight'] = this.toolbarHeight;
27980
28001
  break;
28002
+ case 'getcurrentImageQuality':
28003
+ args.value['obj']['currentImageQuality'] = this.currentQuality;
28004
+ break;
27981
28005
  case 'setToolbarHeight':
27982
28006
  if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.length > 0 && parent.toolbar.indexOf('Open') > -1)) {
27983
28007
  this.toolbarHeight = args.value['height'];