@syncfusion/ej2-image-editor 20.3.50 → 20.3.56

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,4 +1,4 @@
1
- import { Browser, Event, EventHandler, L10n, NotifyPropertyChanges, Property, addClass, compile, extend, getComponent, getInstance, getUniqueID, isNullOrUndefined, removeClass } from '@syncfusion/ej2-base';
1
+ import { Browser, Event, EventHandler, L10n, NotifyPropertyChanges, Property, addClass, compile, detach, extend, getComponent, getInstance, getUniqueID, isNullOrUndefined, removeClass, select } from '@syncfusion/ej2-base';
2
2
  import { ColorPicker, SignatureBase, Uploader } from '@syncfusion/ej2-inputs';
3
3
  import { Toolbar } from '@syncfusion/ej2-navigations';
4
4
  import { DropDownButton } from '@syncfusion/ej2-splitbuttons';
@@ -244,6 +244,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends SignatureBase {
244
244
  if (!this.element.getAttribute('class')) {
245
245
  this.element.removeAttribute('class');
246
246
  }
247
+ this.destroySubComponents();
247
248
  this.unwireEvent();
248
249
  super.destroy();
249
250
  this.element.innerHTML = '';
@@ -310,6 +311,27 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends SignatureBase {
310
311
  EventHandler.remove(this.lowerCanvas, 'mouseup', this.canvasMouseUpHandler);
311
312
  EventHandler.remove(document, 'mouseup', this.canvasMouseUpHandler);
312
313
  }
314
+ destroySubComponents() {
315
+ const inputElement = this.element.querySelectorAll('input.e-control');
316
+ const divElement = this.element.querySelectorAll('div.e-control:not(.e-handle)');
317
+ const btnElement = this.element.querySelectorAll('button.e-control');
318
+ for (let i = 0, len = inputElement.length; i < len; i++) {
319
+ if (inputElement[i].classList.contains('e-color-picker')) {
320
+ getComponent(inputElement[i], 'color-picker').destroy();
321
+ detach(select('input#' + inputElement[i].id, this.element));
322
+ }
323
+ }
324
+ for (let i = 0, len = btnElement.length; i < len; i++) {
325
+ if (btnElement[i].classList.contains('e-dropdown-btn')) {
326
+ getComponent(btnElement[i], 'dropdown-btn').destroy();
327
+ detach(select('button#' + btnElement[i].id, this.element));
328
+ }
329
+ else if (btnElement[i].classList.contains('e-btn')) {
330
+ getComponent(btnElement[i], 'btn').destroy();
331
+ detach(select('button#' + btnElement[i].id, this.element));
332
+ }
333
+ }
334
+ }
313
335
  updateTheme() {
314
336
  if (this.theme !== '') {
315
337
  this.theme = this.toPascalCase(this.theme);
@@ -1029,7 +1051,9 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends SignatureBase {
1029
1051
  args.element.parentElement.offsetHeight + 'px';
1030
1052
  }
1031
1053
  const activeBtn = spanElem.innerHTML;
1032
- args.element.querySelector('[aria-label = ' + '"' + activeBtn + '"' + ']').classList.add('e-selected-btn');
1054
+ if (activeBtn !== '') {
1055
+ args.element.querySelector('[aria-label = ' + '"' + activeBtn + '"' + ']').classList.add('e-selected-btn');
1056
+ }
1033
1057
  },
1034
1058
  select: (args) => {
1035
1059
  spanElem.textContent = args.item.text;
@@ -1641,75 +1665,9 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends SignatureBase {
1641
1665
  }
1642
1666
  this.callMainToolbar(false);
1643
1667
  break;
1644
- case 'text':
1645
- this.currObjType.isCustomCrop = false;
1646
- imageEditorObj.drawShapeText();
1647
- this.refreshToolbar(type);
1648
- break;
1649
- case 'pen':
1650
- this.currObjType.isCustomCrop = false;
1651
- this.freeHandDraw(true);
1652
- this.refreshToolbar(type);
1653
- break;
1654
1668
  case 'reset':
1655
1669
  imageEditorObj.reset();
1656
1670
  break;
1657
- case 'load':
1658
- break;
1659
- case 'save':
1660
- break;
1661
- case 'select':
1662
- break;
1663
- case 'bold':
1664
- this.currObjType.isCustomCrop = false;
1665
- if (!this.isBoldbtn) {
1666
- this.activeObj.textSettings.bold = true;
1667
- this.isBoldbtn = true;
1668
- this.redrawText(ratio);
1669
- }
1670
- else {
1671
- this.activeObj.textSettings.bold = false;
1672
- this.isBoldbtn = false;
1673
- this.redrawText(ratio);
1674
- }
1675
- break;
1676
- case 'italic':
1677
- this.currObjType.isCustomCrop = false;
1678
- if (!this.isItalicbtn) {
1679
- this.activeObj.textSettings.italic = true;
1680
- if (this.activeObj.textSettings.bold) {
1681
- this.upperContext.font = 'italic bold ' + this.activeObj.textSettings.fontSize + 'px' +
1682
- ' ' + this.activeObj.textSettings.fontFamily;
1683
- }
1684
- else {
1685
- this.upperContext.font = 'italic ' + this.activeObj.textSettings.fontSize + 'px' + ' ' +
1686
- this.activeObj.textSettings.fontFamily;
1687
- }
1688
- const width = this.upperContext.measureText(this.activeObj.keyHistory).width +
1689
- this.activeObj.textSettings.fontSize * 0.5;
1690
- const height = this.activeObj.textSettings.fontSize + this.activeObj.textSettings.fontSize * 0.25;
1691
- this.setTextSelection(width, height);
1692
- this.updateActiveObject(ratio, this.activeObj.activePoint, this.activeObj);
1693
- this.redrawShape(this.activeObj);
1694
- this.isItalicbtn = true;
1695
- }
1696
- else {
1697
- this.activeObj.textSettings.italic = false;
1698
- if (this.activeObj.textSettings.bold) {
1699
- this.upperContext.font = 'bold ' + this.activeObj.textSettings.fontSize + 'px' + ' ' + this.activeObj.textSettings.fontFamily;
1700
- }
1701
- else {
1702
- this.upperContext.font = this.activeObj.textSettings.fontSize + 'px' + ' ' + this.activeObj.textSettings.fontFamily;
1703
- }
1704
- const width = this.upperContext.measureText(this.activeObj.keyHistory).width +
1705
- this.activeObj.textSettings.fontSize * 0.5;
1706
- const height = this.activeObj.textSettings.fontSize + this.activeObj.textSettings.fontSize * 0.25;
1707
- this.setTextSelection(width, height);
1708
- this.updateActiveObject(ratio, this.activeObj.activePoint, this.activeObj);
1709
- this.redrawShape(this.activeObj);
1710
- this.isItalicbtn = false;
1711
- }
1712
- break;
1713
1671
  }
1714
1672
  }
1715
1673
  this.trigger('toolbarItemClicked', args);
@@ -2892,7 +2850,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends SignatureBase {
2892
2850
  // eslint-disable-next-line @typescript-eslint/no-this-alias
2893
2851
  const proxy = this;
2894
2852
  /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
2895
- let xform = new DOMMatrix();
2853
+ let xform = new DOMMatrix([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]);
2896
2854
  ctx.getTransform = () => {
2897
2855
  return xform;
2898
2856
  };
@@ -2933,7 +2891,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends SignatureBase {
2933
2891
  const transform = ctx.transform;
2934
2892
  ctx.transform = (a, b, c, d, e, f) => {
2935
2893
  /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
2936
- const m2 = new DOMMatrix();
2894
+ const m2 = new DOMMatrix([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]);
2937
2895
  m2.a = a;
2938
2896
  m2.b = b;
2939
2897
  m2.c = c;
@@ -6061,22 +6019,6 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends SignatureBase {
6061
6019
  this.updateActiveObject(ratio, this.objColl[i].activePoint, this.objColl[i]);
6062
6020
  }
6063
6021
  }
6064
- else if (degree === 'zoom') {
6065
- for (let i = 0; i < this.objColl.length; i++) {
6066
- this.objColl[i].activePoint.startX /= ratio.width;
6067
- this.objColl[i].activePoint.startY /= ratio.height;
6068
- this.objColl[i].activePoint.endX /= ratio.width;
6069
- this.objColl[i].activePoint.endY /= ratio.height;
6070
- this.objColl[i].activePoint.height = this.objColl[i].activePoint.endX - this.objColl[i].activePoint.startX;
6071
- this.objColl[i].activePoint.width = this.objColl[i].activePoint.endY - this.objColl[i].activePoint.startY;
6072
- this.objColl[i].activePoint.startX *= ratio.width;
6073
- this.objColl[i].activePoint.startY *= ratio.height;
6074
- this.objColl[i].activePoint.endX *= ratio.width;
6075
- this.objColl[i].activePoint.endY *= ratio.height;
6076
- this.objColl[i].activePoint.width = this.objColl[i].activePoint.endX - this.objColl[i].activePoint.startX;
6077
- this.objColl[i].activePoint.height = this.objColl[i].activePoint.endY - this.objColl[i].activePoint.startY;
6078
- }
6079
- }
6080
6022
  }
6081
6023
  calcCurrPoints(degree, obj) {
6082
6024
  const oldRatio = this.calcPrevRatio();
@@ -6412,6 +6354,51 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends SignatureBase {
6412
6354
  }
6413
6355
  return inRange;
6414
6356
  }
6357
+ rotateMultiple(length, degree) {
6358
+ for (let i = 0; i < length; i++) {
6359
+ if (degree > 0) {
6360
+ this.degree += 90;
6361
+ }
6362
+ else {
6363
+ this.degree -= 90;
6364
+ }
6365
+ if (this.degree === 360) {
6366
+ this.degree = 0;
6367
+ }
6368
+ this.lowerContext.save();
6369
+ this.setMaximumDimension(90 * (i + 1));
6370
+ this.lowerContext.translate(this.lowerCanvas.width / 2, this.lowerCanvas.height / 2);
6371
+ if (degree > 0) {
6372
+ this.lowerContext.rotate(Math.PI / 180 * 90);
6373
+ }
6374
+ else {
6375
+ this.lowerContext.rotate(Math.PI / 180 * -90);
6376
+ }
6377
+ this.lowerCanvas.style.left = this.upperCanvas.style.left = (this.element.clientWidth - parseInt(this.lowerCanvas.style.maxWidth, 10) - 18) / 2 + 1 + 'px';
6378
+ this.lowerCanvas.style.top = this.upperCanvas.style.top = (this.element.clientHeight - this.toolbarHeight - parseInt(this.lowerCanvas.style.maxHeight, 10)) / 2 + 1 + 'px';
6379
+ this.lowerContext.drawImage(this.inMemoryCanvas, -this.lowerCanvas.height / 2, -this.lowerCanvas.width / 2);
6380
+ if (degree > 0) {
6381
+ this.lowerContext.rotate(Math.PI / 180 * -90);
6382
+ }
6383
+ else {
6384
+ this.lowerContext.rotate(Math.PI / 180 * 90);
6385
+ }
6386
+ this.lowerContext.translate(-this.lowerCanvas.width / 2, -this.lowerCanvas.height / 2);
6387
+ this.lowerContext.restore();
6388
+ this.currImgData = this.lowerContext.getImageData(0, 0, this.lowerCanvas.width, this.lowerCanvas.height);
6389
+ this.inMemoryContext.clearRect(0, 0, this.lowerCanvas.width, this.lowerCanvas.height);
6390
+ this.inMemoryCanvas.width = this.currImgData.width;
6391
+ this.inMemoryCanvas.height = this.currImgData.height;
6392
+ this.inMemoryContext.putImageData(this.currImgData, 0, 0);
6393
+ this.lowerContext.drawImage(this.inMemoryCanvas, 0, 0);
6394
+ if (degree > 0) {
6395
+ this.redrawObj(90);
6396
+ }
6397
+ else {
6398
+ this.redrawObj(-90);
6399
+ }
6400
+ }
6401
+ }
6415
6402
  /**
6416
6403
  * Clear a current selection.
6417
6404
  *
@@ -6860,8 +6847,6 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends SignatureBase {
6860
6847
  isRotate = true;
6861
6848
  const transitionArgs = { degree: degree };
6862
6849
  this.trigger('rotating', transitionArgs);
6863
- this.rotateMethod = true;
6864
- this.lastAction = 'rotate';
6865
6850
  let splitWords = [];
6866
6851
  let activeObjShape;
6867
6852
  if (!isNullOrUndefined(this.activeObj.activePoint)) {
@@ -6873,32 +6858,40 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends SignatureBase {
6873
6858
  }
6874
6859
  }
6875
6860
  this.redrawActObj();
6861
+ const factor = this.factor;
6876
6862
  if (this.factor !== 1) {
6877
6863
  this.lowerContext.setTransform(1, 0, 0, 1, 0, 0);
6878
6864
  this.upperContext.setTransform(1, 0, 0, 1, 0, 0);
6879
6865
  this.factor = 1;
6880
6866
  this.refreshToolbar('main');
6881
6867
  }
6882
- this.degree += degree;
6883
- if (this.degree === 360) {
6884
- this.degree = 0;
6868
+ const length = Math.abs(degree / 90);
6869
+ if (length > 1) {
6870
+ this.rotateMultiple(length, degree);
6871
+ }
6872
+ else {
6873
+ this.degree += degree;
6874
+ if (this.degree === 360) {
6875
+ this.degree = 0;
6876
+ }
6877
+ this.lowerContext.save();
6878
+ this.setMaximumDimension(this.degree);
6879
+ this.lowerContext.translate(this.lowerCanvas.width / 2, this.lowerCanvas.height / 2);
6880
+ this.lowerContext.rotate(Math.PI / 180 * degree);
6881
+ this.lowerCanvas.style.left = this.upperCanvas.style.left = (this.element.clientWidth - parseInt(this.lowerCanvas.style.maxWidth, 10) - 18) / 2 + 1 + 'px';
6882
+ this.lowerCanvas.style.top = this.upperCanvas.style.top = (this.element.clientHeight - this.toolbarHeight - parseInt(this.lowerCanvas.style.maxHeight, 10)) / 2 + 1 + 'px';
6883
+ this.lowerContext.drawImage(this.inMemoryCanvas, -this.lowerCanvas.height / 2, -this.lowerCanvas.width / 2);
6884
+ this.lowerContext.rotate(Math.PI / 180 * -degree);
6885
+ this.lowerContext.translate(-this.lowerCanvas.width / 2, -this.lowerCanvas.height / 2);
6886
+ this.lowerContext.restore();
6887
+ this.currImgData = this.lowerContext.getImageData(0, 0, this.lowerCanvas.width, this.lowerCanvas.height);
6888
+ this.inMemoryContext.clearRect(0, 0, this.lowerCanvas.width, this.lowerCanvas.height);
6889
+ this.inMemoryCanvas.width = this.currImgData.width;
6890
+ this.inMemoryCanvas.height = this.currImgData.height;
6891
+ this.inMemoryContext.putImageData(this.currImgData, 0, 0);
6892
+ this.lowerContext.drawImage(this.inMemoryCanvas, 0, 0);
6893
+ this.redrawObj(degree);
6885
6894
  }
6886
- this.lowerContext.save();
6887
- this.setMaximumDimension(this.degree);
6888
- this.lowerContext.translate(this.lowerCanvas.width / 2, this.lowerCanvas.height / 2);
6889
- this.lowerContext.rotate(Math.PI / 180 * degree);
6890
- this.lowerCanvas.style.left = this.upperCanvas.style.left = (this.element.clientWidth - parseInt(this.lowerCanvas.style.maxWidth, 10) - 18) / 2 + 1 + 'px';
6891
- this.lowerCanvas.style.top = this.upperCanvas.style.top = (this.element.clientHeight - this.toolbarHeight - parseInt(this.lowerCanvas.style.maxHeight, 10)) / 2 + 1 + 'px';
6892
- this.lowerContext.drawImage(this.inMemoryCanvas, -this.lowerCanvas.height / 2, -this.lowerCanvas.width / 2);
6893
- this.lowerContext.rotate(Math.PI / 180 * -degree);
6894
- this.lowerContext.translate(-this.lowerCanvas.width / 2, -this.lowerCanvas.height / 2);
6895
- this.lowerContext.restore();
6896
- this.currImgData = this.lowerContext.getImageData(0, 0, this.lowerCanvas.width, this.lowerCanvas.height);
6897
- this.inMemoryContext.clearRect(0, 0, this.lowerCanvas.width, this.lowerCanvas.height);
6898
- this.inMemoryCanvas.width = this.currImgData.width;
6899
- this.inMemoryCanvas.height = this.currImgData.height;
6900
- this.inMemoryContext.putImageData(this.currImgData, 0, 0);
6901
- this.redrawObj(degree);
6902
6895
  if (!isNullOrUndefined(activeObjShape)) {
6903
6896
  if (activeObjShape === 'custom') {
6904
6897
  const endPoint = { x: this.lowerCanvas.width - this.pannEnd.startX, y: this.lowerCanvas.height - this.pannEnd.startY };
@@ -6914,11 +6907,11 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends SignatureBase {
6914
6907
  }
6915
6908
  this.factor = 1;
6916
6909
  if (!this.isUndoRedo) {
6917
- this.updateUndoRedoColl('rotate', degree, this.objColl);
6910
+ this.updateUndoRedoColl('rotate', degree, this.objColl, null);
6918
6911
  }
6919
6912
  this.isUndoRedo = false;
6913
+ this.refreshToolbar('main');
6920
6914
  }
6921
- this.rotateMethod = false;
6922
6915
  return isRotate;
6923
6916
  }
6924
6917
  /**
@@ -6950,8 +6943,8 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends SignatureBase {
6950
6943
  }
6951
6944
  type = type ? type : 'Png';
6952
6945
  this.redrawActObj();
6953
- const beforeSave = { cancel: false, fileName: 'ImageEditor', fileType: type };
6954
- const saved = { fileName: 'ImageEditor', fileType: type };
6946
+ const beforeSave = { cancel: false, fileName: fileName ? fileName : 'ImageEditor', fileType: type };
6947
+ const saved = { fileName: fileName ? fileName : 'ImageEditor', fileType: type };
6955
6948
  this.trigger('beforeSave', beforeSave, (observableSaveArgs) => {
6956
6949
  if (!observableSaveArgs.cancel) {
6957
6950
  fileName = observableSaveArgs.fileName ? observableSaveArgs.fileName : fileName;
@@ -7061,7 +7054,8 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends SignatureBase {
7061
7054
  *
7062
7055
  * @param {boolean} value - Specifies a value whether enable or disable freehand drawing.
7063
7056
  *
7064
- * @returns {void}.
7057
+ * @returns {void}.
7058
+ * @private
7065
7059
  */
7066
7060
  freeHandDraw(value) {
7067
7061
  if (value) {
@@ -7075,6 +7069,16 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends SignatureBase {
7075
7069
  }
7076
7070
  this.refreshToolbar('pen');
7077
7071
  }
7072
+ /**
7073
+ * Enable or disable a freehand drawing in an Image Editor.
7074
+ *
7075
+ * @param {boolean} value - Specifies a value whether enable or disable freehand drawing.
7076
+ *
7077
+ * @returns {void}.
7078
+ */
7079
+ freehandDraw(value) {
7080
+ this.freeHandDraw(value);
7081
+ }
7078
7082
  /**
7079
7083
  * Enable or disable a panning on the Image Editor.
7080
7084
  *
@@ -7355,7 +7359,15 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends SignatureBase {
7355
7359
  isSelected = true;
7356
7360
  this.activeObj = obj;
7357
7361
  this.redrawShape(this.activeObj);
7358
- this.refreshToolbar('shapes');
7362
+ if (this.activeObj.shape === 'text') {
7363
+ this.refreshToolbar('text');
7364
+ }
7365
+ else if (this.activeObj.shape === 'pen') {
7366
+ this.refreshToolbar('pen');
7367
+ }
7368
+ else {
7369
+ this.refreshToolbar('shapes');
7370
+ }
7359
7371
  this.updateToolbarItems(this.calcRatio());
7360
7372
  }
7361
7373
  return isSelected;
@@ -7467,7 +7479,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends SignatureBase {
7467
7479
  * @private
7468
7480
  */
7469
7481
  canUndo() {
7470
- return super.canUndo();
7482
+ return false;
7471
7483
  }
7472
7484
  /**
7473
7485
  * To check whether the redo collection is empty or not.
@@ -7476,7 +7488,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends SignatureBase {
7476
7488
  * @private
7477
7489
  */
7478
7490
  canRedo() {
7479
- return super.canRedo();
7491
+ return false;
7480
7492
  }
7481
7493
  /**
7482
7494
  * Erases all the signature strokes signed by user.
@@ -7485,7 +7497,9 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends SignatureBase {
7485
7497
  * @private
7486
7498
  */
7487
7499
  clear() {
7488
- super.clear();
7500
+ if (this.getModuleName() !== 'image-editor') {
7501
+ super.clear();
7502
+ }
7489
7503
  }
7490
7504
  /**
7491
7505
  * To draw the signature based on the given text, with the font family and font size.
@@ -7498,7 +7512,9 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends SignatureBase {
7498
7512
  * @private
7499
7513
  */
7500
7514
  draw(text, fontFamily, fontSize) {
7501
- super.draw(text, fontFamily, fontSize);
7515
+ if (this.getModuleName() !== 'image-editor') {
7516
+ super.draw(text, fontFamily, fontSize);
7517
+ }
7502
7518
  }
7503
7519
  /**
7504
7520
  * To get the signature as Blob.
@@ -7508,7 +7524,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends SignatureBase {
7508
7524
  * @private
7509
7525
  */
7510
7526
  getBlob(url) {
7511
- return super.getBlob(url);
7527
+ return null;
7512
7528
  }
7513
7529
  /**
7514
7530
  * To check whether the signature is empty or not.
@@ -7517,7 +7533,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends SignatureBase {
7517
7533
  * @private
7518
7534
  */
7519
7535
  isEmpty() {
7520
- return super.isEmpty();
7536
+ return false;
7521
7537
  }
7522
7538
  /**
7523
7539
  * To load the signature with the given base 64 string, height and width.
@@ -7529,7 +7545,9 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends SignatureBase {
7529
7545
  * @private
7530
7546
  */
7531
7547
  load(signature, width, height) {
7532
- super.load(signature, width, height);
7548
+ if (this.getModuleName() !== 'image-editor') {
7549
+ super.load(signature, width, height);
7550
+ }
7533
7551
  }
7534
7552
  /**
7535
7553
  * Undo the last user action.
@@ -7538,7 +7556,9 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends SignatureBase {
7538
7556
  * @private
7539
7557
  */
7540
7558
  undo() {
7541
- super.undo();
7559
+ if (this.getModuleName() !== 'image-editor') {
7560
+ super.undo();
7561
+ }
7542
7562
  }
7543
7563
  /**
7544
7564
  * Redo the last user action.
@@ -7547,7 +7567,9 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends SignatureBase {
7547
7567
  * @private
7548
7568
  */
7549
7569
  redo() {
7550
- super.redo();
7570
+ if (this.getModuleName() !== 'image-editor') {
7571
+ super.redo();
7572
+ }
7551
7573
  }
7552
7574
  /**
7553
7575
  * To save the signature with the given file type and file name.
@@ -7559,7 +7581,9 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends SignatureBase {
7559
7581
  * @private
7560
7582
  */
7561
7583
  save(type, fileName) {
7562
- super.save(type, fileName);
7584
+ if (this.getModuleName() !== 'image-editor') {
7585
+ super.save(type, fileName);
7586
+ }
7563
7587
  }
7564
7588
  /**
7565
7589
  * To save the signature as Blob.
@@ -7568,7 +7592,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends SignatureBase {
7568
7592
  * @private
7569
7593
  */
7570
7594
  saveAsBlob() {
7571
- return super.saveAsBlob();
7595
+ return null;
7572
7596
  }
7573
7597
  /**
7574
7598
  * Returns the persistence data for component.
@@ -7577,7 +7601,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends SignatureBase {
7577
7601
  * @private
7578
7602
  */
7579
7603
  getLocalData() {
7580
- return super.getLocalData();
7604
+ return null;
7581
7605
  }
7582
7606
  };
7583
7607
  __decorate([