@syncfusion/ej2-image-editor 22.1.36 → 22.1.37

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.
@@ -6393,6 +6393,9 @@ class Selection {
6393
6393
  case 'reset':
6394
6394
  this.reset();
6395
6395
  break;
6396
+ case 'unWireEvent':
6397
+ this.unwireEvent();
6398
+ break;
6396
6399
  }
6397
6400
  }
6398
6401
  getModuleName() {
@@ -9732,6 +9735,12 @@ class Selection {
9732
9735
  EventHandler.add(this.parent.upperCanvas, 'touchend', this.mouseUpEventHandler, this);
9733
9736
  EventHandler.add(this.parent.upperCanvas, 'touchmove', this.mouseMoveEventHandler, this);
9734
9737
  }
9738
+ unwireEvent() {
9739
+ EventHandler.remove(this.parent.lowerCanvas, 'touchend', this.mouseUpEventHandler);
9740
+ EventHandler.remove(this.parent.lowerCanvas, 'touchmove', this.mouseMoveEventHandler);
9741
+ EventHandler.remove(this.parent.upperCanvas, 'touchend', this.mouseUpEventHandler);
9742
+ EventHandler.remove(this.parent.upperCanvas, 'touchmove', this.mouseMoveEventHandler);
9743
+ }
9735
9744
  keyDownEventHandler(e) {
9736
9745
  const parent = this.parent;
9737
9746
  if (e.ctrlKey && (e.key === '+' || e.key === '-')) {
@@ -15509,7 +15518,9 @@ class UndoRedo {
15509
15518
  this.undoRedoStep--;
15510
15519
  if (!isBlazor()) {
15511
15520
  parent.notify('toolbar', { prop: 'enable-disable-btns' });
15512
- parent.element.querySelector('.e-contextual-toolbar-wrapper').classList.add('e-hide');
15521
+ if (parent.element.querySelector('.e-contextual-toolbar-wrapper')) {
15522
+ parent.element.querySelector('.e-contextual-toolbar-wrapper').classList.add('e-hide');
15523
+ }
15513
15524
  }
15514
15525
  else {
15515
15526
  parent.updateToolbar(parent.element, 'enableDisableToolbarBtn');
@@ -15612,7 +15623,7 @@ class UndoRedo {
15612
15623
  parent.cropObj = extend({}, obj.currentCropObj, {}, true);
15613
15624
  parent.afterCropActions = obj.currentObj.afterCropActions;
15614
15625
  this.lowerContext.filter = obj.currentObj.filter;
15615
- if (!isBlazor()) {
15626
+ if (!isBlazor() && parent.element.querySelector('.e-contextual-toolbar-wrapper')) {
15616
15627
  parent.element.querySelector('.e-contextual-toolbar-wrapper').classList.add('e-hide');
15617
15628
  }
15618
15629
  parent.canvasFilter = this.lowerContext.filter;
@@ -16518,6 +16529,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
16518
16529
  screen.orientation.removeEventListener('change', this.screenOrientation.bind(this));
16519
16530
  }
16520
16531
  this.notify('shape', { prop: 'unWireEvent', onPropertyChange: false });
16532
+ this.notify('selection', { prop: 'unWireEvent', onPropertyChange: false });
16521
16533
  }
16522
16534
  createCanvas() {
16523
16535
  this.element.style.boxSizing = 'border-box';
@@ -18087,9 +18099,6 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
18087
18099
  });
18088
18100
  this.upperCanvas.width = this.lowerCanvas.width = this.inMemoryCanvas.width = this.element.offsetWidth;
18089
18101
  this.upperCanvas.height = this.lowerCanvas.height = this.inMemoryCanvas.height = (this.element.offsetHeight - this.toolbarHeight);
18090
- this.baseImg = this.createElement('img', {
18091
- id: this.element.id + '_orgImg', attrs: { name: 'Image', crossorigin: 'anonymous' }
18092
- });
18093
18102
  this.lowerContext = this.lowerCanvas.getContext('2d');
18094
18103
  this.baseImg = this.createElement('img', {
18095
18104
  id: this.element.id + '_orgImg', attrs: { name: 'Image', crossorigin: 'anonymous' }