@syncfusion/ej2-image-editor 25.1.35 → 25.1.38

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.
@@ -7023,6 +7023,9 @@ class FreehandDrawing {
7023
7023
  case 'reset':
7024
7024
  this.reset();
7025
7025
  break;
7026
+ case 'triggerShapeChanging':
7027
+ this.triggerShapeChanging(args.value['shapeChangingArgs']);
7028
+ break;
7026
7029
  }
7027
7030
  }
7028
7031
  updateFhdPvtVar() {
@@ -13550,6 +13553,8 @@ class Shape {
13550
13553
  endX: parent.activeObj.activePoint.startX + parent.activeObj.activePoint.width,
13551
13554
  endY: parent.activeObj.activePoint.startY + parent.activeObj.activePoint.height,
13552
13555
  width: selectionSettings.width, height: selectionSettings.height };
13556
+ parent.activeObj.activePoint.endX = parent.activeObj.activePoint.startX + parent.activeObj.activePoint.width;
13557
+ parent.activeObj.activePoint.endY = parent.activeObj.activePoint.startY + parent.activeObj.activePoint.height;
13553
13558
  }
13554
13559
  updateShapeChangeEventArgs(shapeSettings) {
13555
13560
  const parent = this.parent;
@@ -13608,6 +13613,7 @@ class Shape {
13608
13613
  if (shapeSettings.degree) {
13609
13614
  parent.activeObj.rotatedAngle = shapeSettings.degree * (Math.PI / 180);
13610
13615
  }
13616
+ this.updateFontRatio(parent.activeObj);
13611
13617
  break;
13612
13618
  case 'rectangle':
13613
13619
  case 'image':
@@ -16253,7 +16259,7 @@ class Transform {
16253
16259
  this.resetZoom();
16254
16260
  break;
16255
16261
  case 'pan':
16256
- this.pan(args.value['value']);
16262
+ this.pan(args.value['value'], args.value['x'], args.value['y']);
16257
16263
  break;
16258
16264
  case 'zoom':
16259
16265
  this.zoom(args.value['zoomFactor'], args.value['zoomPoint']);
@@ -17266,12 +17272,12 @@ class Transform {
17266
17272
  parent.notify('selection', { prop: 'getPanDown', onPropertyChange: false, value: { obj: obj } });
17267
17273
  const panEventArgs = { startPoint: obj['panDown'], endPoint: this.panMove, cancel: false };
17268
17274
  parent.trigger('panning', panEventArgs);
17269
- this.panEvent(panEventArgs, xDiff, yDiff);
17270
- }
17271
- panEvent(panEventArgs, xDiff, yDiff) {
17272
17275
  if (panEventArgs.cancel) {
17273
17276
  return;
17274
17277
  }
17278
+ this.panEvent(xDiff, yDiff);
17279
+ }
17280
+ panEvent(xDiff, yDiff, isPanMethod) {
17275
17281
  const parent = this.parent;
17276
17282
  let isObjCreated = false;
17277
17283
  if (parent.activeObj.shape && parent.activeObj.shape === 'shape') {
@@ -17309,8 +17315,13 @@ class Transform {
17309
17315
  }
17310
17316
  if (parent.transform.degree === 0) {
17311
17317
  let point;
17312
- if (isNullOrUndefined(xDiff) && isNullOrUndefined(yDiff)) {
17313
- point = this.updatePanPoints();
17318
+ if ((isNullOrUndefined(xDiff) && isNullOrUndefined(yDiff)) || isPanMethod) {
17319
+ if (isPanMethod) {
17320
+ point = this.updatePanPoints(xDiff, yDiff);
17321
+ }
17322
+ else {
17323
+ point = this.updatePanPoints();
17324
+ }
17314
17325
  }
17315
17326
  else {
17316
17327
  point = { x: xDiff, y: yDiff };
@@ -17331,8 +17342,13 @@ class Transform {
17331
17342
  else {
17332
17343
  const tempFlipState = parent.transform.currFlipState;
17333
17344
  parent.isCropTab = true;
17334
- if (isNullOrUndefined(xDiff) && isNullOrUndefined(yDiff)) {
17335
- parent.panPoint.currentPannedPoint = this.updatePanPoints();
17345
+ if ((isNullOrUndefined(xDiff) && isNullOrUndefined(yDiff)) || isPanMethod) {
17346
+ if (isPanMethod) {
17347
+ parent.panPoint.currentPannedPoint = this.updatePanPoints(xDiff, yDiff);
17348
+ }
17349
+ else {
17350
+ parent.panPoint.currentPannedPoint = this.updatePanPoints();
17351
+ }
17336
17352
  }
17337
17353
  else {
17338
17354
  parent.panPoint.currentPannedPoint = { x: xDiff, y: yDiff };
@@ -17619,7 +17635,7 @@ class Transform {
17619
17635
  parent.notify('draw', { prop: 'updateActiveObject', onPropertyChange: false, value: { actPoint: actPoint,
17620
17636
  obj: parent.activeObj, isMouseMove: null, x: null, y: null } });
17621
17637
  }
17622
- pan(value) {
17638
+ pan(value, x, y) {
17623
17639
  const parent = this.parent;
17624
17640
  if (!parent.disabled && parent.isImageLoaded) {
17625
17641
  if (value) {
@@ -17629,6 +17645,15 @@ class Transform {
17629
17645
  parent.notify('selection', { prop: 'setDragCanvas', value: { bool: true } });
17630
17646
  parent.lowerCanvas.style.cursor = parent.upperCanvas.style.cursor = parent.cursor = 'grab';
17631
17647
  parent.notify('selection', { prop: 'setPanDown', onPropertyChange: false, value: { panDown: null } });
17648
+ if (x || y) {
17649
+ x = x ? x : 0;
17650
+ y = y ? y : 0;
17651
+ if (isNullOrUndefined(this.tempPanMove)) {
17652
+ this.tempPanMove = { x: this.panMove.x, y: this.panMove.y };
17653
+ }
17654
+ this.panEvent(x, y, true);
17655
+ this.tempPanMove = null;
17656
+ }
17632
17657
  }
17633
17658
  else {
17634
17659
  parent.togglePan = parent.currObjType.isCustomCrop = false;
@@ -17761,8 +17786,9 @@ class Transform {
17761
17786
  toolbarHeight = obj['toolbarHeight'];
17762
17787
  }
17763
17788
  }
17764
- if (Browser.isDevice && straightenObj['bool']) {
17765
- cxtTbarHeight = parent.element.querySelector('#' + parent.element.id + '_contextualToolbarArea').clientHeight;
17789
+ const ctxTbarArea = parent.element.querySelector('#' + parent.element.id + '_contextualToolbarArea');
17790
+ if (Browser.isDevice && straightenObj['bool'] && ctxTbarArea) {
17791
+ cxtTbarHeight = ctxTbarArea.clientHeight;
17766
17792
  }
17767
17793
  parent.notify('toolbar', { prop: 'setToolbarHeight', value: { height: toolbarHeight } });
17768
17794
  if (Browser.isDevice) {
@@ -17942,6 +17968,9 @@ class Transform {
17942
17968
  const cxtTbar = parent.element.querySelector('#' + parent.element.id + '_contextualToolbarArea');
17943
17969
  canvasMaxHeight -= cxtTbar ? cxtTbar.clientHeight : 0;
17944
17970
  }
17971
+ if (!isImgShape && parent.element.clientHeight === 0) {
17972
+ canvasMaxHeight = 0;
17973
+ }
17945
17974
  if (isNullOrUndefined(isImgShape)) {
17946
17975
  if (canvasMaxWidth > 30) {
17947
17976
  canvasMaxWidth -= 30;
@@ -17978,7 +18007,7 @@ class Transform {
17978
18007
  }
17979
18008
  return { width: cssMaxWidth, height: cssMaxHeight };
17980
18009
  }
17981
- updatePanPoints() {
18010
+ updatePanPoints(x, y) {
17982
18011
  const parent = this.parent;
17983
18012
  const tempActObj = extend({}, parent.activeObj, {}, true);
17984
18013
  const tempDestLeft = parent.img.destLeft;
@@ -17988,6 +18017,10 @@ class Transform {
17988
18017
  }
17989
18018
  let xDiff = this.panMove.x - this.tempPanMove.x;
17990
18019
  let yDiff = this.panMove.y - this.tempPanMove.y;
18020
+ if (x || y) {
18021
+ xDiff = x;
18022
+ yDiff = y;
18023
+ }
17991
18024
  parent.img.destLeft += xDiff;
17992
18025
  parent.img.destTop += yDiff;
17993
18026
  this.limitPan();
@@ -19140,32 +19173,6 @@ class UndoRedo {
19140
19173
  parent.notify('filter', { prop: 'setAdjustmentValue', onPropertyChange: false, value: { adjustmentValue: this.lowerContext.filter } });
19141
19174
  parent.currObjType.isCustomCrop = false;
19142
19175
  }
19143
- getImageAction(operation) {
19144
- if (['brightness', 'contrast', 'saturation', 'opacity', 'blur', 'hue'].indexOf(operation) !== -1) {
19145
- return 'FinetuneApplied';
19146
- }
19147
- else if (['chrome', 'cold', 'warm', 'grayscale', 'blackandwhite', 'sepia', 'invert'].indexOf(operation) !== -1) {
19148
- return 'FilterApplied';
19149
- }
19150
- else if (operation === 'frame') {
19151
- return 'FrameApplied';
19152
- }
19153
- else if (operation === 'resize') {
19154
- return 'ImageResized';
19155
- }
19156
- else if (['deleteFreehandDrawing', 'deleteObj'].indexOf(operation) !== -1) {
19157
- return 'ShapeDeleted';
19158
- }
19159
- else if (operation === 'crop') {
19160
- return 'Cropped';
19161
- }
19162
- else if (['shapeInsert', 'freehanddraw', 'freehand-draw'].indexOf(operation) !== -1) {
19163
- return 'ShapeInserted';
19164
- }
19165
- else {
19166
- return 'ShapeCustomized';
19167
- }
19168
- }
19169
19176
  updateUrc(operation, previousObj, previousObjColl, previousPointColl, previousSelPointColl, previousCropObj, previousText, currentText, previousFilter, isCircleCrop) {
19170
19177
  const parent = this.parent;
19171
19178
  if (parent.isResize || this.isPreventing) {
@@ -19887,7 +19894,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
19887
19894
  }
19888
19895
  createDropUploader() {
19889
19896
  const uploadObj = new Uploader({
19890
- dropArea: document.getElementsByClassName('e-canvas-wrapper')[0],
19897
+ dropArea: this.element.getElementsByClassName('e-canvas-wrapper')[0],
19891
19898
  allowedExtensions: '.jpg, .jpeg, .png,.svg',
19892
19899
  multiple: false,
19893
19900
  selected: (args) => {
@@ -20173,7 +20180,8 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
20173
20180
  notifyResetForAllModules() {
20174
20181
  const modules = this.requiredModules();
20175
20182
  for (let i = 0; i < modules.length; i++) {
20176
- this.notify(modules[i].member, { prop: 'reset', onPropertyChange: false });
20183
+ const module = modules[i].member;
20184
+ this.notify(module === 'toolbar-module' ? 'toolbar' : module, { prop: 'reset', onPropertyChange: false });
20177
20185
  }
20178
20186
  }
20179
20187
  allowShape(x, y) {
@@ -20477,14 +20485,16 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
20477
20485
  * Enable or disable a panning on the Image Editor.
20478
20486
  *
20479
20487
  * @param {boolean} value - Specifies a value whether enable or disable panning.
20488
+ * @param {number} x - Optional, Specifies a value to pan the image horizontally.
20489
+ * @param {number} y - Optional, Specifies a value to pan the image vertically.
20480
20490
  *
20481
20491
  * @remarks
20482
20492
  * This option will take into effect once the image's visibility is hidden when zooming an image or selection has been performed.
20483
20493
  *
20484
20494
  * @returns {void}.
20485
20495
  */
20486
- pan(value) {
20487
- this.notify('transform', { prop: 'pan', onPropertyChange: false, value: { value: value } });
20496
+ pan(value, x, y) {
20497
+ this.notify('transform', { prop: 'pan', onPropertyChange: false, value: { value: value, x: x, y: y } });
20488
20498
  }
20489
20499
  /**
20490
20500
  * Zoom in or out on a point in the image editor.
@@ -20992,8 +21002,19 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
20992
21002
  this.notify('shape', { prop: 'selectShape', onPropertyChange: false, value: { id: setting.id, obj: obj } });
20993
21003
  this.notify('selection', { prop: 'getFreehandDrawEditing', onPropertyChange: false, value: { obj: freehandObj } });
20994
21004
  if (obj['isSelected']) {
21005
+ const tempFontSize = this.activeObj.textSettings.fontSize;
20995
21006
  this.notify('shape', { prop: 'updateShapeChangeEventArgs', onPropertyChange: false,
20996
21007
  value: { shapeSettings: setting } });
21008
+ if (this.activeObj.shape === 'text' && tempFontSize) {
21009
+ const diff = this.activeObj.textSettings.fontSize - tempFontSize;
21010
+ if (diff !== 0) {
21011
+ this.activeObj.activePoint.height += diff;
21012
+ this.activeObj.activePoint.startY -= (diff / 2);
21013
+ this.activeObj.activePoint.endY += (diff / 2);
21014
+ this.notify('draw', { prop: 'updateActiveObject', onPropertyChange: false, value: { actPoint: this.activeObj.activePoint, obj: this.activeObj,
21015
+ isMouseMove: null, x: null, y: null } });
21016
+ }
21017
+ }
20997
21018
  const activeObj = extend({}, this.activeObj, {}, true);
20998
21019
  this.notify('shape', { prop: 'refreshActiveObj', onPropertyChange: false });
20999
21020
  this.notify('draw', { prop: 'render-image', value: { isMouseWheel: null, isPreventClearRect: null, isFrame: null } });
@@ -23289,12 +23310,6 @@ class ToolbarModule {
23289
23310
  case 'setSelectedFreehandColor':
23290
23311
  this.selFhdColor = args.value['color'];
23291
23312
  break;
23292
- case 'getCurrentFilter':
23293
- args.value['obj']['currentFilter'] = parent.currentFilter;
23294
- break;
23295
- case 'setCurrentFilter':
23296
- parent.currentFilter = args.value['filter'];
23297
- break;
23298
23313
  case 'setInitialAdjustmentValue':
23299
23314
  parent.initialAdjustmentValue = args.value['value'];
23300
23315
  break;
@@ -23316,9 +23331,6 @@ class ToolbarModule {
23316
23331
  case 'refreshSlider':
23317
23332
  this.refreshSlider();
23318
23333
  break;
23319
- case 'renderSlider':
23320
- this.renderSlider(args.value['type']);
23321
- break;
23322
23334
  case 'getCurrAdjustmentValue':
23323
23335
  parent.getCurrAdjustmentValue(args.value['type']);
23324
23336
  break;
@@ -23328,18 +23340,6 @@ class ToolbarModule {
23328
23340
  case 'refreshShapeDrawing':
23329
23341
  this.refreshShapeDrawing();
23330
23342
  break;
23331
- case 'getCropToolbar':
23332
- args.value['obj']['isCropToolbar'] = parent.isCropToolbar;
23333
- break;
23334
- case 'getPrevCurrSelectionPoint':
23335
- args.value['obj']['prevCurrSelectionPoint'] = parent.prevCurrSelectionPoint;
23336
- break;
23337
- case 'setPrevCurrSelectionPoint':
23338
- parent.prevCurrSelectionPoint = args.value['point'];
23339
- break;
23340
- case 'updateCropTransformItems':
23341
- parent.updateCropTransformItems();
23342
- break;
23343
23343
  case 'setEnableDisableUndoRedo':
23344
23344
  this.preventEnableDisableUr = args.value['isPrevent'];
23345
23345
  break;
@@ -23390,7 +23390,6 @@ class ToolbarModule {
23390
23390
  }
23391
23391
  reset() {
23392
23392
  const parent = this.parent;
23393
- this.defToolbarItems = [];
23394
23393
  this.toolbarHeight = 46;
23395
23394
  parent.prevCurrSelectionPoint = null;
23396
23395
  this.zoomBtnHold = null;
@@ -24177,6 +24176,10 @@ class ToolbarModule {
24177
24176
  this.parent.showDialogPopup();
24178
24177
  }
24179
24178
  }
24179
+ triggerTbarClickEvent(args) {
24180
+ const clickEvent = { item: args.item, originalEvent: args.event };
24181
+ this.parent.trigger('toolbarItemClicked', clickEvent);
24182
+ }
24180
24183
  renderAnnotationBtn(isContextualToolbar) {
24181
24184
  const parent = this.parent;
24182
24185
  let isCustomized = false;
@@ -24265,6 +24268,7 @@ class ToolbarModule {
24265
24268
  }
24266
24269
  },
24267
24270
  select: (args) => {
24271
+ this.triggerTbarClickEvent(args);
24268
24272
  parent.okBtn();
24269
24273
  let isCropSelection = false;
24270
24274
  let splitWords;
@@ -24285,6 +24289,9 @@ class ToolbarModule {
24285
24289
  }
24286
24290
  const obj = { currentFreehandDrawIndex: null };
24287
24291
  parent.notify('freehand-draw', { prop: 'getCurrentFreehandDrawIndex', value: { obj: obj } });
24292
+ const prevObj = { shapeSettingsObj: {} };
24293
+ let shapeSettings;
24294
+ let shapeChangingArgs;
24288
24295
  drpDownBtn.iconCss = 'e-icons ' + this.getCurrentShapeIcon(args.item.id);
24289
24296
  switch (args.item.id) {
24290
24297
  case 'pen':
@@ -24292,6 +24299,12 @@ class ToolbarModule {
24292
24299
  parent.notify('draw', { prop: 'setTempCurrentFreehandDrawIndex', value: { tempCurrentFreehandDrawIndex: obj['currentFreehandDrawIndex'] } });
24293
24300
  this.currentToolbar = 'pen';
24294
24301
  parent.freeHandDraw(true);
24302
+ parent.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: prevObj } });
24303
+ shapeSettings = prevObj['shapeSettingsObj'];
24304
+ shapeSettings.type = ShapeType.FreehandDraw;
24305
+ shapeChangingArgs = { cancel: false, action: 'insert', previousShapeSettings: shapeSettings,
24306
+ currentShapeSettings: shapeSettings };
24307
+ parent.notify('freehand-draw', { prop: 'triggerShapeChanging', value: { shapeChangingArgs: shapeChangingArgs } });
24295
24308
  break;
24296
24309
  case 'text':
24297
24310
  this.currentToolbar = 'text';
@@ -24301,12 +24314,22 @@ class ToolbarModule {
24301
24314
  this.currentToolbar = 'shapes';
24302
24315
  parent.element.querySelector('#' + id + '_fileUpload').click();
24303
24316
  break;
24304
- default:
24317
+ case 'ellipse':
24318
+ case 'arrow':
24319
+ case 'line':
24320
+ case 'rectangle':
24321
+ case 'path':
24305
24322
  this.currentToolbar = 'shapes';
24306
24323
  this.setInitialShapeSettings(args);
24307
24324
  parent.notify('selection', { prop: 'annotate', value: { shape: args.item.id } });
24308
24325
  parent.notify('toolbar', { prop: 'refresh-toolbar', onPropertyChange: false, value: { type: 'shapes',
24309
24326
  isApplyBtn: null, isCropping: null, isZooming: null, cType: null } });
24327
+ parent.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: prevObj } });
24328
+ shapeSettings = prevObj['shapeSettingsObj'];
24329
+ shapeChangingArgs = { cancel: false, action: 'insert', previousShapeSettings: shapeSettings,
24330
+ currentShapeSettings: shapeSettings };
24331
+ parent.trigger('shapeChanging', shapeChangingArgs);
24332
+ parent.notify('shape', { prop: 'updateShapeChangeEventArgs', value: { shapeSettings: shapeChangingArgs.currentShapeSettings } });
24310
24333
  break;
24311
24334
  }
24312
24335
  this.updateToolbarItems();
@@ -24411,6 +24434,7 @@ class ToolbarModule {
24411
24434
  },
24412
24435
  items: items,
24413
24436
  select: (args) => {
24437
+ this.triggerTbarClickEvent(args);
24414
24438
  this.cropSelect(args);
24415
24439
  drpDownBtn.iconCss = 'e-icons ' + this.getCurrentShapeIcon('crop-' + args.item.id);
24416
24440
  drpDownBtn.content = Browser.isDevice ? null : parent.toPascalCase(args.item.id);
@@ -24445,7 +24469,11 @@ class ToolbarModule {
24445
24469
  elem.style.display = 'block';
24446
24470
  }
24447
24471
  },
24448
- items: items, select: parent.transformSelect.bind(this),
24472
+ items: items,
24473
+ select: (args) => {
24474
+ this.triggerTbarClickEvent(args);
24475
+ parent.transformSelect.bind(this);
24476
+ },
24449
24477
  iconCss: 'e-icons e-transform', cssClass: 'e-image-popup'
24450
24478
  });
24451
24479
  drpDownBtn.appendTo('#' + parent.element.id + '_transformBtn');
@@ -24463,6 +24491,7 @@ class ToolbarModule {
24463
24491
  // Initialize the DropDownButton component.
24464
24492
  const saveDrpDownBtn = new DropDownButton({ items: saveItems, cssClass: 'e-caret-hide e-image-popup', iconCss: 'e-icons e-save',
24465
24493
  select: (args) => {
24494
+ this.triggerTbarClickEvent(args);
24466
24495
  parent.export(args.item.text);
24467
24496
  parent.isChangesSaved = true;
24468
24497
  parent.notify('draw', { prop: 'redrawDownScale' });
@@ -24935,6 +24964,7 @@ class ToolbarModule {
24935
24964
  }
24936
24965
  },
24937
24966
  select: (args) => {
24967
+ this.triggerTbarClickEvent(args);
24938
24968
  spanElem.textContent = args.item.text;
24939
24969
  parent.updateStrokeWidth(args.item.id);
24940
24970
  if (Browser.isDevice) {
@@ -24991,6 +25021,7 @@ class ToolbarModule {
24991
25021
  }
24992
25022
  },
24993
25023
  select: (args) => {
25024
+ this.triggerTbarClickEvent(args);
24994
25025
  spanElem.textContent = args.item.text;
24995
25026
  parent.updateArrow('startArrow', args.item.id);
24996
25027
  }
@@ -25032,6 +25063,7 @@ class ToolbarModule {
25032
25063
  }
25033
25064
  },
25034
25065
  select: (args) => {
25066
+ this.triggerTbarClickEvent(args);
25035
25067
  spanElem.textContent = args.item.text;
25036
25068
  parent.updateArrow('endArrow', args.item.id);
25037
25069
  }
@@ -25268,6 +25300,7 @@ class ToolbarModule {
25268
25300
  }
25269
25301
  },
25270
25302
  select: (args) => {
25303
+ this.triggerTbarClickEvent(args);
25271
25304
  spanElem.textContent = args.item.text;
25272
25305
  if (Browser.isDevice) {
25273
25306
  spanElem.setAttribute('style', 'font-family:' + args.item.id);
@@ -25296,6 +25329,7 @@ class ToolbarModule {
25296
25329
  args.element.querySelector('[aria-label *= ' + '"' + activeBtn + '"' + ']').classList.add('e-selected-btn');
25297
25330
  },
25298
25331
  select: (args) => {
25332
+ this.triggerTbarClickEvent(args);
25299
25333
  fontSizeSpanElem.textContent = args.item.text;
25300
25334
  parent.updateFontSize(args.item.text);
25301
25335
  }
@@ -25727,6 +25761,7 @@ class ToolbarModule {
25727
25761
  parent.element.querySelector('.e-template.e-pen-stroke-color').appendChild(parent.createElement('input', {
25728
25762
  id: id + '_pen_stroke'
25729
25763
  }));
25764
+ const presentVal = parent.activeObj.strokeSettings.strokeColor;
25730
25765
  const penColor = new ColorPicker({
25731
25766
  modeSwitcher: false, value: '#fff',
25732
25767
  showButtons: false, mode: 'Palette', cssClass: 'e-pen-color',
@@ -25752,6 +25787,9 @@ class ToolbarModule {
25752
25787
  }, '#' + id + '_penColorBtn');
25753
25788
  penColor.inline = true;
25754
25789
  penColor.value = penColor.getValue(parent.activeObj.strokeSettings.strokeColor, 'rgba');
25790
+ if (penColor.value === 'null') {
25791
+ penColor.value = presentVal;
25792
+ }
25755
25793
  const obj = { tempFreeHandDrawEditingStyles: null };
25756
25794
  parent.notify('freehand-draw', { prop: 'getTempFreeHandDrawEditingStyles', value: { obj: obj } });
25757
25795
  const indexObj = { freehandSelectedIndex: null };
@@ -25800,6 +25838,7 @@ class ToolbarModule {
25800
25838
  args.element.querySelector('[aria-label = ' + '"' + activeBtn + '"' + ']').classList.add('e-selected-btn');
25801
25839
  },
25802
25840
  select: (args) => {
25841
+ this.triggerTbarClickEvent(args);
25803
25842
  spanElem.textContent = args.item.text;
25804
25843
  parent.updatePenStrokeWidth(args.item.id);
25805
25844
  if (Browser.isDevice) {
@@ -26107,6 +26146,7 @@ class ToolbarModule {
26107
26146
  }
26108
26147
  },
26109
26148
  select: (args) => {
26149
+ this.triggerTbarClickEvent(args);
26110
26150
  prevFrameSettings = { type: parent.toPascalCase(parent.frameObj.type), color: parent.frameObj.color,
26111
26151
  gradientColor: parent.frameObj.gradientColor, size: parent.frameObj.size, inset: parent.frameObj.inset,
26112
26152
  offset: parent.frameObj.offset, borderRadius: parent.frameObj.radius, frameLineStyle: parent.toPascalCase(parent.frameObj.border),
@@ -26182,6 +26222,7 @@ class ToolbarModule {
26182
26222
  }
26183
26223
  },
26184
26224
  select: (args) => {
26225
+ this.triggerTbarClickEvent(args);
26185
26226
  prevFrameSettings = { type: parent.toPascalCase(parent.frameObj.type), color: parent.frameObj.color,
26186
26227
  gradientColor: parent.frameObj.gradientColor, size: parent.frameObj.size, inset: parent.frameObj.inset,
26187
26228
  offset: parent.frameObj.offset, borderRadius: parent.frameObj.radius, frameLineStyle: parent.toPascalCase(parent.frameObj.border),
@@ -26257,6 +26298,7 @@ class ToolbarModule {
26257
26298
  }
26258
26299
  },
26259
26300
  select: (args) => {
26301
+ this.triggerTbarClickEvent(args);
26260
26302
  prevFrameSettings = { type: parent.toPascalCase(parent.frameObj.type), color: parent.frameObj.color,
26261
26303
  gradientColor: parent.frameObj.gradientColor, size: parent.frameObj.size, inset: parent.frameObj.inset,
26262
26304
  offset: parent.frameObj.offset, borderRadius: parent.frameObj.radius, frameLineStyle: parent.toPascalCase(parent.frameObj.border),
@@ -26333,6 +26375,7 @@ class ToolbarModule {
26333
26375
  }
26334
26376
  },
26335
26377
  select: (args) => {
26378
+ this.triggerTbarClickEvent(args);
26336
26379
  prevFrameSettings = { type: parent.toPascalCase(parent.frameObj.type), color: parent.frameObj.color,
26337
26380
  gradientColor: parent.frameObj.gradientColor, size: parent.frameObj.size, inset: parent.frameObj.inset,
26338
26381
  offset: parent.frameObj.offset, borderRadius: parent.frameObj.radius, frameLineStyle: parent.toPascalCase(parent.frameObj.border),
@@ -26408,6 +26451,7 @@ class ToolbarModule {
26408
26451
  }
26409
26452
  },
26410
26453
  select: (args) => {
26454
+ this.triggerTbarClickEvent(args);
26411
26455
  prevFrameSettings = { type: parent.toPascalCase(parent.frameObj.type), color: parent.frameObj.color,
26412
26456
  gradientColor: parent.frameObj.gradientColor, size: parent.frameObj.size, inset: parent.frameObj.inset,
26413
26457
  offset: parent.frameObj.offset, borderRadius: parent.frameObj.radius, frameLineStyle: parent.toPascalCase(parent.frameObj.border),
@@ -26481,6 +26525,7 @@ class ToolbarModule {
26481
26525
  }
26482
26526
  },
26483
26527
  select: (args) => {
26528
+ this.triggerTbarClickEvent(args);
26484
26529
  prevFrameSettings = { type: parent.toPascalCase(parent.frameObj.type), color: parent.frameObj.color,
26485
26530
  gradientColor: parent.frameObj.gradientColor, size: parent.frameObj.size, inset: parent.frameObj.inset,
26486
26531
  offset: parent.frameObj.offset, borderRadius: parent.frameObj.radius, frameLineStyle: parent.toPascalCase(parent.frameObj.border),