@syncfusion/ej2-image-editor 24.2.4 → 24.2.8

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.
@@ -4761,7 +4761,8 @@ var Draw = /** @__PURE__ @class */ (function () {
4761
4761
  if (!isBlazor()) {
4762
4762
  parent.notify('toolbar', { prop: 'getDefToolbarItems', value: { obj: obj } });
4763
4763
  if (obj['defToolbarItems'].length === 0 &&
4764
- (isNullOrUndefined(document.getElementById(id + '_toolbar')))) {
4764
+ (isNullOrUndefined(document.getElementById(id + '_toolbar'))) &&
4765
+ parent.element.querySelector('#' + id + '_toolbarArea')) {
4765
4766
  var height = parent.element.querySelector('#' + id + '_toolbarArea').clientHeight;
4766
4767
  parent.notify('toolbar', { prop: 'setToolbarHeight', value: { height: height } });
4767
4768
  }
@@ -8322,6 +8323,7 @@ var Selection = /** @__PURE__ @class */ (function () {
8322
8323
  this.isPinching = false;
8323
8324
  this.isSliding = false;
8324
8325
  this.mouseDown = '';
8326
+ this.isSliderActive = false;
8325
8327
  this.parent = parent;
8326
8328
  this.addEventListener();
8327
8329
  }
@@ -8564,6 +8566,12 @@ var Selection = /** @__PURE__ @class */ (function () {
8564
8566
  case 'setSliding':
8565
8567
  this.isSliding = args.value['bool'];
8566
8568
  break;
8569
+ case 'setSliderActive':
8570
+ this.isSliderActive = args.value['bool'];
8571
+ break;
8572
+ case 'getArrowType':
8573
+ args.value['obj']['type'] = this.getArrowType(args.value['type']);
8574
+ break;
8567
8575
  }
8568
8576
  };
8569
8577
  Selection.prototype.getModuleName = function () {
@@ -8611,6 +8619,7 @@ var Selection = /** @__PURE__ @class */ (function () {
8611
8619
  this.initialPrevObj = {};
8612
8620
  this.resizedElement = '';
8613
8621
  this.mouseDown = '';
8622
+ this.isSliderActive = false;
8614
8623
  };
8615
8624
  Selection.prototype.performTabAction = function () {
8616
8625
  var parent = this.parent;
@@ -11468,272 +11477,273 @@ var Selection = /** @__PURE__ @class */ (function () {
11468
11477
  && !parent.element.querySelector('#' + id + '_headWrapper').parentElement.classList.contains('e-hide')))) {
11469
11478
  return;
11470
11479
  }
11471
- else if (e.currentTarget === document && this.mouseDown === '') {
11472
- e.stopImmediatePropagation();
11473
- return;
11474
- }
11475
- if (e.type === 'touchstart') {
11476
- this.isTouch = false;
11477
- }
11478
- else if (e.type === 'touchend') {
11479
- e.stopImmediatePropagation();
11480
- }
11481
- e.preventDefault();
11482
- if (parent.togglePan) {
11483
- this.canvasMouseUpHandler(e);
11484
- }
11485
- var x;
11486
- var y;
11487
- if (e.type === 'mouseup') {
11488
- x = e.clientX;
11489
- y = e.clientY;
11490
- }
11491
- else {
11492
- x = this.touchEndPoint.x;
11493
- y = this.touchEndPoint.y;
11494
- }
11495
- var bbox = parent.lowerCanvas.getBoundingClientRect();
11496
- x -= bbox.left;
11497
- y -= bbox.top;
11498
- if (e.type === 'touchend') {
11499
- this.startTouches = this.tempTouches = [];
11500
- this.isFirstMove = false;
11501
- if (parent.textArea.style.display === 'none') {
11502
- this.timer = 0;
11480
+ if (this.mouseDown === 'canvas' || this.isSliderActive ||
11481
+ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
11482
+ e.target.closest('.e-image-editor') || e.target.closest('.e-ie-ddb-popup')) {
11483
+ if (e.type === 'touchstart') {
11484
+ this.isTouch = false;
11503
11485
  }
11504
- if (this.isPinching) {
11505
- this.isPinching = false;
11506
- parent.notify('draw', { prop: 'redrawDownScale' });
11507
- if (parent.isCropTab || parent.activeObj.shape) {
11508
- parent.notify('draw', { prop: 'setStraightenActObj', value: { activeObj: null } });
11509
- parent.notify('freehand-draw', { prop: 'resetStraightenPoint' });
11510
- }
11511
- if (parent.isStraightening) {
11512
- parent.notify('draw', { prop: 'resetStraightenDestPoints' });
11513
- parent.notify('draw', { prop: 'setDestForStraighten' });
11514
- }
11515
- return;
11486
+ else if (e.type === 'touchend') {
11487
+ e.stopImmediatePropagation();
11516
11488
  }
11517
- }
11518
- var isCropSelection = false;
11519
- var splitWords;
11520
- if (parent.activeObj.shape !== undefined) {
11521
- splitWords = parent.activeObj.shape.split('-');
11522
- }
11523
- if (splitWords !== undefined && splitWords[0] === 'crop') {
11524
- isCropSelection = true;
11525
- }
11526
- if (isBlazor() && parent.eventType) {
11527
- if (parent.eventType === 'pan') {
11528
- if (parent.events && parent.events.onPanEnd.hasDelegate === true) {
11529
- parent.dotNetRef.invokeMethodAsync('PanEventAsync', 'OnPanEnd', parent.panEventArgs);
11530
- }
11489
+ e.preventDefault();
11490
+ if (parent.togglePan) {
11491
+ this.canvasMouseUpHandler(e);
11531
11492
  }
11532
- else if (parent.eventType === 'resize') {
11533
- if (!this.isCropSelection && parent.events && parent.events.onShapeResizeEnd.hasDelegate === true) {
11534
- this.shapeResizingArgs.currentShapeSettings = this.updatePrevShapeSettings();
11535
- this.shapeResizingArgs.action = this.currentDrawingShape !== '' ? 'drawing' : 'resize-end';
11536
- /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
11537
- parent.dotNetRef.invokeMethodAsync('ShapeEventAsync', 'OnShapeResizeEnd', this.shapeResizingArgs, null).then(function (shapeResizingArgs) {
11538
- parent.notify('shape', { prop: 'updateShapeChangeEventArgs', onPropertyChange: false,
11539
- value: { shapeSettings: shapeResizingArgs.currentShapeSettings } });
11540
- });
11541
- }
11542
- else if (this.shapeResizingArgs && this.selectionResizingArgs && parent.events &&
11543
- parent.events.onSelectionResizeEnd.hasDelegate === true) {
11544
- var currentSelectionSettings = { type: parent.activeObj.shape,
11545
- startX: this.shapeResizingArgs.currentShapeSettings.startX,
11546
- startY: this.shapeResizingArgs.currentShapeSettings.startY,
11547
- width: this.shapeResizingArgs.currentShapeSettings.width,
11548
- height: this.shapeResizingArgs.currentShapeSettings.height };
11549
- this.selectionResizingArgs.currentSelectionSettings = currentSelectionSettings;
11550
- this.selectionResizingArgs.action = 'resize-end';
11551
- /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
11552
- parent.dotNetRef.invokeMethodAsync('SelectionEventAsync', 'OnSelectionResizeEnd', this.selectionResizingArgs).then(function (selectionResizingArgs) {
11553
- parent.notify('shape', { prop: 'updateSelectionChangeEventArgs', onPropertyChange: false,
11554
- value: { selectionSettings: selectionResizingArgs.currentSelectionSettings } });
11555
- });
11556
- }
11493
+ var x = void 0;
11494
+ var y = void 0;
11495
+ if (e.type === 'mouseup') {
11496
+ x = e.clientX;
11497
+ y = e.clientY;
11557
11498
  }
11558
11499
  else {
11559
- if (this.shapeMovingArgs && parent.events && parent.events.onShapeDragEnd.hasDelegate === true) {
11560
- this.shapeMovingArgs.currentShapeSettings = this.updatePrevShapeSettings();
11561
- this.shapeMovingArgs.action = 'drag-end';
11562
- /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
11563
- parent.dotNetRef.invokeMethodAsync('ShapeEventAsync', 'OnShapeDragEnd', this.shapeMovingArgs, null).then(function (shapeMovingArgs) {
11564
- parent.notify('shape', { prop: 'updateShapeChangeEventArgs', onPropertyChange: false,
11565
- value: { shapeSettings: shapeMovingArgs.currentShapeSettings } });
11566
- });
11500
+ x = this.touchEndPoint.x;
11501
+ y = this.touchEndPoint.y;
11502
+ }
11503
+ var bbox = parent.lowerCanvas.getBoundingClientRect();
11504
+ x -= bbox.left;
11505
+ y -= bbox.top;
11506
+ if (e.type === 'touchend') {
11507
+ this.startTouches = this.tempTouches = [];
11508
+ this.isFirstMove = false;
11509
+ if (parent.textArea.style.display === 'none') {
11510
+ this.timer = 0;
11511
+ }
11512
+ if (this.isPinching) {
11513
+ this.isPinching = false;
11514
+ parent.notify('draw', { prop: 'redrawDownScale' });
11515
+ if (parent.isCropTab || parent.activeObj.shape) {
11516
+ parent.notify('draw', { prop: 'setStraightenActObj', value: { activeObj: null } });
11517
+ parent.notify('freehand-draw', { prop: 'resetStraightenPoint' });
11518
+ }
11519
+ if (parent.isStraightening) {
11520
+ parent.notify('draw', { prop: 'resetStraightenDestPoints' });
11521
+ parent.notify('draw', { prop: 'setDestForStraighten' });
11522
+ }
11523
+ return;
11567
11524
  }
11568
11525
  }
11569
- this.shapeResizingArgs = null;
11570
- this.shapeMovingArgs = null;
11571
- parent.panEventArgs = null;
11572
- parent.eventType = null;
11573
- }
11574
- if (this.currentDrawingShape === 'path') {
11575
- /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
11576
- var elem = e.srcElement;
11577
- var elemId = elem.parentElement.id;
11578
- var id_1 = parent.element.id;
11579
- if (e.currentTarget !== parent.upperCanvas && e.currentTarget !== parent.lowerCanvas && parent.activeObj.pointColl.length > 0 &&
11580
- (elem.classList.contains('e-upload-icon') || elemId === id_1 + '_zoomIn' ||
11581
- elemId === id_1 + '_zoomOut' || elemId === id_1 + '_annotationBtn' ||
11582
- elemId === id_1 + '_borderColorBtn' || elemId === id_1 + '_borderWidthBtn' || elemId === id_1 + '_saveBtn')) {
11583
- parent.notify('shape', { prop: 'stopPathDrawing', onPropertyChange: false, value: { e: e, isApply: true } });
11584
- this.upperContext.clearRect(0, 0, parent.upperCanvas.width, parent.upperCanvas.height);
11585
- parent.notify('draw', { prop: 'drawObject', onPropertyChange: false, value: { canvas: 'duplicate', obj: parent.activeObj, isCropRatio: null,
11586
- points: null, isPreventDrag: true, saveContext: null, isPreventSelection: true } });
11526
+ var isCropSelection = false;
11527
+ var splitWords = void 0;
11528
+ if (parent.activeObj.shape !== undefined) {
11529
+ splitWords = parent.activeObj.shape.split('-');
11587
11530
  }
11588
- return;
11589
- }
11590
- if (e.currentTarget === parent.upperCanvas && !parent.isResize) {
11591
- this.pathAdjustedIndex = null;
11592
- if (this.currentDrawingShape !== '') {
11593
- if (this.currentDrawingShape === 'text') {
11594
- var prevCropObj_1 = extend({}, parent.cropObj, {}, true);
11595
- parent.notify('undo-redo', { prop: 'updateUndoRedoColl', onPropertyChange: false,
11596
- value: { operation: 'shapeInsert', previousObj: this.initialPrevObj, previousObjColl: this.initialPrevObj.objColl,
11597
- previousPointColl: this.initialPrevObj.pointColl, previousSelPointColl: this.initialPrevObj.selPointColl,
11598
- previousCropObj: prevCropObj_1, previousText: null,
11599
- currentText: null, previousFilter: null, isCircleCrop: null } });
11531
+ if (splitWords !== undefined && splitWords[0] === 'crop') {
11532
+ isCropSelection = true;
11533
+ }
11534
+ if (isBlazor() && parent.eventType) {
11535
+ if (parent.eventType === 'pan') {
11536
+ if (parent.events && parent.events.onPanEnd.hasDelegate === true) {
11537
+ parent.dotNetRef.invokeMethodAsync('PanEventAsync', 'OnPanEnd', parent.panEventArgs);
11538
+ }
11600
11539
  }
11601
- else {
11602
- parent.notify('undo-redo', { prop: 'updateUrObj', onPropertyChange: false, value: { objColl: this.initialPrevObj.objColl, operation: 'shapeInsert' } });
11603
- }
11604
- this.isShapeInserted = true;
11605
- this.currentDrawingShape = '';
11606
- if (parent.activeObj.activePoint.width === 0 && parent.activeObj.activePoint.height === 0) {
11607
- parent.notify('draw', { prop: 'performCancel', value: { isContextualToolbar: null } });
11608
- }
11609
- var previousShapeSettings = this.updatePrevShapeSettings();
11610
- var shapeResizingArgs = { cancel: false, action: 'draw-end', previousShapeSettings: previousShapeSettings };
11611
- var shapeMovingArgs = { cancel: false, action: 'move', previousShapeSettings: previousShapeSettings };
11612
- this.shapeResizingArgs = shapeResizingArgs;
11613
- this.shapeMovingArgs = shapeMovingArgs;
11614
- this.triggerShapeChange(shapeResizingArgs, shapeMovingArgs, 'mouse-up');
11615
- }
11616
- this.adjustActObjForLineArrow();
11617
- this.updPtCollForShpRot();
11618
- parent.currObjType.shape = parent.currObjType.shape.toLowerCase();
11619
- var prevCropObj = extend({}, parent.cropObj, {}, true);
11620
- var object = { currObj: {} };
11621
- parent.notify('filter', { prop: 'getCurrentObj', onPropertyChange: false, value: { object: object } });
11622
- var prevObj = object['currObj'];
11623
- prevObj.objColl = extend([], parent.objColl, [], true);
11624
- prevObj.pointColl = extend([], parent.pointColl, [], true);
11625
- prevObj.afterCropActions = extend([], parent.afterCropActions, [], true);
11626
- var selPointCollObj = { selPointColl: null };
11627
- parent.notify('freehand-draw', { prop: 'getSelPointColl', onPropertyChange: false,
11628
- value: { obj: selPointCollObj } });
11629
- prevObj.selPointColl = extend([], selPointCollObj['selPointColl'], [], true);
11630
- if (!parent.togglePen && !isCropSelection) {
11631
- if (this.tempObjColl && parent.activeObj.activePoint.width !== 0) {
11632
- parent.notify('shape', { prop: 'updImgRatioForActObj', onPropertyChange: false });
11633
- parent.objColl.push(parent.activeObj);
11634
- if (JSON.stringify(parent.activeObj.activePoint) !== JSON.stringify(this.tempActiveObj.activePoint)) {
11635
- parent.notify('undo-redo', { prop: 'updateUndoRedoColl', onPropertyChange: false,
11636
- value: { operation: 'shapeTransform', previousObj: prevObj, previousObjColl: this.tempObjColl,
11637
- previousPointColl: prevObj.pointColl, previousSelPointColl: prevObj.selPointColl,
11638
- previousCropObj: prevCropObj, previousText: null,
11639
- currentText: null, previousFilter: null, isCircleCrop: null } });
11540
+ else if (parent.eventType === 'resize') {
11541
+ if (!this.isCropSelection && parent.events && parent.events.onShapeResizeEnd.hasDelegate === true) {
11542
+ this.shapeResizingArgs.currentShapeSettings = this.updatePrevShapeSettings();
11543
+ this.shapeResizingArgs.action = this.currentDrawingShape !== '' ? 'drawing' : 'resize-end';
11544
+ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
11545
+ parent.dotNetRef.invokeMethodAsync('ShapeEventAsync', 'OnShapeResizeEnd', this.shapeResizingArgs, null).then(function (shapeResizingArgs) {
11546
+ parent.notify('shape', { prop: 'updateShapeChangeEventArgs', onPropertyChange: false,
11547
+ value: { shapeSettings: shapeResizingArgs.currentShapeSettings } });
11548
+ });
11549
+ }
11550
+ else if (this.shapeResizingArgs && this.selectionResizingArgs && parent.events &&
11551
+ parent.events.onSelectionResizeEnd.hasDelegate === true) {
11552
+ var currentSelectionSettings = { type: parent.activeObj.shape,
11553
+ startX: this.shapeResizingArgs.currentShapeSettings.startX,
11554
+ startY: this.shapeResizingArgs.currentShapeSettings.startY,
11555
+ width: this.shapeResizingArgs.currentShapeSettings.width,
11556
+ height: this.shapeResizingArgs.currentShapeSettings.height };
11557
+ this.selectionResizingArgs.currentSelectionSettings = currentSelectionSettings;
11558
+ this.selectionResizingArgs.action = 'resize-end';
11559
+ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
11560
+ parent.dotNetRef.invokeMethodAsync('SelectionEventAsync', 'OnSelectionResizeEnd', this.selectionResizingArgs).then(function (selectionResizingArgs) {
11561
+ parent.notify('shape', { prop: 'updateSelectionChangeEventArgs', onPropertyChange: false,
11562
+ value: { selectionSettings: selectionResizingArgs.currentSelectionSettings } });
11563
+ });
11640
11564
  }
11641
- this.redrawShape(parent.objColl[parent.objColl.length - 1], true);
11642
- this.tempObjColl = undefined;
11643
11565
  }
11644
- if (!this.isFhdEditing) {
11645
- this.applyCurrActObj(x, y);
11646
- parent.currObjType.isResize = false;
11647
- if (!isBlazor()) {
11648
- parent.notify('toolbar', { prop: 'destroy-qa-toolbar', onPropertyChange: false });
11566
+ else {
11567
+ if (this.shapeMovingArgs && parent.events && parent.events.onShapeDragEnd.hasDelegate === true) {
11568
+ this.shapeMovingArgs.currentShapeSettings = this.updatePrevShapeSettings();
11569
+ this.shapeMovingArgs.action = 'drag-end';
11570
+ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
11571
+ parent.dotNetRef.invokeMethodAsync('ShapeEventAsync', 'OnShapeDragEnd', this.shapeMovingArgs, null).then(function (shapeMovingArgs) {
11572
+ parent.notify('shape', { prop: 'updateShapeChangeEventArgs', onPropertyChange: false,
11573
+ value: { shapeSettings: shapeMovingArgs.currentShapeSettings } });
11574
+ });
11649
11575
  }
11650
11576
  }
11577
+ this.shapeResizingArgs = null;
11578
+ this.shapeMovingArgs = null;
11579
+ parent.panEventArgs = null;
11580
+ parent.eventType = null;
11651
11581
  }
11652
- if (parent.activeObj) {
11653
- var isCropSelection_1 = false;
11654
- var splitWords_1;
11655
- if (parent.activeObj.shape !== undefined) {
11656
- splitWords_1 = parent.activeObj.shape.split('-');
11657
- }
11658
- if (splitWords_1 === undefined && (parent.currObjType.isCustomCrop || parent.togglePen)) {
11659
- isCropSelection_1 = true;
11582
+ if (this.currentDrawingShape === 'path') {
11583
+ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
11584
+ var elem = e.srcElement;
11585
+ var elemId = elem.parentElement.id;
11586
+ var id_1 = parent.element.id;
11587
+ if (e.currentTarget !== parent.upperCanvas && e.currentTarget !== parent.lowerCanvas && parent.activeObj.pointColl.length > 0 &&
11588
+ (elem.classList.contains('e-upload-icon') || elemId === id_1 + '_zoomIn' ||
11589
+ elemId === id_1 + '_zoomOut' || elemId === id_1 + '_annotationBtn' ||
11590
+ elemId === id_1 + '_borderColorBtn' || elemId === id_1 + '_borderWidthBtn' || elemId === id_1 + '_saveBtn')) {
11591
+ parent.notify('shape', { prop: 'stopPathDrawing', onPropertyChange: false, value: { e: e, isApply: true } });
11592
+ this.upperContext.clearRect(0, 0, parent.upperCanvas.width, parent.upperCanvas.height);
11593
+ parent.notify('draw', { prop: 'drawObject', onPropertyChange: false, value: { canvas: 'duplicate', obj: parent.activeObj, isCropRatio: null,
11594
+ points: null, isPreventDrag: true, saveContext: null, isPreventSelection: true } });
11660
11595
  }
11661
- else if (splitWords_1 !== undefined && splitWords_1[0] === 'crop') {
11662
- isCropSelection_1 = true;
11596
+ return;
11597
+ }
11598
+ if (e.currentTarget === parent.upperCanvas && !parent.isResize) {
11599
+ this.pathAdjustedIndex = null;
11600
+ if (this.currentDrawingShape !== '') {
11601
+ if (this.currentDrawingShape === 'text') {
11602
+ var prevCropObj_1 = extend({}, parent.cropObj, {}, true);
11603
+ parent.notify('undo-redo', { prop: 'updateUndoRedoColl', onPropertyChange: false,
11604
+ value: { operation: 'shapeInsert', previousObj: this.initialPrevObj, previousObjColl: this.initialPrevObj.objColl,
11605
+ previousPointColl: this.initialPrevObj.pointColl, previousSelPointColl: this.initialPrevObj.selPointColl,
11606
+ previousCropObj: prevCropObj_1, previousText: null,
11607
+ currentText: null, previousFilter: null, isCircleCrop: null } });
11608
+ }
11609
+ else {
11610
+ parent.notify('undo-redo', { prop: 'updateUrObj', onPropertyChange: false, value: { objColl: this.initialPrevObj.objColl, operation: 'shapeInsert' } });
11611
+ }
11612
+ this.isShapeInserted = true;
11613
+ this.currentDrawingShape = '';
11614
+ if (parent.activeObj.activePoint.width === 0 && parent.activeObj.activePoint.height === 0) {
11615
+ parent.notify('draw', { prop: 'performCancel', value: { isContextualToolbar: null } });
11616
+ }
11617
+ var previousShapeSettings = this.updatePrevShapeSettings();
11618
+ var shapeResizingArgs = { cancel: false, action: 'draw-end', previousShapeSettings: previousShapeSettings };
11619
+ var shapeMovingArgs = { cancel: false, action: 'move', previousShapeSettings: previousShapeSettings };
11620
+ this.shapeResizingArgs = shapeResizingArgs;
11621
+ this.shapeMovingArgs = shapeMovingArgs;
11622
+ this.triggerShapeChange(shapeResizingArgs, shapeMovingArgs, 'mouse-up');
11623
+ }
11624
+ this.adjustActObjForLineArrow();
11625
+ this.updPtCollForShpRot();
11626
+ parent.currObjType.shape = parent.currObjType.shape.toLowerCase();
11627
+ var prevCropObj = extend({}, parent.cropObj, {}, true);
11628
+ var object = { currObj: {} };
11629
+ parent.notify('filter', { prop: 'getCurrentObj', onPropertyChange: false, value: { object: object } });
11630
+ var prevObj = object['currObj'];
11631
+ prevObj.objColl = extend([], parent.objColl, [], true);
11632
+ prevObj.pointColl = extend([], parent.pointColl, [], true);
11633
+ prevObj.afterCropActions = extend([], parent.afterCropActions, [], true);
11634
+ var selPointCollObj = { selPointColl: null };
11635
+ parent.notify('freehand-draw', { prop: 'getSelPointColl', onPropertyChange: false,
11636
+ value: { obj: selPointCollObj } });
11637
+ prevObj.selPointColl = extend([], selPointCollObj['selPointColl'], [], true);
11638
+ if (!parent.togglePen && !isCropSelection) {
11639
+ if (this.tempObjColl && parent.activeObj.activePoint.width !== 0) {
11640
+ parent.notify('shape', { prop: 'updImgRatioForActObj', onPropertyChange: false });
11641
+ parent.objColl.push(parent.activeObj);
11642
+ if (JSON.stringify(parent.activeObj.activePoint) !== JSON.stringify(this.tempActiveObj.activePoint)) {
11643
+ parent.notify('undo-redo', { prop: 'updateUndoRedoColl', onPropertyChange: false,
11644
+ value: { operation: 'shapeTransform', previousObj: prevObj, previousObjColl: this.tempObjColl,
11645
+ previousPointColl: prevObj.pointColl, previousSelPointColl: prevObj.selPointColl,
11646
+ previousCropObj: prevCropObj, previousText: null,
11647
+ currentText: null, previousFilter: null, isCircleCrop: null } });
11648
+ }
11649
+ this.redrawShape(parent.objColl[parent.objColl.length - 1], true);
11650
+ this.tempObjColl = undefined;
11651
+ }
11652
+ if (!this.isFhdEditing) {
11653
+ this.applyCurrActObj(x, y);
11654
+ parent.currObjType.isResize = false;
11655
+ if (!isBlazor()) {
11656
+ parent.notify('toolbar', { prop: 'destroy-qa-toolbar', onPropertyChange: false });
11657
+ }
11658
+ }
11663
11659
  }
11664
- var shape = parent.activeObj.shape;
11665
- if (!isBlazor()) {
11666
- var shapeColl = ['rectangle', 'ellipse', 'line', 'arrow', 'path'];
11667
- if (shapeColl.indexOf(shape) > -1) {
11668
- parent.notify('toolbar', { prop: 'refresh-toolbar', onPropertyChange: false, value: { type: 'shapes',
11669
- isApplyBtn: null, isCropping: null, isZooming: null, cType: null } });
11660
+ if (parent.activeObj) {
11661
+ var isCropSelection_1 = false;
11662
+ var splitWords_1;
11663
+ if (parent.activeObj.shape !== undefined) {
11664
+ splitWords_1 = parent.activeObj.shape.split('-');
11670
11665
  }
11671
- else if (shape === 'text') {
11672
- if (parent.textArea.style.display === 'none') {
11673
- parent.notify('toolbar', { prop: 'refresh-toolbar', onPropertyChange: false, value: { type: 'text',
11666
+ if (splitWords_1 === undefined && (parent.currObjType.isCustomCrop || parent.togglePen)) {
11667
+ isCropSelection_1 = true;
11668
+ }
11669
+ else if (splitWords_1 !== undefined && splitWords_1[0] === 'crop') {
11670
+ isCropSelection_1 = true;
11671
+ }
11672
+ var shape = parent.activeObj.shape;
11673
+ if (!isBlazor()) {
11674
+ var shapeColl = ['rectangle', 'ellipse', 'line', 'arrow', 'path'];
11675
+ if (shapeColl.indexOf(shape) > -1) {
11676
+ parent.notify('toolbar', { prop: 'refresh-toolbar', onPropertyChange: false, value: { type: 'shapes',
11677
+ isApplyBtn: null, isCropping: null, isZooming: null, cType: null } });
11678
+ }
11679
+ else if (shape === 'text') {
11680
+ if (parent.textArea.style.display === 'none') {
11681
+ parent.notify('toolbar', { prop: 'refresh-toolbar', onPropertyChange: false, value: { type: 'text',
11682
+ isApplyBtn: null, isCropping: null, isZooming: null, cType: null } });
11683
+ }
11684
+ }
11685
+ else if (this.isFhdEditing) {
11686
+ parent.notify('toolbar', { prop: 'refresh-toolbar', onPropertyChange: false, value: { type: 'pen',
11674
11687
  isApplyBtn: null, isCropping: null, isZooming: null, cType: null } });
11675
11688
  }
11689
+ else if (!isCropSelection_1) {
11690
+ var eventargs = { type: 'main', isApplyBtn: null, isCropping: false, isZooming: null };
11691
+ parent.notify('toolbar', { prop: 'refresh-toolbar', onPropertyChange: false, value: eventargs });
11692
+ }
11693
+ parent.notify('toolbar', { prop: 'update-toolbar-items', onPropertyChange: false });
11676
11694
  }
11677
- else if (this.isFhdEditing) {
11678
- parent.notify('toolbar', { prop: 'refresh-toolbar', onPropertyChange: false, value: { type: 'pen',
11679
- isApplyBtn: null, isCropping: null, isZooming: null, cType: null } });
11695
+ else {
11696
+ var shapeColl = ['rectangle', 'ellipse', 'line', 'arrow', 'path', 'image'];
11697
+ if (shapeColl.indexOf(shape) > -1) {
11698
+ parent.updateToolbar(parent.element, parent.activeObj.shape);
11699
+ }
11700
+ else if (parent.activeObj.shape === 'text' && parent.textArea.style.display === 'none') {
11701
+ parent.updateToolbar(parent.element, 'text');
11702
+ }
11680
11703
  }
11681
- else if (!isCropSelection_1) {
11682
- var eventargs = { type: 'main', isApplyBtn: null, isCropping: false, isZooming: null };
11683
- parent.notify('toolbar', { prop: 'refresh-toolbar', onPropertyChange: false, value: eventargs });
11704
+ }
11705
+ }
11706
+ if (parent.activeObj.shape !== undefined) {
11707
+ splitWords = parent.activeObj.shape.split('-');
11708
+ }
11709
+ if (splitWords !== undefined && splitWords[0] === 'crop') {
11710
+ isCropSelection = true;
11711
+ }
11712
+ if (parent.activeObj.shape && !isCropSelection && e.currentTarget === parent.upperCanvas &&
11713
+ parent.textArea.style.display === 'none') {
11714
+ if (parent.activeObj.shape === 'text') {
11715
+ if (!isBlazor()) {
11716
+ parent.notify('toolbar', { prop: 'refresh-toolbar', onPropertyChange: false, value: { type: 'text',
11717
+ isApplyBtn: null, isCropping: null, isZooming: null, cType: null } });
11684
11718
  }
11685
- parent.notify('toolbar', { prop: 'update-toolbar-items', onPropertyChange: false });
11686
11719
  }
11687
11720
  else {
11688
- var shapeColl = ['rectangle', 'ellipse', 'line', 'arrow', 'path', 'image'];
11689
- if (shapeColl.indexOf(shape) > -1) {
11690
- parent.updateToolbar(parent.element, parent.activeObj.shape);
11691
- }
11692
- else if (parent.activeObj.shape === 'text' && parent.textArea.style.display === 'none') {
11693
- parent.updateToolbar(parent.element, 'text');
11721
+ if (!isBlazor()) {
11722
+ parent.notify('toolbar', { prop: 'refresh-toolbar', onPropertyChange: false, value: { type: 'shapes',
11723
+ isApplyBtn: null, isCropping: null, isZooming: null, cType: null } });
11694
11724
  }
11695
11725
  }
11696
- }
11697
- }
11698
- if (parent.activeObj.shape !== undefined) {
11699
- splitWords = parent.activeObj.shape.split('-');
11700
- }
11701
- if (splitWords !== undefined && splitWords[0] === 'crop') {
11702
- isCropSelection = true;
11703
- }
11704
- if (parent.activeObj.shape && !isCropSelection && e.currentTarget === parent.upperCanvas &&
11705
- parent.textArea.style.display === 'none') {
11706
- if (parent.activeObj.shape === 'text') {
11707
11726
  if (!isBlazor()) {
11708
- parent.notify('toolbar', { prop: 'refresh-toolbar', onPropertyChange: false, value: { type: 'text',
11709
- isApplyBtn: null, isCropping: null, isZooming: null, cType: null } });
11727
+ parent.notify('toolbar', { prop: 'update-toolbar-items', onPropertyChange: false });
11728
+ parent.notify('toolbar', { prop: 'renderQAT', onPropertyChange: false, value: { isPenEdit: null } });
11710
11729
  }
11711
- }
11712
- else {
11713
- if (!isBlazor()) {
11714
- parent.notify('toolbar', { prop: 'refresh-toolbar', onPropertyChange: false, value: { type: 'shapes',
11715
- isApplyBtn: null, isCropping: null, isZooming: null, cType: null } });
11730
+ else {
11731
+ parent.updateToolbar(parent.element, 'quickAccessToolbar', parent.activeObj.shape);
11716
11732
  }
11717
11733
  }
11718
- if (!isBlazor()) {
11719
- parent.notify('toolbar', { prop: 'update-toolbar-items', onPropertyChange: false });
11720
- parent.notify('toolbar', { prop: 'renderQAT', onPropertyChange: false, value: { isPenEdit: null } });
11734
+ if (parent.togglePen && e.currentTarget === parent.upperCanvas) {
11735
+ parent.notify('freehand-draw', { prop: 'freehandUpHandler', onPropertyChange: false,
11736
+ value: { e: e, canvas: parent.upperCanvas, context: this.upperContext } });
11721
11737
  }
11722
11738
  else {
11723
- parent.updateToolbar(parent.element, 'quickAccessToolbar', parent.activeObj.shape);
11739
+ parent.currObjType.shape = '';
11724
11740
  }
11741
+ this.dragElement = '';
11742
+ this.mouseDown = '';
11743
+ this.isSliderActive = false;
11744
+ parent.currObjType.isInitialLine = parent.currObjType.isDragging = false;
11745
+ this.selMouseUpEvent();
11725
11746
  }
11726
- if (parent.togglePen && e.currentTarget === parent.upperCanvas) {
11727
- parent.notify('freehand-draw', { prop: 'freehandUpHandler', onPropertyChange: false,
11728
- value: { e: e, canvas: parent.upperCanvas, context: this.upperContext } });
11729
- }
11730
- else {
11731
- parent.currObjType.shape = '';
11732
- }
11733
- this.dragElement = '';
11734
- this.mouseDown = '';
11735
- parent.currObjType.isInitialLine = parent.currObjType.isDragging = false;
11736
- this.selMouseUpEvent();
11737
11747
  };
11738
11748
  Selection.prototype.adjustActObjForLineArrow = function (obj) {
11739
11749
  var isAdjusted = false;
@@ -13156,7 +13166,7 @@ var Selection = /** @__PURE__ @class */ (function () {
13156
13166
  fontStyle.push('underline');
13157
13167
  }
13158
13168
  }
13159
- var _a = parent.activeObj.activePoint, startX = _a.startX, startY = _a.startY, width = _a.width, height = _a.height;
13169
+ var _a = parent.activeObj.activePoint, startX = _a.startX, startY = _a.startY, endX = _a.endX, endY = _a.endY, width = _a.width, height = _a.height;
13160
13170
  var _b = parent.activeObj, keyHistory = _b.keyHistory, currIndex = _b.currIndex, shape = _b.shape, textSettings = _b.textSettings, strokeSettings = _b.strokeSettings, rotatedAngle = _b.rotatedAngle, imageElement = _b.imageElement, opacity = _b.opacity;
13161
13171
  var shapeSettingsObj = {
13162
13172
  id: !isNullOrUndefined(currIndex) ? currIndex : null,
@@ -13172,15 +13182,27 @@ var Selection = /** @__PURE__ @class */ (function () {
13172
13182
  fontFamily: shape === 'text' ? (textSettings ? textSettings.fontFamily : null) : null,
13173
13183
  fontStyle: shape === 'text' ? fontStyle : null,
13174
13184
  color: shape === 'text' ? (strokeSettings ? strokeSettings.strokeColor : null) : null,
13175
- degree: shape === 'ellipse' || shape === 'rectangle' || shape === 'image' ? rotatedAngle * (180 / Math.PI) : null,
13185
+ degree: shape === 'ellipse' || shape === 'rectangle' || shape === 'image' || shape === 'text' ? rotatedAngle * (180 / Math.PI) : null,
13176
13186
  imageData: shape === 'image' ? imageElement.src : null,
13177
- opacity: shape === 'image' ? opacity : null
13187
+ opacity: shape === 'image' ? opacity : null,
13188
+ radiusX: shape === 'ellipse' ? width / 2 : null,
13189
+ radiusY: shape === 'ellipse' ? height / 2 : null,
13190
+ endX: shape === 'line' || shape === 'arrow' ? endX : null,
13191
+ endY: shape === 'line' || shape === 'arrow' ? endY : null,
13192
+ arrowHead: shape === 'arrow' ? this.getArrowType(parent.activeObj.start) : null,
13193
+ arrowTail: shape === 'arrow' ? this.getArrowType(parent.activeObj.end) : null,
13194
+ points: shape === 'path' ? parent.activeObj.pointColl : null
13178
13195
  };
13179
13196
  if (obj) {
13180
13197
  obj['shapeSettingsObj'] = shapeSettingsObj;
13181
13198
  }
13182
13199
  return shapeSettingsObj;
13183
13200
  };
13201
+ Selection.prototype.getArrowType = function (type) {
13202
+ var typeToArrowType = { 'none': 'None', 'arrow': 'Arrow', 'arrowSolid': 'SolidArrow',
13203
+ 'circle': 'Circle', 'circleSolid': 'SolidCircle', 'square': 'Square', 'squareSolid': 'SolidSquare', 'bar': 'Bar' };
13204
+ return typeToArrowType["" + type];
13205
+ };
13184
13206
  Selection.prototype.getRectanglePoints = function (rectX, rectY, rectWidth, rectHeight, rectAngle, pointX, pointY) {
13185
13207
  var centerX = rectX + rectWidth / 2;
13186
13208
  var centerY = rectY + rectHeight / 2;
@@ -14105,13 +14127,22 @@ var Shape = /** @__PURE__ @class */ (function () {
14105
14127
  }
14106
14128
  parent.activeObj.strokeSettings.strokeColor = shapeSettings.strokeColor;
14107
14129
  parent.activeObj.strokeSettings.fillColor = shapeSettings.fillColor;
14130
+ parent.activeObj.strokeSettings.strokeWidth = shapeSettings.strokeWidth;
14108
14131
  parent.activeObj.opacity = shapeSettings.opacity;
14109
14132
  if (isNullOrUndefined(shapeSettings.degree)) {
14110
14133
  shapeSettings.degree = 0;
14111
14134
  }
14112
14135
  switch (parent.activeObj.shape) {
14113
14136
  case 'ellipse':
14114
- parent.activeObj.activePoint.width = shapeSettings.radius * 2;
14137
+ if (isBlazor()) {
14138
+ parent.activeObj.activePoint.width = shapeSettings.radius;
14139
+ }
14140
+ else {
14141
+ parent.activeObj.activePoint.width = shapeSettings.radiusX * 2;
14142
+ parent.activeObj.activePoint.height = shapeSettings.radiusY * 2;
14143
+ parent.activeObj.activePoint.endX = parent.activeObj.activePoint.startX + parent.activeObj.activePoint.width;
14144
+ parent.activeObj.activePoint.endY = parent.activeObj.activePoint.startY + parent.activeObj.activePoint.height;
14145
+ }
14115
14146
  if (shapeSettings.degree) {
14116
14147
  parent.activeObj.rotatedAngle = shapeSettings.degree * (Math.PI / 180);
14117
14148
  }
@@ -14119,18 +14150,35 @@ var Shape = /** @__PURE__ @class */ (function () {
14119
14150
  case 'line':
14120
14151
  case 'arrow':
14121
14152
  parent.activeObj.activePoint.width = shapeSettings.length;
14153
+ if (!isBlazor()) {
14154
+ parent.activeObj.activePoint.endX = shapeSettings.endX;
14155
+ parent.activeObj.activePoint.endY = shapeSettings.endY;
14156
+ parent.activeObj.activePoint.width = parent.activeObj.activePoint.startX + parent.activeObj.activePoint.width;
14157
+ parent.activeObj.activePoint.height = parent.activeObj.activePoint.startY + parent.activeObj.activePoint.height;
14158
+ if (parent.activeObj.shape === 'arrow') {
14159
+ parent.activeObj.start = this.getArrowType(shapeSettings.arrowHead);
14160
+ parent.activeObj.end = this.getArrowType(shapeSettings.arrowTail);
14161
+ }
14162
+ }
14122
14163
  break;
14123
14164
  case 'text':
14124
14165
  parent.activeObj.keyHistory = parent.activeObj.textSettings.text = shapeSettings.text;
14125
14166
  parent.activeObj.textSettings.fontSize = shapeSettings.fontSize;
14126
14167
  parent.activeObj.strokeSettings.strokeColor = shapeSettings.color;
14127
14168
  parent.activeObj.textSettings.fontFamily = shapeSettings.fontFamily;
14169
+ if (shapeSettings.degree) {
14170
+ parent.activeObj.rotatedAngle = shapeSettings.degree * (Math.PI / 180);
14171
+ }
14128
14172
  break;
14129
14173
  case 'rectangle':
14130
14174
  case 'image':
14131
14175
  if (shapeSettings.degree) {
14132
14176
  parent.activeObj.rotatedAngle = shapeSettings.degree * (Math.PI / 180);
14133
14177
  }
14178
+ // Prevented setting image src as it cannot be set in canvas
14179
+ break;
14180
+ case 'path':
14181
+ parent.activeObj.pointColl = shapeSettings.points;
14134
14182
  break;
14135
14183
  }
14136
14184
  if (parent.activeObj.shape === 'text' && parent.activeObj.textSettings) {
@@ -16165,18 +16213,31 @@ var Shape = /** @__PURE__ @class */ (function () {
16165
16213
  shapeDetails.strokeColor = obj.strokeSettings.strokeColor;
16166
16214
  shapeDetails.fillColor = obj.strokeSettings.fillColor;
16167
16215
  shapeDetails.strokeWidth = obj.strokeSettings.strokeWidth;
16216
+ shapeDetails.degree = obj.rotatedAngle * (180 / Math.PI);
16168
16217
  break;
16169
16218
  case 'ellipse':
16170
16219
  shapeDetails.radius = obj.activePoint.width / 2;
16171
16220
  shapeDetails.strokeColor = obj.strokeSettings.strokeColor;
16172
16221
  shapeDetails.fillColor = obj.strokeSettings.fillColor;
16173
16222
  shapeDetails.strokeWidth = obj.strokeSettings.strokeWidth;
16223
+ shapeDetails.radiusX = obj.activePoint.width / 2;
16224
+ shapeDetails.radiusY = obj.activePoint.height / 2;
16225
+ shapeDetails.degree = obj.rotatedAngle * (180 / Math.PI);
16174
16226
  break;
16175
16227
  case 'line':
16176
16228
  case 'arrow':
16177
16229
  shapeDetails.length = obj.activePoint.width;
16178
16230
  shapeDetails.strokeColor = obj.strokeSettings.strokeColor;
16179
16231
  shapeDetails.strokeWidth = obj.strokeSettings.strokeWidth;
16232
+ shapeDetails.endX = obj.activePoint.endX;
16233
+ shapeDetails.endY = obj.activePoint.endY;
16234
+ if (obj.shape === 'arrow') {
16235
+ var arrowObj = { type: null };
16236
+ parent.notify('selection', { prop: 'getArrowType', onPropertyChange: false, value: { type: obj.start, obj: arrowObj } });
16237
+ shapeDetails.arrowHead = arrowObj['type'];
16238
+ parent.notify('selection', { prop: 'getArrowType', onPropertyChange: false, value: { type: obj.end, obj: arrowObj } });
16239
+ shapeDetails.arrowTail = arrowObj['type'];
16240
+ }
16180
16241
  break;
16181
16242
  case 'text':
16182
16243
  shapeDetails.text = obj.keyHistory;
@@ -16190,10 +16251,26 @@ var Shape = /** @__PURE__ @class */ (function () {
16190
16251
  if (obj.textSettings.italic) {
16191
16252
  shapeDetails.fontStyle.push('italic');
16192
16253
  }
16254
+ shapeDetails.degree = obj.rotatedAngle * (180 / Math.PI);
16193
16255
  break;
16194
16256
  case 'path':
16195
16257
  shapeDetails.strokeColor = obj.strokeSettings.strokeColor;
16196
16258
  shapeDetails.strokeWidth = obj.strokeSettings.strokeWidth;
16259
+ shapeDetails.points = obj.pointColl;
16260
+ break;
16261
+ case 'image':
16262
+ shapeDetails.imageData = obj.imageCanvas.toDataURL();
16263
+ shapeDetails.degree = obj.rotatedAngle * (180 / Math.PI);
16264
+ shapeDetails.width = obj.activePoint.width;
16265
+ shapeDetails.height = obj.activePoint.height;
16266
+ shapeDetails.opacity = obj.opacity;
16267
+ break;
16268
+ case 'image':
16269
+ shapeDetails.imageData = obj.imageCanvas.toDataURL();
16270
+ shapeDetails.degree = obj.rotatedAngle * (180 / Math.PI);
16271
+ shapeDetails.width = obj.activePoint.width;
16272
+ shapeDetails.height = obj.activePoint.height;
16273
+ shapeDetails.opacity = obj.opacity;
16197
16274
  break;
16198
16275
  }
16199
16276
  return shapeDetails;
@@ -20897,7 +20974,6 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
20897
20974
  EventHandler.add(this.lowerCanvas, 'mousedown', this.canvasMouseDownHandler, this);
20898
20975
  EventHandler.add(this.lowerCanvas, 'mousemove', this.canvasMouseMoveHandler, this);
20899
20976
  EventHandler.add(this.lowerCanvas, 'mouseup', this.canvasMouseUpHandler, this);
20900
- EventHandler.add(document, 'mouseup', this.canvasMouseUpHandler, this);
20901
20977
  EventHandler.add(this.upperCanvas, 'touchstart', this.touchStartHandler, this);
20902
20978
  EventHandler.add(this.lowerCanvas, 'touchstart', this.touchStartHandler, this);
20903
20979
  EventHandler.add(this.lowerCanvas, 'mousewheel DOMMouseScroll', this.handleScroll, this);
@@ -20924,7 +21000,6 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
20924
21000
  EventHandler.remove(this.lowerCanvas, 'mousedown', this.canvasMouseDownHandler);
20925
21001
  EventHandler.remove(this.lowerCanvas, 'mousemove', this.canvasMouseMoveHandler);
20926
21002
  EventHandler.remove(this.lowerCanvas, 'mouseup', this.canvasMouseUpHandler);
20927
- EventHandler.remove(document, 'mouseup', this.canvasMouseUpHandler);
20928
21003
  EventHandler.remove(this.upperCanvas, 'touchstart', this.touchStartHandler);
20929
21004
  EventHandler.remove(this.lowerCanvas, 'touchstart', this.touchStartHandler);
20930
21005
  EventHandler.remove(this.lowerCanvas, 'mousewheel DOMMouseScroll', this.handleScroll);
@@ -20937,7 +21012,6 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
20937
21012
  this.notify('selection', { prop: 'unWireEvent', onPropertyChange: false });
20938
21013
  };
20939
21014
  ImageEditor.prototype.createCanvas = function () {
20940
- var _this = this;
20941
21015
  this.element.style.boxSizing = 'border-box';
20942
21016
  var obj = { toolbarHeight: 0 };
20943
21017
  this.notify('toolbar', { prop: 'getToolbarHeight', value: { obj: obj } });
@@ -21023,10 +21097,16 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
21023
21097
  this.upperCanvas.style.cursor = this.cursor = 'default';
21024
21098
  this.upperCanvas.style.display = 'block';
21025
21099
  this.upperContext = this.upperCanvas.getContext('2d');
21026
- document.getElementById(this.element.id + '_dropBrowse').onclick = function () {
21027
- _this.element.querySelector('#' + _this.element.id + '_dropfileUpload').click();
21100
+ dropAnchorElement.addEventListener('click', function (e) {
21101
+ e.preventDefault();
21102
+ dropUploader.click();
21028
21103
  return false;
21029
- };
21104
+ });
21105
+ minDropAnchorElem.addEventListener('click', function (e) {
21106
+ e.preventDefault();
21107
+ dropUploader.click();
21108
+ return false;
21109
+ });
21030
21110
  };
21031
21111
  ImageEditor.prototype.touchStartHandler = function (e) {
21032
21112
  this.notify('selection', { prop: 'touchStartHandler', onPropertyChange: false, value: { e: e } });
@@ -21154,6 +21234,9 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
21154
21234
  */
21155
21235
  ImageEditor.prototype.getImageData = function () {
21156
21236
  var obj = { canvas: null };
21237
+ if (this.textArea.style.display === 'block' || this.textArea.style.display === 'inline-block') {
21238
+ this.okBtn();
21239
+ }
21157
21240
  this.notify('export', { prop: 'exportToCanvas', value: { object: obj } });
21158
21241
  return obj['canvas'].getContext('2d').getImageData(0, 0, obj['canvas'].width, obj['canvas'].height);
21159
21242
  };
@@ -28656,6 +28739,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
28656
28739
  step: step, width: Browser.isDevice ? '180px' : (type === 'straighten' ? '200px' : '300px'),
28657
28740
  cssClass: 'e-slider',
28658
28741
  change: function (args) {
28742
+ parent.notify('selection', { prop: 'setSliderActive', onPropertyChange: false, value: { bool: true } });
28659
28743
  if (type === 'transparency') {
28660
28744
  if (parent.activeObj.shape) {
28661
28745
  var prevCropObj = void 0;
@@ -28708,6 +28792,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
28708
28792
  parent.notify('selection', { prop: 'setSliding', value: { bool: false } });
28709
28793
  parent.notify('draw', { prop: 'redrawDownScale' });
28710
28794
  }
28795
+ parent.notify('selection', { prop: 'setSliderActive', onPropertyChange: false, value: { bool: false } });
28711
28796
  }
28712
28797
  });
28713
28798
  };