@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.
- package/CHANGELOG.md +10 -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 +111 -48
- package/dist/es6/ej2-image-editor.es2015.js.map +1 -1
- package/dist/es6/ej2-image-editor.es5.js +111 -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 +6 -6
- package/src/image-editor/action/selection.js +14 -9
- package/src/image-editor/renderer/toolbar.js +97 -39
|
@@ -9385,8 +9385,10 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
9385
9385
|
isApplyBtn: null, isCropping: null, isZooming: null, cType: null } });
|
|
9386
9386
|
}
|
|
9387
9387
|
else if (parent.activeObj.shape === 'text') {
|
|
9388
|
-
parent.
|
|
9389
|
-
|
|
9388
|
+
if (parent.textArea.style.display === 'none') {
|
|
9389
|
+
parent.notify('toolbar', { prop: 'refresh-toolbar', onPropertyChange: false, value: { type: 'text',
|
|
9390
|
+
isApplyBtn: null, isCropping: null, isZooming: null, cType: null } });
|
|
9391
|
+
}
|
|
9390
9392
|
}
|
|
9391
9393
|
else if (this.isFhdEditing) {
|
|
9392
9394
|
parent.notify('toolbar', { prop: 'refresh-toolbar', onPropertyChange: false, value: { type: 'pen',
|
|
@@ -9403,7 +9405,7 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
9403
9405
|
|| (parent.activeObj.shape === 'line' || parent.activeObj.shape === 'arrow' || parent.activeObj.shape === 'path')) {
|
|
9404
9406
|
parent.updateToolbar(parent.element, parent.activeObj.shape);
|
|
9405
9407
|
}
|
|
9406
|
-
else if (parent.activeObj.shape === 'text') {
|
|
9408
|
+
else if (parent.activeObj.shape === 'text' && parent.textArea.style.display === 'none') {
|
|
9407
9409
|
parent.updateToolbar(parent.element, 'text');
|
|
9408
9410
|
}
|
|
9409
9411
|
}
|
|
@@ -9730,12 +9732,12 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
9730
9732
|
}
|
|
9731
9733
|
if (obj.keyHistory !== this.tempActiveObj.keyHistory ||
|
|
9732
9734
|
(strokeColor && (strokeColor !== this.tempActiveObj.strokeSettings.strokeColor)) ||
|
|
9733
|
-
obj.textSettings.fontFamily !== this.tempActiveObj.textSettings.fontFamily ||
|
|
9734
|
-
Math.round(obj.textSettings.fontSize) !== Math.round(this.tempActiveObj.textSettings.fontSize) ||
|
|
9735
|
-
Math.round(obj.textSettings.fontRatio) !== Math.round(this.tempActiveObj.textSettings.fontRatio) ||
|
|
9736
|
-
obj.textSettings.bold !== this.tempActiveObj.textSettings.bold ||
|
|
9737
|
-
obj.textSettings.italic !== this.tempActiveObj.textSettings.italic ||
|
|
9738
|
-
obj.textSettings.underline !== this.tempActiveObj.textSettings.underline) {
|
|
9735
|
+
(obj.textSettings && obj.textSettings.fontFamily !== this.tempActiveObj.textSettings.fontFamily) ||
|
|
9736
|
+
(obj.textSettings && Math.round(obj.textSettings.fontSize) !== Math.round(this.tempActiveObj.textSettings.fontSize)) ||
|
|
9737
|
+
(obj.textSettings && Math.round(obj.textSettings.fontRatio) !== Math.round(this.tempActiveObj.textSettings.fontRatio)) ||
|
|
9738
|
+
(obj.textSettings && obj.textSettings.bold !== this.tempActiveObj.textSettings.bold) ||
|
|
9739
|
+
(obj.textSettings && obj.textSettings.italic !== this.tempActiveObj.textSettings.italic) ||
|
|
9740
|
+
(obj.textSettings && obj.textSettings.underline !== this.tempActiveObj.textSettings.underline)) {
|
|
9739
9741
|
isApply = true;
|
|
9740
9742
|
}
|
|
9741
9743
|
if (this.isInitialTextEdited && !isApply) {
|
|
@@ -10483,6 +10485,9 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
10483
10485
|
isInside = true;
|
|
10484
10486
|
}
|
|
10485
10487
|
}
|
|
10488
|
+
else if (parent.textArea.style.display === 'block') {
|
|
10489
|
+
isInside = true;
|
|
10490
|
+
}
|
|
10486
10491
|
if (!isInside) {
|
|
10487
10492
|
if (isNullOrUndefined(parent.activeObj.currIndex)) {
|
|
10488
10493
|
parent.activeObj.currIndex = 'shape_' + (parent.objColl.length + 1);
|
|
@@ -19432,26 +19437,36 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
19432
19437
|
ToolbarModule.prototype.renderAnnotationBtn = function (isContextualToolbar) {
|
|
19433
19438
|
var _this = this;
|
|
19434
19439
|
var parent = this.parent;
|
|
19440
|
+
var isCustomized = false;
|
|
19435
19441
|
var items = [];
|
|
19436
|
-
|
|
19442
|
+
var defItems = ['Ellipse', 'Arrow', 'Line', 'Rectangle', 'Pen', 'Path', 'Text'];
|
|
19443
|
+
if (parent.toolbar) {
|
|
19444
|
+
for (var i = 0; i < defItems.length; i++) {
|
|
19445
|
+
if (parent.toolbar.indexOf(defItems[i]) !== -1) {
|
|
19446
|
+
isCustomized = true;
|
|
19447
|
+
break;
|
|
19448
|
+
}
|
|
19449
|
+
}
|
|
19450
|
+
}
|
|
19451
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Pen') > -1)) {
|
|
19437
19452
|
items.push({ text: this.l10n.getConstant('Pen'), id: 'pen', iconCss: 'e-icons e-free-pen' });
|
|
19438
19453
|
}
|
|
19439
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Line') > -1)) {
|
|
19454
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Line') > -1)) {
|
|
19440
19455
|
items.push({ text: this.l10n.getConstant('Line'), id: 'line', iconCss: 'e-icons e-line' });
|
|
19441
19456
|
}
|
|
19442
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Rectangle') > -1)) {
|
|
19457
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Rectangle') > -1)) {
|
|
19443
19458
|
items.push({ text: this.l10n.getConstant('Rectangle'), id: 'rectangle', iconCss: 'e-icons e-rectangle' });
|
|
19444
19459
|
}
|
|
19445
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Ellipse') > -1)) {
|
|
19460
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Ellipse') > -1)) {
|
|
19446
19461
|
items.push({ text: this.l10n.getConstant('Ellipse'), id: 'ellipse', iconCss: 'e-icons e-circle' });
|
|
19447
19462
|
}
|
|
19448
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Arrow') > -1)) {
|
|
19463
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Arrow') > -1)) {
|
|
19449
19464
|
items.push({ text: this.l10n.getConstant('Arrow'), id: 'arrow', iconCss: 'e-icons e-arrow-right-up' });
|
|
19450
19465
|
}
|
|
19451
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Path') > -1)) {
|
|
19466
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Path') > -1)) {
|
|
19452
19467
|
items.push({ text: this.l10n.getConstant('Path'), id: 'path', iconCss: 'e-icons e-critical-path' });
|
|
19453
19468
|
}
|
|
19454
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Text') > -1)) {
|
|
19469
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Text') > -1)) {
|
|
19455
19470
|
items.push({ text: this.l10n.getConstant('Text'), id: 'text', iconCss: 'e-icons e-add-text' });
|
|
19456
19471
|
}
|
|
19457
19472
|
var obj = { freehandDrawSelectedId: null };
|
|
@@ -19556,16 +19571,26 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
19556
19571
|
var _this = this;
|
|
19557
19572
|
var parent = this.parent;
|
|
19558
19573
|
var items = [];
|
|
19559
|
-
|
|
19574
|
+
var isCustomized = false;
|
|
19575
|
+
var defItems = ['CustomSelection', 'CircleSelection', 'SquareSelection', 'RatioSelection'];
|
|
19576
|
+
if (parent.toolbar) {
|
|
19577
|
+
for (var i = 0; i < defItems.length; i++) {
|
|
19578
|
+
if (parent.toolbar.indexOf(defItems[i]) !== -1) {
|
|
19579
|
+
isCustomized = true;
|
|
19580
|
+
break;
|
|
19581
|
+
}
|
|
19582
|
+
}
|
|
19583
|
+
}
|
|
19584
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('CustomSelection') > -1)) {
|
|
19560
19585
|
items.push({ text: this.l10n.getConstant('Custom'), id: 'custom', iconCss: 'e-icons e-custom' });
|
|
19561
19586
|
}
|
|
19562
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('CircleSelection') > -1)) {
|
|
19587
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('CircleSelection') > -1)) {
|
|
19563
19588
|
items.push({ text: this.l10n.getConstant('Circle'), id: 'circle', iconCss: 'e-icons e-circle' });
|
|
19564
19589
|
}
|
|
19565
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('SquareSelection') > -1)) {
|
|
19590
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('SquareSelection') > -1)) {
|
|
19566
19591
|
items.push({ text: this.l10n.getConstant('Square'), id: 'square', iconCss: 'e-icons e-square' });
|
|
19567
19592
|
}
|
|
19568
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('RatioSelection') > -1)) {
|
|
19593
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('RatioSelection') > -1)) {
|
|
19569
19594
|
items.push({ text: '3:2', id: '3:2', iconCss: 'e-icons e-custom-a' });
|
|
19570
19595
|
items.push({ text: '4:3', id: '4:3', iconCss: 'e-icons e-custom-b' });
|
|
19571
19596
|
items.push({ text: '5:4', id: '5:4', iconCss: 'e-icons e-custom-c' });
|
|
@@ -19583,8 +19608,8 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
19583
19608
|
shape = parent.currSelectionPoint.shape;
|
|
19584
19609
|
}
|
|
19585
19610
|
else {
|
|
19586
|
-
iconCss =
|
|
19587
|
-
shape =
|
|
19611
|
+
iconCss = items[0].iconCss;
|
|
19612
|
+
shape = items[0].id;
|
|
19588
19613
|
}
|
|
19589
19614
|
var drpDownBtn = new DropDownButton({
|
|
19590
19615
|
open: function (args) {
|
|
@@ -19666,15 +19691,29 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
19666
19691
|
template: '<button id="' + parent.element.id + '_cropBtn"></button>'
|
|
19667
19692
|
});
|
|
19668
19693
|
toolbarItems.push({ align: 'Center', type: 'Separator' });
|
|
19669
|
-
|
|
19670
|
-
|
|
19671
|
-
|
|
19672
|
-
|
|
19673
|
-
|
|
19674
|
-
|
|
19675
|
-
|
|
19676
|
-
|
|
19677
|
-
|
|
19694
|
+
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && (parent.toolbar.indexOf('Transform') > -1 ||
|
|
19695
|
+
parent.toolbar.indexOf('RotateLeft') > -1))) {
|
|
19696
|
+
toolbarItems.push({ id: parent.element.id + '_rotateLeft', prefixIcon: 'e-icons e-anti-clock-wise',
|
|
19697
|
+
tooltipText: this.l10n.getConstant('RotateLeft'), align: 'Center' });
|
|
19698
|
+
}
|
|
19699
|
+
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && (parent.toolbar.indexOf('Transform') > -1 ||
|
|
19700
|
+
parent.toolbar.indexOf('RotateRight') > -1))) {
|
|
19701
|
+
toolbarItems.push({ id: parent.element.id + '_rotateRight', prefixIcon: 'e-icons e-clock-wise',
|
|
19702
|
+
tooltipText: this.l10n.getConstant('RotateRight'), align: 'Center' });
|
|
19703
|
+
}
|
|
19704
|
+
if (toolbarItems.length > 2) {
|
|
19705
|
+
toolbarItems.push({ align: 'Center', type: 'Separator' });
|
|
19706
|
+
}
|
|
19707
|
+
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && (parent.toolbar.indexOf('Transform') > -1 ||
|
|
19708
|
+
parent.toolbar.indexOf('HorizontalFlip') > -1))) {
|
|
19709
|
+
toolbarItems.push({ id: parent.element.id + '_horizontalFlip', prefixIcon: 'e-icons e-horizontal-flip',
|
|
19710
|
+
tooltipText: this.l10n.getConstant('HorizontalFlip'), align: 'Center' });
|
|
19711
|
+
}
|
|
19712
|
+
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && (parent.toolbar.indexOf('Transform') > -1 ||
|
|
19713
|
+
parent.toolbar.indexOf('VerticalFlip') > -1))) {
|
|
19714
|
+
toolbarItems.push({ id: parent.element.id + '_verticalFlip', prefixIcon: 'e-icons e-vertical-flip',
|
|
19715
|
+
tooltipText: this.l10n.getConstant('VerticalFlip'), align: 'Center' });
|
|
19716
|
+
}
|
|
19678
19717
|
if (!Browser.isDevice) {
|
|
19679
19718
|
toolbarItems.push({ id: parent.element.id + '_ok', prefixIcon: 'e-icons e-check', cssClass: 'top-icon e-tick',
|
|
19680
19719
|
tooltipText: this.l10n.getConstant('OK'), align: 'Right' });
|
|
@@ -19780,7 +19819,9 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
19780
19819
|
toolbar.refreshOverflow();
|
|
19781
19820
|
}
|
|
19782
19821
|
}
|
|
19783
|
-
parent.
|
|
19822
|
+
if (document.getElementById(parent.element.id + '_cropBtn')) {
|
|
19823
|
+
parent.select(document.getElementById(parent.element.id + '_cropBtn').textContent.toLowerCase());
|
|
19824
|
+
}
|
|
19784
19825
|
}
|
|
19785
19826
|
});
|
|
19786
19827
|
if (Browser.isDevice) {
|
|
@@ -20414,31 +20455,41 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
20414
20455
|
ToolbarModule.prototype.getAdjustmentToolbarItem = function () {
|
|
20415
20456
|
var toolbarItems = [];
|
|
20416
20457
|
var parent = this.parent;
|
|
20417
|
-
|
|
20458
|
+
var isCustomized = false;
|
|
20459
|
+
var defItems = ['Brightness', 'Contrast', 'Hue', 'Saturation', 'Exposure', 'Opacity', 'Blur'];
|
|
20460
|
+
if (parent.toolbar) {
|
|
20461
|
+
for (var i = 0; i < defItems.length; i++) {
|
|
20462
|
+
if (parent.toolbar.indexOf(defItems[i]) !== -1) {
|
|
20463
|
+
isCustomized = true;
|
|
20464
|
+
break;
|
|
20465
|
+
}
|
|
20466
|
+
}
|
|
20467
|
+
}
|
|
20468
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Brightness') > -1)) {
|
|
20418
20469
|
toolbarItems.push({ id: parent.element.id + '_brightness', prefixIcon: 'e-icons e-brightness', cssClass: 'top-icon e-brightness',
|
|
20419
20470
|
tooltipText: this.l10n.getConstant('Brightness'), align: 'Center' });
|
|
20420
20471
|
}
|
|
20421
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Contrast') > -1)) {
|
|
20472
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Contrast') > -1)) {
|
|
20422
20473
|
toolbarItems.push({ id: parent.element.id + '_contrast', prefixIcon: 'e-icons e-contrast', cssClass: 'top-icon e-contrast',
|
|
20423
20474
|
tooltipText: this.l10n.getConstant('Contrast'), align: 'Center' });
|
|
20424
20475
|
}
|
|
20425
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Hue') > -1)) {
|
|
20476
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Hue') > -1)) {
|
|
20426
20477
|
toolbarItems.push({ id: parent.element.id + '_hue', prefixIcon: 'e-icons e-fade', cssClass: 'top-icon e-fade',
|
|
20427
20478
|
tooltipText: this.l10n.getConstant('Hue'), align: 'Center' });
|
|
20428
20479
|
}
|
|
20429
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Saturation') > -1)) {
|
|
20480
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Saturation') > -1)) {
|
|
20430
20481
|
toolbarItems.push({ id: parent.element.id + '_saturation', prefixIcon: 'e-icons e-saturation', cssClass: 'top-icon e-saturation',
|
|
20431
20482
|
tooltipText: this.l10n.getConstant('Saturation'), align: 'Center' });
|
|
20432
20483
|
}
|
|
20433
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Exposure') > -1)) {
|
|
20484
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Exposure') > -1)) {
|
|
20434
20485
|
toolbarItems.push({ id: parent.element.id + '_exposure', prefixIcon: 'e-icons e-grain', cssClass: 'top-icon e-grain',
|
|
20435
20486
|
tooltipText: this.l10n.getConstant('Exposure'), align: 'Center' });
|
|
20436
20487
|
}
|
|
20437
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Opacity') > -1)) {
|
|
20488
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Opacity') > -1)) {
|
|
20438
20489
|
toolbarItems.push({ id: parent.element.id + '_opacity', prefixIcon: 'e-icons e-opacity', cssClass: 'top-icon e-opacity',
|
|
20439
20490
|
tooltipText: this.l10n.getConstant('Opacity'), align: 'Center' });
|
|
20440
20491
|
}
|
|
20441
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Blur') > -1)) {
|
|
20492
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Blur') > -1)) {
|
|
20442
20493
|
toolbarItems.push({ id: parent.element.id + '_blur', prefixIcon: 'e-icons e-tint', cssClass: 'top-icon e-tint',
|
|
20443
20494
|
tooltipText: this.l10n.getConstant('Blur'), align: 'Center' });
|
|
20444
20495
|
}
|
|
@@ -20457,37 +20508,47 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
20457
20508
|
ToolbarModule.prototype.getFilterToolbarItem = function () {
|
|
20458
20509
|
var toolbarItems = [];
|
|
20459
20510
|
var parent = this.parent;
|
|
20460
|
-
|
|
20511
|
+
var isCustomized = false;
|
|
20512
|
+
var defItems = ['Default', 'Chrome', 'Cold', 'Warm', 'Grayscale', 'Sepia', 'Invert'];
|
|
20513
|
+
if (parent.toolbar) {
|
|
20514
|
+
for (var i = 0; i < defItems.length; i++) {
|
|
20515
|
+
if (parent.toolbar.indexOf(defItems[i]) !== -1) {
|
|
20516
|
+
isCustomized = true;
|
|
20517
|
+
break;
|
|
20518
|
+
}
|
|
20519
|
+
}
|
|
20520
|
+
}
|
|
20521
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Default') > -1)) {
|
|
20461
20522
|
toolbarItems.push({ id: parent.element.id + '_default', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
|
|
20462
20523
|
tooltipText: this.l10n.getConstant('Default'), align: 'Center',
|
|
20463
20524
|
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>' });
|
|
20464
20525
|
}
|
|
20465
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Chrome') > -1)) {
|
|
20526
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Chrome') > -1)) {
|
|
20466
20527
|
toolbarItems.push({ id: parent.element.id + '_chrome', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
|
|
20467
20528
|
tooltipText: this.l10n.getConstant('Chrome'), align: 'Center',
|
|
20468
20529
|
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>' });
|
|
20469
20530
|
}
|
|
20470
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Cold') > -1)) {
|
|
20531
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Cold') > -1)) {
|
|
20471
20532
|
toolbarItems.push({ id: parent.element.id + '_cold', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
|
|
20472
20533
|
tooltipText: this.l10n.getConstant('Cold'), align: 'Center',
|
|
20473
20534
|
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>' });
|
|
20474
20535
|
}
|
|
20475
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Warm') > -1)) {
|
|
20536
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Warm') > -1)) {
|
|
20476
20537
|
toolbarItems.push({ id: parent.element.id + '_warm', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
|
|
20477
20538
|
tooltipText: this.l10n.getConstant('Warm'), align: 'Center',
|
|
20478
20539
|
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>' });
|
|
20479
20540
|
}
|
|
20480
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Grayscale') > -1)) {
|
|
20541
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Grayscale') > -1)) {
|
|
20481
20542
|
toolbarItems.push({ id: parent.element.id + '_grayscale', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
|
|
20482
20543
|
tooltipText: this.l10n.getConstant('Grayscale'), align: 'Center',
|
|
20483
20544
|
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>' });
|
|
20484
20545
|
}
|
|
20485
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Sepia') > -1)) {
|
|
20546
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Sepia') > -1)) {
|
|
20486
20547
|
toolbarItems.push({ id: parent.element.id + '_sepia', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
|
|
20487
20548
|
tooltipText: this.l10n.getConstant('Sepia'), align: 'Center',
|
|
20488
20549
|
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>' });
|
|
20489
20550
|
}
|
|
20490
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Invert') > -1)) {
|
|
20551
|
+
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Invert') > -1)) {
|
|
20491
20552
|
toolbarItems.push({ id: parent.element.id + '_invert', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
|
|
20492
20553
|
tooltipText: this.l10n.getConstant('Invert'), align: 'Center',
|
|
20493
20554
|
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>' });
|
|
@@ -20761,7 +20822,9 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
20761
20822
|
if (hdrWrapper) {
|
|
20762
20823
|
hdrWrapper.style.display = 'none';
|
|
20763
20824
|
}
|
|
20764
|
-
document.getElementById(parent.currentFilter + 'Canvas')
|
|
20825
|
+
if (document.getElementById(parent.currentFilter + 'Canvas')) {
|
|
20826
|
+
document.getElementById(parent.currentFilter + 'Canvas').parentElement.parentElement.classList.add('e-selected');
|
|
20827
|
+
}
|
|
20765
20828
|
_this.enableDisableTbrBtn();
|
|
20766
20829
|
toolbar.refreshOverflow();
|
|
20767
20830
|
}
|
|
@@ -21552,7 +21615,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
21552
21615
|
for (var _i = 0, selectors_1 = selectors; _i < selectors_1.length; _i++) {
|
|
21553
21616
|
var selector = selectors_1[_i];
|
|
21554
21617
|
var element = document.querySelector(selector);
|
|
21555
|
-
if (element.classList.contains('e-selected-btn')) {
|
|
21618
|
+
if (element && element.classList.contains('e-selected-btn')) {
|
|
21556
21619
|
element.classList.remove('e-selected-btn');
|
|
21557
21620
|
break;
|
|
21558
21621
|
}
|