@syncfusion/ej2-image-editor 22.2.9 → 22.2.10

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.
@@ -9370,8 +9370,10 @@ class Selection {
9370
9370
  isApplyBtn: null, isCropping: null, isZooming: null, cType: null } });
9371
9371
  }
9372
9372
  else if (parent.activeObj.shape === 'text') {
9373
- parent.notify('toolbar', { prop: 'refresh-toolbar', onPropertyChange: false, value: { type: 'text',
9374
- isApplyBtn: null, isCropping: null, isZooming: null, cType: null } });
9373
+ if (parent.textArea.style.display === 'none') {
9374
+ parent.notify('toolbar', { prop: 'refresh-toolbar', onPropertyChange: false, value: { type: 'text',
9375
+ isApplyBtn: null, isCropping: null, isZooming: null, cType: null } });
9376
+ }
9375
9377
  }
9376
9378
  else if (this.isFhdEditing) {
9377
9379
  parent.notify('toolbar', { prop: 'refresh-toolbar', onPropertyChange: false, value: { type: 'pen',
@@ -9388,7 +9390,7 @@ class Selection {
9388
9390
  || (parent.activeObj.shape === 'line' || parent.activeObj.shape === 'arrow' || parent.activeObj.shape === 'path')) {
9389
9391
  parent.updateToolbar(parent.element, parent.activeObj.shape);
9390
9392
  }
9391
- else if (parent.activeObj.shape === 'text') {
9393
+ else if (parent.activeObj.shape === 'text' && parent.textArea.style.display === 'none') {
9392
9394
  parent.updateToolbar(parent.element, 'text');
9393
9395
  }
9394
9396
  }
@@ -9715,12 +9717,12 @@ class Selection {
9715
9717
  }
9716
9718
  if (obj.keyHistory !== this.tempActiveObj.keyHistory ||
9717
9719
  (strokeColor && (strokeColor !== this.tempActiveObj.strokeSettings.strokeColor)) ||
9718
- obj.textSettings.fontFamily !== this.tempActiveObj.textSettings.fontFamily ||
9719
- Math.round(obj.textSettings.fontSize) !== Math.round(this.tempActiveObj.textSettings.fontSize) ||
9720
- Math.round(obj.textSettings.fontRatio) !== Math.round(this.tempActiveObj.textSettings.fontRatio) ||
9721
- obj.textSettings.bold !== this.tempActiveObj.textSettings.bold ||
9722
- obj.textSettings.italic !== this.tempActiveObj.textSettings.italic ||
9723
- obj.textSettings.underline !== this.tempActiveObj.textSettings.underline) {
9720
+ (obj.textSettings && obj.textSettings.fontFamily !== this.tempActiveObj.textSettings.fontFamily) ||
9721
+ (obj.textSettings && Math.round(obj.textSettings.fontSize) !== Math.round(this.tempActiveObj.textSettings.fontSize)) ||
9722
+ (obj.textSettings && Math.round(obj.textSettings.fontRatio) !== Math.round(this.tempActiveObj.textSettings.fontRatio)) ||
9723
+ (obj.textSettings && obj.textSettings.bold !== this.tempActiveObj.textSettings.bold) ||
9724
+ (obj.textSettings && obj.textSettings.italic !== this.tempActiveObj.textSettings.italic) ||
9725
+ (obj.textSettings && obj.textSettings.underline !== this.tempActiveObj.textSettings.underline)) {
9724
9726
  isApply = true;
9725
9727
  }
9726
9728
  if (this.isInitialTextEdited && !isApply) {
@@ -10466,6 +10468,9 @@ class Selection {
10466
10468
  isInside = true;
10467
10469
  }
10468
10470
  }
10471
+ else if (parent.textArea.style.display === 'block') {
10472
+ isInside = true;
10473
+ }
10469
10474
  if (!isInside) {
10470
10475
  if (isNullOrUndefined(parent.activeObj.currIndex)) {
10471
10476
  parent.activeObj.currIndex = 'shape_' + (parent.objColl.length + 1);
@@ -19365,26 +19370,36 @@ class ToolbarModule {
19365
19370
  }
19366
19371
  renderAnnotationBtn(isContextualToolbar) {
19367
19372
  const parent = this.parent;
19373
+ let isCustomized = false;
19368
19374
  const items = [];
19369
- if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Pen') > -1)) {
19375
+ const defItems = ['Ellipse', 'Arrow', 'Line', 'Rectangle', 'Pen', 'Path', 'Text'];
19376
+ if (parent.toolbar) {
19377
+ for (let i = 0; i < defItems.length; i++) {
19378
+ if (parent.toolbar.indexOf(defItems[i]) !== -1) {
19379
+ isCustomized = true;
19380
+ break;
19381
+ }
19382
+ }
19383
+ }
19384
+ if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Pen') > -1)) {
19370
19385
  items.push({ text: this.l10n.getConstant('Pen'), id: 'pen', iconCss: 'e-icons e-free-pen' });
19371
19386
  }
19372
- if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Line') > -1)) {
19387
+ if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Line') > -1)) {
19373
19388
  items.push({ text: this.l10n.getConstant('Line'), id: 'line', iconCss: 'e-icons e-line' });
19374
19389
  }
19375
- if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Rectangle') > -1)) {
19390
+ if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Rectangle') > -1)) {
19376
19391
  items.push({ text: this.l10n.getConstant('Rectangle'), id: 'rectangle', iconCss: 'e-icons e-rectangle' });
19377
19392
  }
19378
- if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Ellipse') > -1)) {
19393
+ if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Ellipse') > -1)) {
19379
19394
  items.push({ text: this.l10n.getConstant('Ellipse'), id: 'ellipse', iconCss: 'e-icons e-circle' });
19380
19395
  }
19381
- if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Arrow') > -1)) {
19396
+ if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Arrow') > -1)) {
19382
19397
  items.push({ text: this.l10n.getConstant('Arrow'), id: 'arrow', iconCss: 'e-icons e-arrow-right-up' });
19383
19398
  }
19384
- if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Path') > -1)) {
19399
+ if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Path') > -1)) {
19385
19400
  items.push({ text: this.l10n.getConstant('Path'), id: 'path', iconCss: 'e-icons e-critical-path' });
19386
19401
  }
19387
- if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Text') > -1)) {
19402
+ if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Text') > -1)) {
19388
19403
  items.push({ text: this.l10n.getConstant('Text'), id: 'text', iconCss: 'e-icons e-add-text' });
19389
19404
  }
19390
19405
  const obj = { freehandDrawSelectedId: null };
@@ -19488,16 +19503,26 @@ class ToolbarModule {
19488
19503
  renderCropBtn() {
19489
19504
  const parent = this.parent;
19490
19505
  const items = [];
19491
- if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('CustomSelection') > -1)) {
19506
+ let isCustomized = false;
19507
+ const defItems = ['CustomSelection', 'CircleSelection', 'SquareSelection', 'RatioSelection'];
19508
+ if (parent.toolbar) {
19509
+ for (let i = 0; i < defItems.length; i++) {
19510
+ if (parent.toolbar.indexOf(defItems[i]) !== -1) {
19511
+ isCustomized = true;
19512
+ break;
19513
+ }
19514
+ }
19515
+ }
19516
+ if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('CustomSelection') > -1)) {
19492
19517
  items.push({ text: this.l10n.getConstant('Custom'), id: 'custom', iconCss: 'e-icons e-custom' });
19493
19518
  }
19494
- if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('CircleSelection') > -1)) {
19519
+ if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('CircleSelection') > -1)) {
19495
19520
  items.push({ text: this.l10n.getConstant('Circle'), id: 'circle', iconCss: 'e-icons e-circle' });
19496
19521
  }
19497
- if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('SquareSelection') > -1)) {
19522
+ if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('SquareSelection') > -1)) {
19498
19523
  items.push({ text: this.l10n.getConstant('Square'), id: 'square', iconCss: 'e-icons e-square' });
19499
19524
  }
19500
- if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('RatioSelection') > -1)) {
19525
+ if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('RatioSelection') > -1)) {
19501
19526
  items.push({ text: '3:2', id: '3:2', iconCss: 'e-icons e-custom-a' });
19502
19527
  items.push({ text: '4:3', id: '4:3', iconCss: 'e-icons e-custom-b' });
19503
19528
  items.push({ text: '5:4', id: '5:4', iconCss: 'e-icons e-custom-c' });
@@ -19515,8 +19540,8 @@ class ToolbarModule {
19515
19540
  shape = parent.currSelectionPoint.shape;
19516
19541
  }
19517
19542
  else {
19518
- iconCss = 'e-custom';
19519
- shape = 'custom';
19543
+ iconCss = items[0].iconCss;
19544
+ shape = items[0].id;
19520
19545
  }
19521
19546
  const drpDownBtn = new DropDownButton({
19522
19547
  open: (args) => {
@@ -19598,15 +19623,29 @@ class ToolbarModule {
19598
19623
  template: '<button id="' + parent.element.id + '_cropBtn"></button>'
19599
19624
  });
19600
19625
  toolbarItems.push({ align: 'Center', type: 'Separator' });
19601
- toolbarItems.push({ id: parent.element.id + '_rotateLeft', prefixIcon: 'e-icons e-anti-clock-wise',
19602
- tooltipText: this.l10n.getConstant('RotateLeft'), align: 'Center' });
19603
- toolbarItems.push({ id: parent.element.id + '_rotateRight', prefixIcon: 'e-icons e-clock-wise',
19604
- tooltipText: this.l10n.getConstant('RotateRight'), align: 'Center' });
19605
- toolbarItems.push({ align: 'Center', type: 'Separator' });
19606
- toolbarItems.push({ id: parent.element.id + '_horizontalFlip', prefixIcon: 'e-icons e-horizontal-flip',
19607
- tooltipText: this.l10n.getConstant('HorizontalFlip'), align: 'Center' });
19608
- toolbarItems.push({ id: parent.element.id + '_verticalFlip', prefixIcon: 'e-icons e-vertical-flip',
19609
- tooltipText: this.l10n.getConstant('VerticalFlip'), align: 'Center' });
19626
+ if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && (parent.toolbar.indexOf('Transform') > -1 ||
19627
+ parent.toolbar.indexOf('RotateLeft') > -1))) {
19628
+ toolbarItems.push({ id: parent.element.id + '_rotateLeft', prefixIcon: 'e-icons e-anti-clock-wise',
19629
+ tooltipText: this.l10n.getConstant('RotateLeft'), align: 'Center' });
19630
+ }
19631
+ if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && (parent.toolbar.indexOf('Transform') > -1 ||
19632
+ parent.toolbar.indexOf('RotateRight') > -1))) {
19633
+ toolbarItems.push({ id: parent.element.id + '_rotateRight', prefixIcon: 'e-icons e-clock-wise',
19634
+ tooltipText: this.l10n.getConstant('RotateRight'), align: 'Center' });
19635
+ }
19636
+ if (toolbarItems.length > 2) {
19637
+ toolbarItems.push({ align: 'Center', type: 'Separator' });
19638
+ }
19639
+ if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && (parent.toolbar.indexOf('Transform') > -1 ||
19640
+ parent.toolbar.indexOf('HorizontalFlip') > -1))) {
19641
+ toolbarItems.push({ id: parent.element.id + '_horizontalFlip', prefixIcon: 'e-icons e-horizontal-flip',
19642
+ tooltipText: this.l10n.getConstant('HorizontalFlip'), align: 'Center' });
19643
+ }
19644
+ if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && (parent.toolbar.indexOf('Transform') > -1 ||
19645
+ parent.toolbar.indexOf('VerticalFlip') > -1))) {
19646
+ toolbarItems.push({ id: parent.element.id + '_verticalFlip', prefixIcon: 'e-icons e-vertical-flip',
19647
+ tooltipText: this.l10n.getConstant('VerticalFlip'), align: 'Center' });
19648
+ }
19610
19649
  if (!Browser.isDevice) {
19611
19650
  toolbarItems.push({ id: parent.element.id + '_ok', prefixIcon: 'e-icons e-check', cssClass: 'top-icon e-tick',
19612
19651
  tooltipText: this.l10n.getConstant('OK'), align: 'Right' });
@@ -19711,7 +19750,9 @@ class ToolbarModule {
19711
19750
  toolbar.refreshOverflow();
19712
19751
  }
19713
19752
  }
19714
- parent.select('custom');
19753
+ if (document.getElementById(parent.element.id + '_cropBtn')) {
19754
+ parent.select(document.getElementById(parent.element.id + '_cropBtn').textContent.toLowerCase());
19755
+ }
19715
19756
  }
19716
19757
  });
19717
19758
  if (Browser.isDevice) {
@@ -20343,31 +20384,41 @@ class ToolbarModule {
20343
20384
  getAdjustmentToolbarItem() {
20344
20385
  const toolbarItems = [];
20345
20386
  const parent = this.parent;
20346
- if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Brightness') > -1)) {
20387
+ let isCustomized = false;
20388
+ const defItems = ['Brightness', 'Contrast', 'Hue', 'Saturation', 'Exposure', 'Opacity', 'Blur'];
20389
+ if (parent.toolbar) {
20390
+ for (let i = 0; i < defItems.length; i++) {
20391
+ if (parent.toolbar.indexOf(defItems[i]) !== -1) {
20392
+ isCustomized = true;
20393
+ break;
20394
+ }
20395
+ }
20396
+ }
20397
+ if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Brightness') > -1)) {
20347
20398
  toolbarItems.push({ id: parent.element.id + '_brightness', prefixIcon: 'e-icons e-brightness', cssClass: 'top-icon e-brightness',
20348
20399
  tooltipText: this.l10n.getConstant('Brightness'), align: 'Center' });
20349
20400
  }
20350
- if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Contrast') > -1)) {
20401
+ if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Contrast') > -1)) {
20351
20402
  toolbarItems.push({ id: parent.element.id + '_contrast', prefixIcon: 'e-icons e-contrast', cssClass: 'top-icon e-contrast',
20352
20403
  tooltipText: this.l10n.getConstant('Contrast'), align: 'Center' });
20353
20404
  }
20354
- if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Hue') > -1)) {
20405
+ if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Hue') > -1)) {
20355
20406
  toolbarItems.push({ id: parent.element.id + '_hue', prefixIcon: 'e-icons e-fade', cssClass: 'top-icon e-fade',
20356
20407
  tooltipText: this.l10n.getConstant('Hue'), align: 'Center' });
20357
20408
  }
20358
- if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Saturation') > -1)) {
20409
+ if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Saturation') > -1)) {
20359
20410
  toolbarItems.push({ id: parent.element.id + '_saturation', prefixIcon: 'e-icons e-saturation', cssClass: 'top-icon e-saturation',
20360
20411
  tooltipText: this.l10n.getConstant('Saturation'), align: 'Center' });
20361
20412
  }
20362
- if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Exposure') > -1)) {
20413
+ if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Exposure') > -1)) {
20363
20414
  toolbarItems.push({ id: parent.element.id + '_exposure', prefixIcon: 'e-icons e-grain', cssClass: 'top-icon e-grain',
20364
20415
  tooltipText: this.l10n.getConstant('Exposure'), align: 'Center' });
20365
20416
  }
20366
- if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Opacity') > -1)) {
20417
+ if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Opacity') > -1)) {
20367
20418
  toolbarItems.push({ id: parent.element.id + '_opacity', prefixIcon: 'e-icons e-opacity', cssClass: 'top-icon e-opacity',
20368
20419
  tooltipText: this.l10n.getConstant('Opacity'), align: 'Center' });
20369
20420
  }
20370
- if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Blur') > -1)) {
20421
+ if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Blur') > -1)) {
20371
20422
  toolbarItems.push({ id: parent.element.id + '_blur', prefixIcon: 'e-icons e-tint', cssClass: 'top-icon e-tint',
20372
20423
  tooltipText: this.l10n.getConstant('Blur'), align: 'Center' });
20373
20424
  }
@@ -20386,37 +20437,47 @@ class ToolbarModule {
20386
20437
  getFilterToolbarItem() {
20387
20438
  const toolbarItems = [];
20388
20439
  const parent = this.parent;
20389
- if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Default') > -1)) {
20440
+ let isCustomized = false;
20441
+ const defItems = ['Default', 'Chrome', 'Cold', 'Warm', 'Grayscale', 'Sepia', 'Invert'];
20442
+ if (parent.toolbar) {
20443
+ for (let i = 0; i < defItems.length; i++) {
20444
+ if (parent.toolbar.indexOf(defItems[i]) !== -1) {
20445
+ isCustomized = true;
20446
+ break;
20447
+ }
20448
+ }
20449
+ }
20450
+ if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Default') > -1)) {
20390
20451
  toolbarItems.push({ id: parent.element.id + '_default', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
20391
20452
  tooltipText: this.l10n.getConstant('Default'), align: 'Center',
20392
20453
  template: '<div class="filter-wrapper" style="box-sizing: content-box;"><canvas id=' + parent.element.id + '_defaultCanvas' + '></canvas><div style="text-align:center;"><span>' + this.l10n.getConstant('Default') + '</span></div></div>' });
20393
20454
  }
20394
- if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Chrome') > -1)) {
20455
+ if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Chrome') > -1)) {
20395
20456
  toolbarItems.push({ id: parent.element.id + '_chrome', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
20396
20457
  tooltipText: this.l10n.getConstant('Chrome'), align: 'Center',
20397
20458
  template: '<div class="filter-wrapper" style="box-sizing: content-box;"><canvas id=' + parent.element.id + '_chromeCanvas' + '></canvas><div style="text-align:center;"><span>' + this.l10n.getConstant('Chrome') + '</span></div></div>' });
20398
20459
  }
20399
- if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Cold') > -1)) {
20460
+ if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Cold') > -1)) {
20400
20461
  toolbarItems.push({ id: parent.element.id + '_cold', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
20401
20462
  tooltipText: this.l10n.getConstant('Cold'), align: 'Center',
20402
20463
  template: '<div class="filter-wrapper" style="box-sizing: content-box;"><canvas id=' + parent.element.id + '_coldCanvas' + '></canvas><div style="text-align:center;"><span>' + this.l10n.getConstant('Cold') + '</span></div></div>' });
20403
20464
  }
20404
- if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Warm') > -1)) {
20465
+ if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Warm') > -1)) {
20405
20466
  toolbarItems.push({ id: parent.element.id + '_warm', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
20406
20467
  tooltipText: this.l10n.getConstant('Warm'), align: 'Center',
20407
20468
  template: '<div class="filter-wrapper" style="box-sizing: content-box;"><canvas id=' + parent.element.id + '_warmCanvas' + '></canvas><div style="text-align:center;"><span>' + this.l10n.getConstant('Warm') + '</span></div></div>' });
20408
20469
  }
20409
- if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Grayscale') > -1)) {
20470
+ if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Grayscale') > -1)) {
20410
20471
  toolbarItems.push({ id: parent.element.id + '_grayscale', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
20411
20472
  tooltipText: this.l10n.getConstant('Grayscale'), align: 'Center',
20412
20473
  template: '<div class="filter-wrapper" style="box-sizing: content-box;"><canvas id=' + parent.element.id + '_grayscaleCanvas' + '></canvas><div style="text-align:center;"><span>' + this.l10n.getConstant('Grayscale') + '</span></div></div>' });
20413
20474
  }
20414
- if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Sepia') > -1)) {
20475
+ if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Sepia') > -1)) {
20415
20476
  toolbarItems.push({ id: parent.element.id + '_sepia', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
20416
20477
  tooltipText: this.l10n.getConstant('Sepia'), align: 'Center',
20417
20478
  template: '<div class="filter-wrapper" style="box-sizing: content-box;"><canvas id=' + parent.element.id + '_sepiaCanvas' + '></canvas><div style="text-align:center;"><span>' + this.l10n.getConstant('Sepia') + '</span></div></div>' });
20418
20479
  }
20419
- if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Invert') > -1)) {
20480
+ if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Invert') > -1)) {
20420
20481
  toolbarItems.push({ id: parent.element.id + '_invert', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
20421
20482
  tooltipText: this.l10n.getConstant('Invert'), align: 'Center',
20422
20483
  template: '<div class="filter-wrapper" style="box-sizing: content-box;"><canvas id=' + parent.element.id + '_invertCanvas' + '></canvas><div style="text-align:center;"><span>' + this.l10n.getConstant('Invert') + '</span></div></div>' });
@@ -20686,7 +20747,9 @@ class ToolbarModule {
20686
20747
  if (hdrWrapper) {
20687
20748
  hdrWrapper.style.display = 'none';
20688
20749
  }
20689
- document.getElementById(parent.currentFilter + 'Canvas').parentElement.parentElement.classList.add('e-selected');
20750
+ if (document.getElementById(parent.currentFilter + 'Canvas')) {
20751
+ document.getElementById(parent.currentFilter + 'Canvas').parentElement.parentElement.classList.add('e-selected');
20752
+ }
20690
20753
  this.enableDisableTbrBtn();
20691
20754
  toolbar.refreshOverflow();
20692
20755
  }
@@ -21475,7 +21538,7 @@ class ToolbarModule {
21475
21538
  ];
21476
21539
  for (const selector of selectors) {
21477
21540
  const element = document.querySelector(selector);
21478
- if (element.classList.contains('e-selected-btn')) {
21541
+ if (element && element.classList.contains('e-selected-btn')) {
21479
21542
  element.classList.remove('e-selected-btn');
21480
21543
  break;
21481
21544
  }