@syncfusion/ej2-image-editor 22.2.9 → 22.2.11
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.
- package/CHANGELOG.md +18 -0
- package/dist/ej2-image-editor.umd.min.js +2 -2
- package/dist/ej2-image-editor.umd.min.js.map +1 -1
- package/dist/es6/ej2-image-editor.es2015.js +114 -48
- package/dist/es6/ej2-image-editor.es2015.js.map +1 -1
- package/dist/es6/ej2-image-editor.es5.js +114 -48
- package/dist/es6/ej2-image-editor.es5.js.map +1 -1
- package/dist/global/ej2-image-editor.min.js +2 -2
- package/dist/global/ej2-image-editor.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +8 -8
- package/src/image-editor/action/freehand-draw.js +3 -0
- package/src/image-editor/action/selection.js +14 -9
- package/src/image-editor/renderer/toolbar.js +97 -39
- package/styles/image-editor/material.css +1 -1
- package/styles/material.css +1 -1
|
@@ -5451,6 +5451,9 @@ class FreehandDrawing {
|
|
|
5451
5451
|
if (e.type === 'mouseup') {
|
|
5452
5452
|
this.processPoint(e.clientX - rect.left, e.clientY - rect.top, true, context);
|
|
5453
5453
|
}
|
|
5454
|
+
else if (e.type === 'touchend' && e.changedTouches) {
|
|
5455
|
+
this.processPoint(e.changedTouches[0].clientX - rect.left, e.changedTouches[0].clientY - rect.top, true, context);
|
|
5456
|
+
}
|
|
5454
5457
|
else {
|
|
5455
5458
|
if (!this.isFreehandPointMoved) {
|
|
5456
5459
|
this.processPoint(this.freehandDownPoint.x - rect.left, this.freehandDownPoint.y - rect.top, true, context);
|
|
@@ -9370,8 +9373,10 @@ class Selection {
|
|
|
9370
9373
|
isApplyBtn: null, isCropping: null, isZooming: null, cType: null } });
|
|
9371
9374
|
}
|
|
9372
9375
|
else if (parent.activeObj.shape === 'text') {
|
|
9373
|
-
parent.
|
|
9374
|
-
|
|
9376
|
+
if (parent.textArea.style.display === 'none') {
|
|
9377
|
+
parent.notify('toolbar', { prop: 'refresh-toolbar', onPropertyChange: false, value: { type: 'text',
|
|
9378
|
+
isApplyBtn: null, isCropping: null, isZooming: null, cType: null } });
|
|
9379
|
+
}
|
|
9375
9380
|
}
|
|
9376
9381
|
else if (this.isFhdEditing) {
|
|
9377
9382
|
parent.notify('toolbar', { prop: 'refresh-toolbar', onPropertyChange: false, value: { type: 'pen',
|
|
@@ -9388,7 +9393,7 @@ class Selection {
|
|
|
9388
9393
|
|| (parent.activeObj.shape === 'line' || parent.activeObj.shape === 'arrow' || parent.activeObj.shape === 'path')) {
|
|
9389
9394
|
parent.updateToolbar(parent.element, parent.activeObj.shape);
|
|
9390
9395
|
}
|
|
9391
|
-
else if (parent.activeObj.shape === 'text') {
|
|
9396
|
+
else if (parent.activeObj.shape === 'text' && parent.textArea.style.display === 'none') {
|
|
9392
9397
|
parent.updateToolbar(parent.element, 'text');
|
|
9393
9398
|
}
|
|
9394
9399
|
}
|
|
@@ -9715,12 +9720,12 @@ class Selection {
|
|
|
9715
9720
|
}
|
|
9716
9721
|
if (obj.keyHistory !== this.tempActiveObj.keyHistory ||
|
|
9717
9722
|
(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) {
|
|
9723
|
+
(obj.textSettings && obj.textSettings.fontFamily !== this.tempActiveObj.textSettings.fontFamily) ||
|
|
9724
|
+
(obj.textSettings && Math.round(obj.textSettings.fontSize) !== Math.round(this.tempActiveObj.textSettings.fontSize)) ||
|
|
9725
|
+
(obj.textSettings && Math.round(obj.textSettings.fontRatio) !== Math.round(this.tempActiveObj.textSettings.fontRatio)) ||
|
|
9726
|
+
(obj.textSettings && obj.textSettings.bold !== this.tempActiveObj.textSettings.bold) ||
|
|
9727
|
+
(obj.textSettings && obj.textSettings.italic !== this.tempActiveObj.textSettings.italic) ||
|
|
9728
|
+
(obj.textSettings && obj.textSettings.underline !== this.tempActiveObj.textSettings.underline)) {
|
|
9724
9729
|
isApply = true;
|
|
9725
9730
|
}
|
|
9726
9731
|
if (this.isInitialTextEdited && !isApply) {
|
|
@@ -10466,6 +10471,9 @@ class Selection {
|
|
|
10466
10471
|
isInside = true;
|
|
10467
10472
|
}
|
|
10468
10473
|
}
|
|
10474
|
+
else if (parent.textArea.style.display === 'block') {
|
|
10475
|
+
isInside = true;
|
|
10476
|
+
}
|
|
10469
10477
|
if (!isInside) {
|
|
10470
10478
|
if (isNullOrUndefined(parent.activeObj.currIndex)) {
|
|
10471
10479
|
parent.activeObj.currIndex = 'shape_' + (parent.objColl.length + 1);
|
|
@@ -19365,26 +19373,36 @@ class ToolbarModule {
|
|
|
19365
19373
|
}
|
|
19366
19374
|
renderAnnotationBtn(isContextualToolbar) {
|
|
19367
19375
|
const parent = this.parent;
|
|
19376
|
+
let isCustomized = false;
|
|
19368
19377
|
const items = [];
|
|
19369
|
-
|
|
19378
|
+
const defItems = ['Ellipse', 'Arrow', 'Line', 'Rectangle', 'Pen', 'Path', 'Text'];
|
|
19379
|
+
if (parent.toolbar) {
|
|
19380
|
+
for (let i = 0; i < defItems.length; i++) {
|
|
19381
|
+
if (parent.toolbar.indexOf(defItems[i]) !== -1) {
|
|
19382
|
+
isCustomized = true;
|
|
19383
|
+
break;
|
|
19384
|
+
}
|
|
19385
|
+
}
|
|
19386
|
+
}
|
|
19387
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Pen') > -1)) {
|
|
19370
19388
|
items.push({ text: this.l10n.getConstant('Pen'), id: 'pen', iconCss: 'e-icons e-free-pen' });
|
|
19371
19389
|
}
|
|
19372
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Line') > -1)) {
|
|
19390
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Line') > -1)) {
|
|
19373
19391
|
items.push({ text: this.l10n.getConstant('Line'), id: 'line', iconCss: 'e-icons e-line' });
|
|
19374
19392
|
}
|
|
19375
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Rectangle') > -1)) {
|
|
19393
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Rectangle') > -1)) {
|
|
19376
19394
|
items.push({ text: this.l10n.getConstant('Rectangle'), id: 'rectangle', iconCss: 'e-icons e-rectangle' });
|
|
19377
19395
|
}
|
|
19378
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Ellipse') > -1)) {
|
|
19396
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Ellipse') > -1)) {
|
|
19379
19397
|
items.push({ text: this.l10n.getConstant('Ellipse'), id: 'ellipse', iconCss: 'e-icons e-circle' });
|
|
19380
19398
|
}
|
|
19381
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Arrow') > -1)) {
|
|
19399
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Arrow') > -1)) {
|
|
19382
19400
|
items.push({ text: this.l10n.getConstant('Arrow'), id: 'arrow', iconCss: 'e-icons e-arrow-right-up' });
|
|
19383
19401
|
}
|
|
19384
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Path') > -1)) {
|
|
19402
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Path') > -1)) {
|
|
19385
19403
|
items.push({ text: this.l10n.getConstant('Path'), id: 'path', iconCss: 'e-icons e-critical-path' });
|
|
19386
19404
|
}
|
|
19387
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Text') > -1)) {
|
|
19405
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Text') > -1)) {
|
|
19388
19406
|
items.push({ text: this.l10n.getConstant('Text'), id: 'text', iconCss: 'e-icons e-add-text' });
|
|
19389
19407
|
}
|
|
19390
19408
|
const obj = { freehandDrawSelectedId: null };
|
|
@@ -19488,16 +19506,26 @@ class ToolbarModule {
|
|
|
19488
19506
|
renderCropBtn() {
|
|
19489
19507
|
const parent = this.parent;
|
|
19490
19508
|
const items = [];
|
|
19491
|
-
|
|
19509
|
+
let isCustomized = false;
|
|
19510
|
+
const defItems = ['CustomSelection', 'CircleSelection', 'SquareSelection', 'RatioSelection'];
|
|
19511
|
+
if (parent.toolbar) {
|
|
19512
|
+
for (let i = 0; i < defItems.length; i++) {
|
|
19513
|
+
if (parent.toolbar.indexOf(defItems[i]) !== -1) {
|
|
19514
|
+
isCustomized = true;
|
|
19515
|
+
break;
|
|
19516
|
+
}
|
|
19517
|
+
}
|
|
19518
|
+
}
|
|
19519
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('CustomSelection') > -1)) {
|
|
19492
19520
|
items.push({ text: this.l10n.getConstant('Custom'), id: 'custom', iconCss: 'e-icons e-custom' });
|
|
19493
19521
|
}
|
|
19494
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('CircleSelection') > -1)) {
|
|
19522
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('CircleSelection') > -1)) {
|
|
19495
19523
|
items.push({ text: this.l10n.getConstant('Circle'), id: 'circle', iconCss: 'e-icons e-circle' });
|
|
19496
19524
|
}
|
|
19497
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('SquareSelection') > -1)) {
|
|
19525
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('SquareSelection') > -1)) {
|
|
19498
19526
|
items.push({ text: this.l10n.getConstant('Square'), id: 'square', iconCss: 'e-icons e-square' });
|
|
19499
19527
|
}
|
|
19500
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('RatioSelection') > -1)) {
|
|
19528
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('RatioSelection') > -1)) {
|
|
19501
19529
|
items.push({ text: '3:2', id: '3:2', iconCss: 'e-icons e-custom-a' });
|
|
19502
19530
|
items.push({ text: '4:3', id: '4:3', iconCss: 'e-icons e-custom-b' });
|
|
19503
19531
|
items.push({ text: '5:4', id: '5:4', iconCss: 'e-icons e-custom-c' });
|
|
@@ -19515,8 +19543,8 @@ class ToolbarModule {
|
|
|
19515
19543
|
shape = parent.currSelectionPoint.shape;
|
|
19516
19544
|
}
|
|
19517
19545
|
else {
|
|
19518
|
-
iconCss =
|
|
19519
|
-
shape =
|
|
19546
|
+
iconCss = items[0].iconCss;
|
|
19547
|
+
shape = items[0].id;
|
|
19520
19548
|
}
|
|
19521
19549
|
const drpDownBtn = new DropDownButton({
|
|
19522
19550
|
open: (args) => {
|
|
@@ -19598,15 +19626,29 @@ class ToolbarModule {
|
|
|
19598
19626
|
template: '<button id="' + parent.element.id + '_cropBtn"></button>'
|
|
19599
19627
|
});
|
|
19600
19628
|
toolbarItems.push({ align: 'Center', type: 'Separator' });
|
|
19601
|
-
|
|
19602
|
-
|
|
19603
|
-
|
|
19604
|
-
|
|
19605
|
-
|
|
19606
|
-
|
|
19607
|
-
|
|
19608
|
-
|
|
19609
|
-
|
|
19629
|
+
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && (parent.toolbar.indexOf('Transform') > -1 ||
|
|
19630
|
+
parent.toolbar.indexOf('RotateLeft') > -1))) {
|
|
19631
|
+
toolbarItems.push({ id: parent.element.id + '_rotateLeft', prefixIcon: 'e-icons e-anti-clock-wise',
|
|
19632
|
+
tooltipText: this.l10n.getConstant('RotateLeft'), align: 'Center' });
|
|
19633
|
+
}
|
|
19634
|
+
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && (parent.toolbar.indexOf('Transform') > -1 ||
|
|
19635
|
+
parent.toolbar.indexOf('RotateRight') > -1))) {
|
|
19636
|
+
toolbarItems.push({ id: parent.element.id + '_rotateRight', prefixIcon: 'e-icons e-clock-wise',
|
|
19637
|
+
tooltipText: this.l10n.getConstant('RotateRight'), align: 'Center' });
|
|
19638
|
+
}
|
|
19639
|
+
if (toolbarItems.length > 2) {
|
|
19640
|
+
toolbarItems.push({ align: 'Center', type: 'Separator' });
|
|
19641
|
+
}
|
|
19642
|
+
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && (parent.toolbar.indexOf('Transform') > -1 ||
|
|
19643
|
+
parent.toolbar.indexOf('HorizontalFlip') > -1))) {
|
|
19644
|
+
toolbarItems.push({ id: parent.element.id + '_horizontalFlip', prefixIcon: 'e-icons e-horizontal-flip',
|
|
19645
|
+
tooltipText: this.l10n.getConstant('HorizontalFlip'), align: 'Center' });
|
|
19646
|
+
}
|
|
19647
|
+
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && (parent.toolbar.indexOf('Transform') > -1 ||
|
|
19648
|
+
parent.toolbar.indexOf('VerticalFlip') > -1))) {
|
|
19649
|
+
toolbarItems.push({ id: parent.element.id + '_verticalFlip', prefixIcon: 'e-icons e-vertical-flip',
|
|
19650
|
+
tooltipText: this.l10n.getConstant('VerticalFlip'), align: 'Center' });
|
|
19651
|
+
}
|
|
19610
19652
|
if (!Browser.isDevice) {
|
|
19611
19653
|
toolbarItems.push({ id: parent.element.id + '_ok', prefixIcon: 'e-icons e-check', cssClass: 'top-icon e-tick',
|
|
19612
19654
|
tooltipText: this.l10n.getConstant('OK'), align: 'Right' });
|
|
@@ -19711,7 +19753,9 @@ class ToolbarModule {
|
|
|
19711
19753
|
toolbar.refreshOverflow();
|
|
19712
19754
|
}
|
|
19713
19755
|
}
|
|
19714
|
-
parent.
|
|
19756
|
+
if (document.getElementById(parent.element.id + '_cropBtn')) {
|
|
19757
|
+
parent.select(document.getElementById(parent.element.id + '_cropBtn').textContent.toLowerCase());
|
|
19758
|
+
}
|
|
19715
19759
|
}
|
|
19716
19760
|
});
|
|
19717
19761
|
if (Browser.isDevice) {
|
|
@@ -20343,31 +20387,41 @@ class ToolbarModule {
|
|
|
20343
20387
|
getAdjustmentToolbarItem() {
|
|
20344
20388
|
const toolbarItems = [];
|
|
20345
20389
|
const parent = this.parent;
|
|
20346
|
-
|
|
20390
|
+
let isCustomized = false;
|
|
20391
|
+
const defItems = ['Brightness', 'Contrast', 'Hue', 'Saturation', 'Exposure', 'Opacity', 'Blur'];
|
|
20392
|
+
if (parent.toolbar) {
|
|
20393
|
+
for (let i = 0; i < defItems.length; i++) {
|
|
20394
|
+
if (parent.toolbar.indexOf(defItems[i]) !== -1) {
|
|
20395
|
+
isCustomized = true;
|
|
20396
|
+
break;
|
|
20397
|
+
}
|
|
20398
|
+
}
|
|
20399
|
+
}
|
|
20400
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Brightness') > -1)) {
|
|
20347
20401
|
toolbarItems.push({ id: parent.element.id + '_brightness', prefixIcon: 'e-icons e-brightness', cssClass: 'top-icon e-brightness',
|
|
20348
20402
|
tooltipText: this.l10n.getConstant('Brightness'), align: 'Center' });
|
|
20349
20403
|
}
|
|
20350
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Contrast') > -1)) {
|
|
20404
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Contrast') > -1)) {
|
|
20351
20405
|
toolbarItems.push({ id: parent.element.id + '_contrast', prefixIcon: 'e-icons e-contrast', cssClass: 'top-icon e-contrast',
|
|
20352
20406
|
tooltipText: this.l10n.getConstant('Contrast'), align: 'Center' });
|
|
20353
20407
|
}
|
|
20354
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Hue') > -1)) {
|
|
20408
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Hue') > -1)) {
|
|
20355
20409
|
toolbarItems.push({ id: parent.element.id + '_hue', prefixIcon: 'e-icons e-fade', cssClass: 'top-icon e-fade',
|
|
20356
20410
|
tooltipText: this.l10n.getConstant('Hue'), align: 'Center' });
|
|
20357
20411
|
}
|
|
20358
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Saturation') > -1)) {
|
|
20412
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Saturation') > -1)) {
|
|
20359
20413
|
toolbarItems.push({ id: parent.element.id + '_saturation', prefixIcon: 'e-icons e-saturation', cssClass: 'top-icon e-saturation',
|
|
20360
20414
|
tooltipText: this.l10n.getConstant('Saturation'), align: 'Center' });
|
|
20361
20415
|
}
|
|
20362
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Exposure') > -1)) {
|
|
20416
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Exposure') > -1)) {
|
|
20363
20417
|
toolbarItems.push({ id: parent.element.id + '_exposure', prefixIcon: 'e-icons e-grain', cssClass: 'top-icon e-grain',
|
|
20364
20418
|
tooltipText: this.l10n.getConstant('Exposure'), align: 'Center' });
|
|
20365
20419
|
}
|
|
20366
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Opacity') > -1)) {
|
|
20420
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Opacity') > -1)) {
|
|
20367
20421
|
toolbarItems.push({ id: parent.element.id + '_opacity', prefixIcon: 'e-icons e-opacity', cssClass: 'top-icon e-opacity',
|
|
20368
20422
|
tooltipText: this.l10n.getConstant('Opacity'), align: 'Center' });
|
|
20369
20423
|
}
|
|
20370
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Blur') > -1)) {
|
|
20424
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Blur') > -1)) {
|
|
20371
20425
|
toolbarItems.push({ id: parent.element.id + '_blur', prefixIcon: 'e-icons e-tint', cssClass: 'top-icon e-tint',
|
|
20372
20426
|
tooltipText: this.l10n.getConstant('Blur'), align: 'Center' });
|
|
20373
20427
|
}
|
|
@@ -20386,37 +20440,47 @@ class ToolbarModule {
|
|
|
20386
20440
|
getFilterToolbarItem() {
|
|
20387
20441
|
const toolbarItems = [];
|
|
20388
20442
|
const parent = this.parent;
|
|
20389
|
-
|
|
20443
|
+
let isCustomized = false;
|
|
20444
|
+
const defItems = ['Default', 'Chrome', 'Cold', 'Warm', 'Grayscale', 'Sepia', 'Invert'];
|
|
20445
|
+
if (parent.toolbar) {
|
|
20446
|
+
for (let i = 0; i < defItems.length; i++) {
|
|
20447
|
+
if (parent.toolbar.indexOf(defItems[i]) !== -1) {
|
|
20448
|
+
isCustomized = true;
|
|
20449
|
+
break;
|
|
20450
|
+
}
|
|
20451
|
+
}
|
|
20452
|
+
}
|
|
20453
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Default') > -1)) {
|
|
20390
20454
|
toolbarItems.push({ id: parent.element.id + '_default', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
|
|
20391
20455
|
tooltipText: this.l10n.getConstant('Default'), align: 'Center',
|
|
20392
20456
|
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
20457
|
}
|
|
20394
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Chrome') > -1)) {
|
|
20458
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Chrome') > -1)) {
|
|
20395
20459
|
toolbarItems.push({ id: parent.element.id + '_chrome', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
|
|
20396
20460
|
tooltipText: this.l10n.getConstant('Chrome'), align: 'Center',
|
|
20397
20461
|
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
20462
|
}
|
|
20399
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Cold') > -1)) {
|
|
20463
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Cold') > -1)) {
|
|
20400
20464
|
toolbarItems.push({ id: parent.element.id + '_cold', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
|
|
20401
20465
|
tooltipText: this.l10n.getConstant('Cold'), align: 'Center',
|
|
20402
20466
|
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
20467
|
}
|
|
20404
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Warm') > -1)) {
|
|
20468
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Warm') > -1)) {
|
|
20405
20469
|
toolbarItems.push({ id: parent.element.id + '_warm', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
|
|
20406
20470
|
tooltipText: this.l10n.getConstant('Warm'), align: 'Center',
|
|
20407
20471
|
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
20472
|
}
|
|
20409
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Grayscale') > -1)) {
|
|
20473
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Grayscale') > -1)) {
|
|
20410
20474
|
toolbarItems.push({ id: parent.element.id + '_grayscale', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
|
|
20411
20475
|
tooltipText: this.l10n.getConstant('Grayscale'), align: 'Center',
|
|
20412
20476
|
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
20477
|
}
|
|
20414
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Sepia') > -1)) {
|
|
20478
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Sepia') > -1)) {
|
|
20415
20479
|
toolbarItems.push({ id: parent.element.id + '_sepia', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
|
|
20416
20480
|
tooltipText: this.l10n.getConstant('Sepia'), align: 'Center',
|
|
20417
20481
|
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
20482
|
}
|
|
20419
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Invert') > -1)) {
|
|
20483
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Invert') > -1)) {
|
|
20420
20484
|
toolbarItems.push({ id: parent.element.id + '_invert', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
|
|
20421
20485
|
tooltipText: this.l10n.getConstant('Invert'), align: 'Center',
|
|
20422
20486
|
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 +20750,9 @@ class ToolbarModule {
|
|
|
20686
20750
|
if (hdrWrapper) {
|
|
20687
20751
|
hdrWrapper.style.display = 'none';
|
|
20688
20752
|
}
|
|
20689
|
-
document.getElementById(parent.currentFilter + 'Canvas')
|
|
20753
|
+
if (document.getElementById(parent.currentFilter + 'Canvas')) {
|
|
20754
|
+
document.getElementById(parent.currentFilter + 'Canvas').parentElement.parentElement.classList.add('e-selected');
|
|
20755
|
+
}
|
|
20690
20756
|
this.enableDisableTbrBtn();
|
|
20691
20757
|
toolbar.refreshOverflow();
|
|
20692
20758
|
}
|
|
@@ -21475,7 +21541,7 @@ class ToolbarModule {
|
|
|
21475
21541
|
];
|
|
21476
21542
|
for (const selector of selectors) {
|
|
21477
21543
|
const element = document.querySelector(selector);
|
|
21478
|
-
if (element.classList.contains('e-selected-btn')) {
|
|
21544
|
+
if (element && element.classList.contains('e-selected-btn')) {
|
|
21479
21545
|
element.classList.remove('e-selected-btn');
|
|
21480
21546
|
break;
|
|
21481
21547
|
}
|