@syncfusion/ej2-image-editor 26.1.38 → 26.1.41
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/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 +134 -29
- package/dist/es6/ej2-image-editor.es2015.js.map +1 -1
- package/dist/es6/ej2-image-editor.es5.js +133 -29
- 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 +10 -10
- package/src/image-editor/action/draw.js +1 -2
- package/src/image-editor/action/export.js +11 -7
- package/src/image-editor/action/selection.d.ts +1 -0
- package/src/image-editor/action/selection.js +47 -2
- package/src/image-editor/action/shape.js +11 -1
- package/src/image-editor/action/undo-redo.js +4 -0
- package/src/image-editor/base/image-editor.d.ts +4 -1
- package/src/image-editor/base/image-editor.js +6 -3
- package/src/image-editor/base/interface.d.ts +4 -0
- package/src/image-editor/renderer/toolbar.d.ts +1 -0
- package/src/image-editor/renderer/toolbar.js +53 -14
- package/styles/bootstrap-dark.css +7 -0
- package/styles/bootstrap.css +7 -0
- package/styles/bootstrap4.css +7 -0
- package/styles/bootstrap5-dark.css +7 -0
- package/styles/bootstrap5.css +7 -0
- package/styles/fabric-dark.css +7 -0
- package/styles/fabric.css +7 -0
- package/styles/fluent-dark.css +7 -0
- package/styles/fluent.css +7 -0
- package/styles/fluent2.css +12 -5
- package/styles/highcontrast-light.css +7 -0
- package/styles/highcontrast.css +7 -0
- package/styles/image-editor/_bds-definition.scss +1 -0
- package/styles/image-editor/_bootstrap-dark-definition.scss +1 -0
- package/styles/image-editor/_bootstrap-definition.scss +1 -0
- package/styles/image-editor/_bootstrap4-definition.scss +1 -0
- package/styles/image-editor/_bootstrap5-definition.scss +1 -0
- package/styles/image-editor/_bootstrap5.3-definition.scss +1 -0
- package/styles/image-editor/_fabric-dark-definition.scss +1 -0
- package/styles/image-editor/_fabric-definition.scss +1 -0
- package/styles/image-editor/_fluent-definition.scss +1 -0
- package/styles/image-editor/_fluent2-definition.scss +1 -0
- package/styles/image-editor/_fusionnew-definition.scss +1 -0
- package/styles/image-editor/_highcontrast-definition.scss +1 -0
- package/styles/image-editor/_highcontrast-light-definition.scss +1 -0
- package/styles/image-editor/_layout.scss +29 -4
- package/styles/image-editor/_material-dark-definition.scss +1 -0
- package/styles/image-editor/_material-definition.scss +1 -0
- package/styles/image-editor/_material3-definition.scss +1 -0
- package/styles/image-editor/_tailwind-definition.scss +1 -0
- package/styles/image-editor/_theme.scss +7 -0
- package/styles/image-editor/bootstrap-dark.css +7 -0
- package/styles/image-editor/bootstrap.css +7 -0
- package/styles/image-editor/bootstrap4.css +7 -0
- package/styles/image-editor/bootstrap5-dark.css +7 -0
- package/styles/image-editor/bootstrap5.css +7 -0
- package/styles/image-editor/fabric-dark.css +7 -0
- package/styles/image-editor/fabric.css +7 -0
- package/styles/image-editor/fluent-dark.css +7 -0
- package/styles/image-editor/fluent.css +7 -0
- package/styles/image-editor/fluent2.css +12 -5
- package/styles/image-editor/highcontrast-light.css +7 -0
- package/styles/image-editor/highcontrast.css +7 -0
- package/styles/image-editor/material-dark.css +7 -0
- package/styles/image-editor/material.css +7 -0
- package/styles/image-editor/material3-dark.css +20 -3
- package/styles/image-editor/material3.css +20 -3
- package/styles/image-editor/tailwind-dark.css +7 -0
- package/styles/image-editor/tailwind.css +7 -0
- package/styles/material-dark.css +7 -0
- package/styles/material.css +7 -0
- package/styles/material3-dark.css +20 -3
- package/styles/material3.css +20 -3
- package/styles/tailwind-dark.css +7 -0
- package/styles/tailwind.css +7 -0
|
@@ -1144,7 +1144,7 @@ class Draw {
|
|
|
1144
1144
|
args.value['obj']['isNewPath'] = this.isNewPath;
|
|
1145
1145
|
break;
|
|
1146
1146
|
case 'getArrowDimension':
|
|
1147
|
-
args.value['obj']['arrowDimension'] = this.arrowDimension;
|
|
1147
|
+
args.value['obj']['arrowDimension'] = extend({}, this.arrowDimension, {}, true);
|
|
1148
1148
|
break;
|
|
1149
1149
|
case 'setArrowDimension':
|
|
1150
1150
|
this.arrowDimension = args.value['arrowDimension'];
|
|
@@ -4703,7 +4703,7 @@ class Draw {
|
|
|
4703
4703
|
callback(imageSizeMB);
|
|
4704
4704
|
}
|
|
4705
4705
|
catch (ex) {
|
|
4706
|
-
|
|
4706
|
+
/* action on catch */
|
|
4707
4707
|
}
|
|
4708
4708
|
});
|
|
4709
4709
|
}
|
|
@@ -5796,7 +5796,7 @@ class Export {
|
|
|
5796
5796
|
this.updatePvtVar();
|
|
5797
5797
|
switch (args.prop) {
|
|
5798
5798
|
case 'export':
|
|
5799
|
-
this.exportImg(args.value['type'], args.value['fileName']);
|
|
5799
|
+
this.exportImg(args.value['type'], args.value['fileName'], args.value['imgQuality']);
|
|
5800
5800
|
break;
|
|
5801
5801
|
case 'exportToCanvas':
|
|
5802
5802
|
this.exportToCanvas(args.value['object']);
|
|
@@ -5817,7 +5817,7 @@ class Export {
|
|
|
5817
5817
|
this.lowerContext = parent.lowerCanvas.getContext('2d');
|
|
5818
5818
|
}
|
|
5819
5819
|
}
|
|
5820
|
-
exportImg(type, fileName) {
|
|
5820
|
+
exportImg(type, fileName, imgQuality) {
|
|
5821
5821
|
const parent = this.parent;
|
|
5822
5822
|
const obj = { fileName: '' };
|
|
5823
5823
|
parent.notify('draw', { prop: 'getFileName', onPropertyChange: false, value: { obj: obj } });
|
|
@@ -5843,12 +5843,12 @@ class Export {
|
|
|
5843
5843
|
parent.notify('shape', { prop: 'redrawActObj', onPropertyChange: false,
|
|
5844
5844
|
value: { x: null, y: null, isMouseDown: null } });
|
|
5845
5845
|
const beforeSave = { cancel: false, fileName: fileName ? fileName : imageName,
|
|
5846
|
-
fileType: type };
|
|
5846
|
+
fileType: type, imageQuality: imgQuality };
|
|
5847
5847
|
parent.trigger('beforeSave', beforeSave);
|
|
5848
|
-
this.beforeSaveEvent(beforeSave, type, fileName, imageName);
|
|
5848
|
+
this.beforeSaveEvent(beforeSave, type, fileName, imageName, imgQuality);
|
|
5849
5849
|
}
|
|
5850
5850
|
}
|
|
5851
|
-
beforeSaveEvent(observableSaveArgs, type, fileName, imageName) {
|
|
5851
|
+
beforeSaveEvent(observableSaveArgs, type, fileName, imageName, imgQuality) {
|
|
5852
5852
|
const parent = this.parent;
|
|
5853
5853
|
if (!observableSaveArgs.cancel) {
|
|
5854
5854
|
parent.currObjType.isSave = true;
|
|
@@ -5859,7 +5859,7 @@ class Export {
|
|
|
5859
5859
|
this.toSVGImg(fileName);
|
|
5860
5860
|
}
|
|
5861
5861
|
else {
|
|
5862
|
-
this.toBlobFn(fileName, lowerCaseType);
|
|
5862
|
+
this.toBlobFn(fileName, lowerCaseType, imgQuality);
|
|
5863
5863
|
}
|
|
5864
5864
|
const saved = { fileName: fileName ? fileName : imageName, fileType: type };
|
|
5865
5865
|
parent.trigger('saved', saved);
|
|
@@ -5902,12 +5902,16 @@ class Export {
|
|
|
5902
5902
|
return null;
|
|
5903
5903
|
}
|
|
5904
5904
|
}
|
|
5905
|
-
toBlobFn(fileName, type) {
|
|
5905
|
+
toBlobFn(fileName, type, imgQuality) {
|
|
5906
5906
|
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
5907
5907
|
const proxy = this;
|
|
5908
5908
|
const parent = this.parent;
|
|
5909
5909
|
showSpinner(parent.element);
|
|
5910
5910
|
parent.element.style.opacity = '0.5';
|
|
5911
|
+
if (!isNullOrUndefined(imgQuality)) {
|
|
5912
|
+
imgQuality = imgQuality > 1 ? 1 : (imgQuality <= 0 ? 0.01 : imgQuality);
|
|
5913
|
+
this.imageQuality = imgQuality ? imgQuality : null;
|
|
5914
|
+
}
|
|
5911
5915
|
const tempCanvas = this.exportToCanvas();
|
|
5912
5916
|
const imagetype = type !== 'jpeg' ? 'image/png' : 'image/jpeg';
|
|
5913
5917
|
// eslint-disable-next-line @typescript-eslint/tslint/config
|
|
@@ -8461,6 +8465,7 @@ class Selection {
|
|
|
8461
8465
|
parent.notify('undo-redo', { prop: 'updateCurrUrc', value: { type: 'ok' } });
|
|
8462
8466
|
}
|
|
8463
8467
|
}
|
|
8468
|
+
parent.isKBDNavigation = true;
|
|
8464
8469
|
}
|
|
8465
8470
|
selMouseUpEvent() {
|
|
8466
8471
|
this.oldPoint.x = undefined;
|
|
@@ -9338,7 +9343,7 @@ class Selection {
|
|
|
9338
9343
|
}
|
|
9339
9344
|
else {
|
|
9340
9345
|
parent.trigger('shapeChanging', shapeMovingArgs);
|
|
9341
|
-
this.isPreventShaping =
|
|
9346
|
+
this.isPreventShaping = shapeMovingArgs.cancel;
|
|
9342
9347
|
parent.notify('shape', { prop: 'updateShapeChangeEventArgs', onPropertyChange: false,
|
|
9343
9348
|
value: { shapeSettings: shapeMovingArgs.currentShapeSettings } });
|
|
9344
9349
|
}
|
|
@@ -11019,6 +11024,7 @@ class Selection {
|
|
|
11019
11024
|
}
|
|
11020
11025
|
mouseDownEventHandler(e) {
|
|
11021
11026
|
const parent = this.parent;
|
|
11027
|
+
parent.isKBDNavigation = false;
|
|
11022
11028
|
this.mouseDown = e.currentTarget === parent.lowerCanvas || e.currentTarget === parent.upperCanvas ?
|
|
11023
11029
|
'canvas' : '';
|
|
11024
11030
|
if (e.type === 'touchstart') {
|
|
@@ -11479,6 +11485,7 @@ class Selection {
|
|
|
11479
11485
|
mouseUpEventHandler(e) {
|
|
11480
11486
|
const parent = this.parent;
|
|
11481
11487
|
const id = parent.element.id;
|
|
11488
|
+
parent.isKBDNavigation = false;
|
|
11482
11489
|
if (!Browser.isDevice && ((parent.element.querySelector('#' + id + '_contextualToolbar') &&
|
|
11483
11490
|
!parent.element.querySelector('#' + id + '_contextualToolbar').parentElement.classList.contains('e-hide')) ||
|
|
11484
11491
|
(parent.element.querySelector('#' + id + '_headWrapper')
|
|
@@ -11626,7 +11633,10 @@ class Selection {
|
|
|
11626
11633
|
previousCropObj: prevCropObj, previousText: null,
|
|
11627
11634
|
currentText: null, previousFilter: null, isCircleCrop: null } });
|
|
11628
11635
|
}
|
|
11629
|
-
|
|
11636
|
+
const tempObj = extend({}, parent.objColl[parent.objColl.length - 1], {}, true);
|
|
11637
|
+
parent.objColl.pop();
|
|
11638
|
+
this.redrawShape(tempObj);
|
|
11639
|
+
parent.objColl.push(tempObj);
|
|
11630
11640
|
this.tempObjColl = undefined;
|
|
11631
11641
|
}
|
|
11632
11642
|
if (!this.isFhdEditing) {
|
|
@@ -11676,6 +11686,7 @@ class Selection {
|
|
|
11676
11686
|
parent.notify('shape', { prop: 'refreshActiveObj', onPropertyChange: false });
|
|
11677
11687
|
}
|
|
11678
11688
|
if (!isCropSelection) {
|
|
11689
|
+
this.adjustActObjForLineArrow();
|
|
11679
11690
|
if (parent.isShapeDrawing) {
|
|
11680
11691
|
const temp = this.currentDrawingShape;
|
|
11681
11692
|
parent.notify('undo-redo', { prop: 'updateUndoRedoStack', onPropertyChange: false });
|
|
@@ -11701,8 +11712,11 @@ class Selection {
|
|
|
11701
11712
|
isApplyBtn: null, isCropping: null, isZooming: null, cType: null } });
|
|
11702
11713
|
}
|
|
11703
11714
|
else {
|
|
11715
|
+
const temp = this.currentDrawingShape;
|
|
11716
|
+
this.currentDrawingShape = '';
|
|
11704
11717
|
parent.notify('toolbar', { prop: 'refresh-toolbar', onPropertyChange: false, value: { type: 'shapes',
|
|
11705
11718
|
isApplyBtn: null, isCropping: null, isZooming: null, cType: null } });
|
|
11719
|
+
this.currentDrawingShape = temp;
|
|
11706
11720
|
}
|
|
11707
11721
|
parent.notify('toolbar', { prop: 'update-toolbar-items', onPropertyChange: false });
|
|
11708
11722
|
parent.notify('toolbar', { prop: 'renderQAT', onPropertyChange: false, value: { isPenEdit: null } });
|
|
@@ -12236,8 +12250,15 @@ class Selection {
|
|
|
12236
12250
|
performEnterAction(e) {
|
|
12237
12251
|
const parent = this.parent;
|
|
12238
12252
|
if (parent.isResize) {
|
|
12253
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
12254
|
+
const target = e.target;
|
|
12255
|
+
const isIcon = target.id.indexOf('aspectratio') ||
|
|
12256
|
+
target.id.indexOf('non-aspectratio') > -1 ? true : false;
|
|
12239
12257
|
const isValue = this.isValueUpdated();
|
|
12240
12258
|
if (!isValue) {
|
|
12259
|
+
if (isIcon) {
|
|
12260
|
+
this.focusRatioBtn();
|
|
12261
|
+
}
|
|
12241
12262
|
return;
|
|
12242
12263
|
}
|
|
12243
12264
|
const point = this.getNumTextValue();
|
|
@@ -12270,6 +12291,21 @@ class Selection {
|
|
|
12270
12291
|
}
|
|
12271
12292
|
}
|
|
12272
12293
|
parent.notify('draw', { prop: 'redrawDownScale' });
|
|
12294
|
+
if (isIcon) {
|
|
12295
|
+
this.focusRatioBtn();
|
|
12296
|
+
}
|
|
12297
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
12298
|
+
}
|
|
12299
|
+
else if (e.target.classList.contains('e-upload')) {
|
|
12300
|
+
const upload = parent.element.querySelector('.e-image-upload');
|
|
12301
|
+
if (upload && upload.querySelector('.e-tbar-btn')) {
|
|
12302
|
+
upload.querySelector('.e-tbar-btn').click();
|
|
12303
|
+
}
|
|
12304
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
12305
|
+
}
|
|
12306
|
+
else if (e.target.classList.contains('filter-wrapper')) {
|
|
12307
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
12308
|
+
e.target.parentElement.click();
|
|
12273
12309
|
}
|
|
12274
12310
|
else {
|
|
12275
12311
|
let splitWords;
|
|
@@ -12282,6 +12318,19 @@ class Selection {
|
|
|
12282
12318
|
}
|
|
12283
12319
|
}
|
|
12284
12320
|
}
|
|
12321
|
+
focusRatioBtn() {
|
|
12322
|
+
const id = this.parent.element.id;
|
|
12323
|
+
if (this.parent.isKBDNavigation) {
|
|
12324
|
+
setTimeout(function () {
|
|
12325
|
+
if (document.getElementById(id + '_aspectratio')) {
|
|
12326
|
+
document.getElementById(id + '_aspectratio').focus();
|
|
12327
|
+
}
|
|
12328
|
+
else if (document.getElementById(id + '_nonaspectratio')) {
|
|
12329
|
+
document.getElementById(id + '_nonaspectratio').focus();
|
|
12330
|
+
}
|
|
12331
|
+
}, 50);
|
|
12332
|
+
}
|
|
12333
|
+
}
|
|
12285
12334
|
isKeyBoardCrop(e) {
|
|
12286
12335
|
let bool = false;
|
|
12287
12336
|
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
@@ -13840,6 +13889,14 @@ class Shape {
|
|
|
13840
13889
|
parent.notify('toolbar', { prop: 'destroy-qa-toolbar', onPropertyChange: false });
|
|
13841
13890
|
parent.notify('toolbar', { prop: 'renderQAT', onPropertyChange: false, value: { isPenEdit: null } });
|
|
13842
13891
|
}
|
|
13892
|
+
if (text && text.indexOf('\n') > -1 && parent.isPublicMethod) {
|
|
13893
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13894
|
+
const fontSizeInd = String(parent.fontSizeColl.findIndex((item) => item.text === String(parent.activeObj.textSettings.fontSize)) + 1);
|
|
13895
|
+
parent.noPushUndo = true;
|
|
13896
|
+
parent.updateFontSize('5');
|
|
13897
|
+
parent.updateFontSize(fontSizeInd);
|
|
13898
|
+
parent.noPushUndo = false;
|
|
13899
|
+
}
|
|
13843
13900
|
if (parent.isPublicMethod && !isSelected) {
|
|
13844
13901
|
parent.notify('undo-redo', { prop: 'updateUndoRedo', value: { operation: 'shapeInsert' }, onPropertyChange: false });
|
|
13845
13902
|
}
|
|
@@ -15931,7 +15988,9 @@ class Shape {
|
|
|
15931
15988
|
pushActItemIntoObj() {
|
|
15932
15989
|
const parent = this.parent;
|
|
15933
15990
|
if (parent.textArea.style.display === 'none') {
|
|
15934
|
-
parent.
|
|
15991
|
+
if (parent.activeObj.activePoint.width !== 0 || parent.activeObj.activePoint.height !== 0) {
|
|
15992
|
+
parent.objColl.push(parent.activeObj);
|
|
15993
|
+
}
|
|
15935
15994
|
}
|
|
15936
15995
|
else {
|
|
15937
15996
|
const temp = extend({}, parent.activeObj, {}, true);
|
|
@@ -19561,6 +19620,8 @@ class UndoRedo {
|
|
|
19561
19620
|
case 'freehanddraw':
|
|
19562
19621
|
case 'freehand-draw':
|
|
19563
19622
|
this.updateFreehandDraw(obj.previousPointColl, obj.previousSelPointColl);
|
|
19623
|
+
parent.notify('freehand-draw', { prop: 'setCurrentFreehandDrawIndex',
|
|
19624
|
+
value: { value: parent.pointColl.length } });
|
|
19564
19625
|
break;
|
|
19565
19626
|
case 'freehanddrawCustomized':
|
|
19566
19627
|
this.updateFreehandDrawCustomized(obj.previousObjColl, obj.previousPointColl);
|
|
@@ -19691,6 +19752,8 @@ class UndoRedo {
|
|
|
19691
19752
|
case 'freehanddraw':
|
|
19692
19753
|
case 'freehand-draw':
|
|
19693
19754
|
this.updateFreehandDraw(obj.currentPointColl, obj.currentSelPointColl);
|
|
19755
|
+
parent.notify('freehand-draw', { prop: 'setCurrentFreehandDrawIndex',
|
|
19756
|
+
value: { value: parent.pointColl.length } });
|
|
19694
19757
|
break;
|
|
19695
19758
|
case 'freehanddrawCustomized':
|
|
19696
19759
|
this.updateFreehandDrawCustomized(obj.currentObjColl, obj.currentPointColl);
|
|
@@ -20519,6 +20582,8 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
20519
20582
|
/** @hidden */
|
|
20520
20583
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20521
20584
|
this.shapeColl = [];
|
|
20585
|
+
/** @hidden */
|
|
20586
|
+
this.isKBDNavigation = false;
|
|
20522
20587
|
ImageEditor_1.Inject(Crop, Draw, Selection, Transform, Export, ToolbarModule);
|
|
20523
20588
|
ImageEditor_1.Inject(UndoRedo);
|
|
20524
20589
|
ImageEditor_1.Inject(Filter);
|
|
@@ -21273,7 +21338,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
21273
21338
|
this.aspectWidth = this.aspectHeight = null;
|
|
21274
21339
|
this.isResize = false;
|
|
21275
21340
|
this.drawingShape = null;
|
|
21276
|
-
this.isShapeDrawing = this.noPushUndo = this.isUndoRedoStack = false;
|
|
21341
|
+
this.isShapeDrawing = this.noPushUndo = this.isUndoRedoStack = this.isKBDNavigation = false;
|
|
21277
21342
|
this.shapeColl = [];
|
|
21278
21343
|
const obj = { initialZoomValue: false };
|
|
21279
21344
|
this.notify('draw', { prop: 'getInitialZoomValue', onPropertyChange: false, value: { obj: obj } });
|
|
@@ -21339,15 +21404,16 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
21339
21404
|
*
|
|
21340
21405
|
* @param {string} type - Specifies a format of image to be saved.
|
|
21341
21406
|
* @param {string} fileName – Specifies a file name to be saved
|
|
21407
|
+
* @param {number} imageQuality – Specifies the quality of an image to be saved. The default value is “1” which represents the original size of the image if not specified.
|
|
21342
21408
|
*
|
|
21343
21409
|
* @remarks
|
|
21344
21410
|
* The supported file types are JPG, JPEG, PNG, and SVG.
|
|
21345
21411
|
*
|
|
21346
21412
|
* @returns {void}.
|
|
21347
21413
|
*/
|
|
21348
|
-
export(type, fileName) {
|
|
21414
|
+
export(type, fileName, imageQuality) {
|
|
21349
21415
|
this.applyShapes();
|
|
21350
|
-
this.notify('export', { prop: 'export', onPropertyChange: false, value: { type: type, fileName: fileName } });
|
|
21416
|
+
this.notify('export', { prop: 'export', onPropertyChange: false, value: { type: type, fileName: fileName, imgQuality: imageQuality } });
|
|
21351
21417
|
}
|
|
21352
21418
|
/**
|
|
21353
21419
|
* Perform selection in an image editor. The selection helps to crop an image.
|
|
@@ -24928,7 +24994,7 @@ class ToolbarModule {
|
|
|
24928
24994
|
const toolbarItems = [];
|
|
24929
24995
|
if (isOkBtn) {
|
|
24930
24996
|
toolbarItems.push({ id: id + '_ok', prefixIcon: 'e-icons e-check', cssClass: 'top-icon e-tick',
|
|
24931
|
-
tooltipText: this.l10n.getConstant('OK'), align: 'Right' });
|
|
24997
|
+
tooltipText: this.l10n.getConstant('OK'), align: 'Right', tabIndex: 0 });
|
|
24932
24998
|
toolbarItems.push({ id: id + '_cancel', prefixIcon: 'e-icons e-close', cssClass: 'top-icon e-save',
|
|
24933
24999
|
tooltipText: this.l10n.getConstant('Cancel'), align: 'Right' });
|
|
24934
25000
|
}
|
|
@@ -25010,7 +25076,7 @@ class ToolbarModule {
|
|
|
25010
25076
|
}
|
|
25011
25077
|
if (isApplyOption) {
|
|
25012
25078
|
toolbarItems.push({ id: id + '_ok', prefixIcon: 'e-icons e-check', cssClass: 'top-icon e-tick',
|
|
25013
|
-
tooltipText: this.l10n.getConstant('OK'), align: 'Right' });
|
|
25079
|
+
tooltipText: this.l10n.getConstant('OK'), align: 'Right', tabIndex: 0 });
|
|
25014
25080
|
toolbarItems.push({ id: id + '_cancel', prefixIcon: 'e-icons e-close', cssClass: 'top-icon e-save',
|
|
25015
25081
|
tooltipText: this.l10n.getConstant('Cancel'), align: 'Right' });
|
|
25016
25082
|
}
|
|
@@ -25154,7 +25220,7 @@ class ToolbarModule {
|
|
|
25154
25220
|
}
|
|
25155
25221
|
widthAspectRatio(e) {
|
|
25156
25222
|
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
25157
|
-
if (e.keyCode === 109) {
|
|
25223
|
+
if (e.keyCode === 109 || e.keyCode === 9) {
|
|
25158
25224
|
return;
|
|
25159
25225
|
}
|
|
25160
25226
|
const parent = this.parent;
|
|
@@ -25198,7 +25264,7 @@ class ToolbarModule {
|
|
|
25198
25264
|
}
|
|
25199
25265
|
heightAspectRatio(e) {
|
|
25200
25266
|
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
25201
|
-
if (e.keyCode === 109) {
|
|
25267
|
+
if (e.keyCode === 109 || e.keyCode === 9) {
|
|
25202
25268
|
return;
|
|
25203
25269
|
}
|
|
25204
25270
|
const parent = this.parent;
|
|
@@ -25266,7 +25332,8 @@ class ToolbarModule {
|
|
|
25266
25332
|
placeholder: isResize ? null : height, format: '###.## px' })
|
|
25267
25333
|
});
|
|
25268
25334
|
if (!this.isAspectRatio) {
|
|
25269
|
-
toolbarItems.push({ id: id + '_aspectratio', prefixIcon: 'e-icons e-lock', align: 'Center',
|
|
25335
|
+
toolbarItems.push({ id: id + '_aspectratio', prefixIcon: 'e-icons e-lock', align: 'Center',
|
|
25336
|
+
tooltipText: this.l10n.getConstant('AspectRatio'), type: 'Button', tabIndex: 0 });
|
|
25270
25337
|
this.isAspectRatio = true;
|
|
25271
25338
|
}
|
|
25272
25339
|
else {
|
|
@@ -25275,7 +25342,7 @@ class ToolbarModule {
|
|
|
25275
25342
|
}
|
|
25276
25343
|
if (!Browser.isDevice) {
|
|
25277
25344
|
toolbarItems.push({ id: id + '_ok', prefixIcon: 'e-icons e-check', cssClass: 'top-icon e-tick',
|
|
25278
|
-
tooltipText: this.l10n.getConstant('OK'), align: 'Right' });
|
|
25345
|
+
tooltipText: this.l10n.getConstant('OK'), align: 'Right', tabIndex: 0 });
|
|
25279
25346
|
toolbarItems.push({ id: id + '_cancel', prefixIcon: 'e-icons e-close', cssClass: 'top-icon e-save',
|
|
25280
25347
|
tooltipText: this.l10n.getConstant('Cancel'), align: 'Right' });
|
|
25281
25348
|
}
|
|
@@ -25914,7 +25981,7 @@ class ToolbarModule {
|
|
|
25914
25981
|
{ id: 'svg', text: 'SVG' }
|
|
25915
25982
|
];
|
|
25916
25983
|
const inputObj = new TextBox({
|
|
25917
|
-
placeholder: this.l10n.getConstant('ImageName')
|
|
25984
|
+
placeholder: this.l10n.getConstant('ImageName')
|
|
25918
25985
|
});
|
|
25919
25986
|
inputObj.appendTo('#' + id + '_imgNametext');
|
|
25920
25987
|
const qualityContainer = document.getElementById(id + '_imgQualitydiv');
|
|
@@ -26084,7 +26151,7 @@ class ToolbarModule {
|
|
|
26084
26151
|
else {
|
|
26085
26152
|
imageNameLabel = document.getElementById(id + '_imageNameLabel');
|
|
26086
26153
|
}
|
|
26087
|
-
/* eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
26154
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
26088
26155
|
tempCanvas.toBlob((function (blob) {
|
|
26089
26156
|
fileSize = Math.floor(blob.size / 1024);
|
|
26090
26157
|
if (fileSize > 1000) {
|
|
@@ -26164,7 +26231,7 @@ class ToolbarModule {
|
|
|
26164
26231
|
}
|
|
26165
26232
|
if (!Browser.isDevice) {
|
|
26166
26233
|
toolbarItems.push({ id: id + '_ok', prefixIcon: 'e-icons e-check', cssClass: 'top-icon e-tick',
|
|
26167
|
-
tooltipText: this.l10n.getConstant('OK'), align: 'Right' });
|
|
26234
|
+
tooltipText: this.l10n.getConstant('OK'), align: 'Right', tabIndex: 0 });
|
|
26168
26235
|
toolbarItems.push({ id: id + '_cancel', prefixIcon: 'e-icons e-close', cssClass: 'top-icon e-save',
|
|
26169
26236
|
tooltipText: this.l10n.getConstant('Cancel'), align: 'Right' });
|
|
26170
26237
|
}
|
|
@@ -26241,7 +26308,7 @@ class ToolbarModule {
|
|
|
26241
26308
|
parent.notify('selection', { prop: 'getCurrentDrawingShape', value: { obj: obj } });
|
|
26242
26309
|
if (obj['shape'] !== 'path') {
|
|
26243
26310
|
toolbarItems.push({ id: id + '_ok', prefixIcon: 'e-icons e-check', cssClass: 'top-icon e-tick',
|
|
26244
|
-
tooltipText: this.l10n.getConstant('OK'), align: 'Right' });
|
|
26311
|
+
tooltipText: this.l10n.getConstant('OK'), align: 'Right', tabIndex: 0 });
|
|
26245
26312
|
toolbarItems.push({ id: id + '_cancel', prefixIcon: 'e-icons e-close', cssClass: 'top-icon e-save',
|
|
26246
26313
|
tooltipText: this.l10n.getConstant('Cancel'), align: 'Right' });
|
|
26247
26314
|
}
|
|
@@ -26848,7 +26915,7 @@ class ToolbarModule {
|
|
|
26848
26915
|
}
|
|
26849
26916
|
if (!Browser.isDevice) {
|
|
26850
26917
|
toolbarItems.push({ id: id + '_ok', prefixIcon: 'e-icons e-check', cssClass: 'top-icon e-tick',
|
|
26851
|
-
tooltipText: this.l10n.getConstant('OK'), align: 'Right' });
|
|
26918
|
+
tooltipText: this.l10n.getConstant('OK'), align: 'Right', tabIndex: 0 });
|
|
26852
26919
|
toolbarItems.push({ id: id + '_cancel', prefixIcon: 'e-icons e-close', cssClass: 'top-icon e-save',
|
|
26853
26920
|
tooltipText: this.l10n.getConstant('Cancel'), align: 'Right' });
|
|
26854
26921
|
}
|
|
@@ -27228,6 +27295,44 @@ class ToolbarModule {
|
|
|
27228
27295
|
}
|
|
27229
27296
|
this.currToolbar = type;
|
|
27230
27297
|
this.refreshDropDownBtn(isCropping);
|
|
27298
|
+
this.updateKBDNavigation(this.currToolbar);
|
|
27299
|
+
}
|
|
27300
|
+
updateKBDNavigation(type) {
|
|
27301
|
+
const parent = this.parent;
|
|
27302
|
+
const id = parent.element.id;
|
|
27303
|
+
if (!parent.isKBDNavigation) {
|
|
27304
|
+
return;
|
|
27305
|
+
}
|
|
27306
|
+
if (this.isToolbar()) {
|
|
27307
|
+
const tbar = parent.element.querySelectorAll('#' + id + '_toolbar')[0];
|
|
27308
|
+
let tbarInitialChild;
|
|
27309
|
+
let tbarInitialBtn;
|
|
27310
|
+
if (tbar) {
|
|
27311
|
+
tbarInitialChild = tbar.querySelector('.e-toolbar-center');
|
|
27312
|
+
if (!tbarInitialChild || !tbarInitialChild.children[0]) {
|
|
27313
|
+
return;
|
|
27314
|
+
}
|
|
27315
|
+
tbarInitialBtn = tbarInitialChild.children[0].querySelector('.e-btn');
|
|
27316
|
+
let tempElem = tbarInitialChild.children[1];
|
|
27317
|
+
if (tempElem) {
|
|
27318
|
+
tempElem = tempElem.children[0];
|
|
27319
|
+
}
|
|
27320
|
+
if (tempElem) {
|
|
27321
|
+
tempElem = tempElem.children[0];
|
|
27322
|
+
}
|
|
27323
|
+
if (type === 'resize' && tempElem) {
|
|
27324
|
+
tbarInitialBtn = tempElem;
|
|
27325
|
+
}
|
|
27326
|
+
if (tbarInitialBtn) {
|
|
27327
|
+
if (type === 'main') {
|
|
27328
|
+
setTimeout(() => tbarInitialBtn.focus(), 50);
|
|
27329
|
+
}
|
|
27330
|
+
else {
|
|
27331
|
+
tbarInitialBtn.focus();
|
|
27332
|
+
}
|
|
27333
|
+
}
|
|
27334
|
+
}
|
|
27335
|
+
}
|
|
27231
27336
|
}
|
|
27232
27337
|
performCropTransformClick(shape, isTransform) {
|
|
27233
27338
|
const parent = this.parent;
|
|
@@ -27293,7 +27398,7 @@ class ToolbarModule {
|
|
|
27293
27398
|
}
|
|
27294
27399
|
if (!Browser.isDevice) {
|
|
27295
27400
|
toolbarItems.push({ id: id + '_ok', prefixIcon: 'e-icons e-check', cssClass: 'top-icon e-tick',
|
|
27296
|
-
tooltipText: this.l10n.getConstant('OK'), align: 'Right' });
|
|
27401
|
+
tooltipText: this.l10n.getConstant('OK'), align: 'Right', tabIndex: 0 });
|
|
27297
27402
|
toolbarItems.push({ id: id + '_cancel', prefixIcon: 'e-icons e-close', cssClass: 'top-icon e-save',
|
|
27298
27403
|
tooltipText: this.l10n.getConstant('Cancel'), align: 'Right' });
|
|
27299
27404
|
}
|
|
@@ -27346,7 +27451,7 @@ class ToolbarModule {
|
|
|
27346
27451
|
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Default') > -1)) {
|
|
27347
27452
|
toolbarItems.push({ id: id + '_default', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
|
|
27348
27453
|
tooltipText: this.l10n.getConstant('Default'), align: 'Center',
|
|
27349
|
-
template: '<div class="filter-wrapper" style="box-sizing: content-box;"><canvas id=' + id + '_defaultCanvas' + '></canvas><div style="text-align:center;"><span>' + this.l10n.getConstant('Default') + '</span></div></div>' });
|
|
27454
|
+
template: '<div class="filter-wrapper" style="box-sizing: content-box;"><canvas id=' + id + '_defaultCanvas' + ' tabindex=0></canvas><div style="text-align:center;"><span>' + this.l10n.getConstant('Default') + '</span></div></div>' });
|
|
27350
27455
|
}
|
|
27351
27456
|
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Chrome') > -1)) {
|
|
27352
27457
|
toolbarItems.push({ id: id + '_chrome', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
|
|
@@ -27419,7 +27524,7 @@ class ToolbarModule {
|
|
|
27419
27524
|
}
|
|
27420
27525
|
if (!Browser.isDevice) {
|
|
27421
27526
|
toolbarItems.push({ id: id + '_ok', prefixIcon: 'e-icons e-check', cssClass: 'top-icon e-tick',
|
|
27422
|
-
tooltipText: this.l10n.getConstant('OK'), align: 'Right' });
|
|
27527
|
+
tooltipText: this.l10n.getConstant('OK'), align: 'Right', tabIndex: 0 });
|
|
27423
27528
|
toolbarItems.push({ id: id + '_cancel', prefixIcon: 'e-icons e-close', cssClass: 'top-icon e-save',
|
|
27424
27529
|
tooltipText: this.l10n.getConstant('Cancel'), align: 'Right' });
|
|
27425
27530
|
}
|