@syncfusion/ej2-image-editor 26.1.40 → 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 +122 -29
- package/dist/es6/ej2-image-editor.es2015.js.map +1 -1
- package/dist/es6/ej2-image-editor.es5.js +121 -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 +9 -9
- 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 +46 -1
- package/src/image-editor/action/undo-redo.js +4 -2
- 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
|
@@ -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;
|
|
@@ -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 */
|
|
@@ -19571,7 +19620,8 @@ class UndoRedo {
|
|
|
19571
19620
|
case 'freehanddraw':
|
|
19572
19621
|
case 'freehand-draw':
|
|
19573
19622
|
this.updateFreehandDraw(obj.previousPointColl, obj.previousSelPointColl);
|
|
19574
|
-
parent.notify('freehand-draw', { prop: 'setCurrentFreehandDrawIndex',
|
|
19623
|
+
parent.notify('freehand-draw', { prop: 'setCurrentFreehandDrawIndex',
|
|
19624
|
+
value: { value: parent.pointColl.length } });
|
|
19575
19625
|
break;
|
|
19576
19626
|
case 'freehanddrawCustomized':
|
|
19577
19627
|
this.updateFreehandDrawCustomized(obj.previousObjColl, obj.previousPointColl);
|
|
@@ -19702,7 +19752,8 @@ class UndoRedo {
|
|
|
19702
19752
|
case 'freehanddraw':
|
|
19703
19753
|
case 'freehand-draw':
|
|
19704
19754
|
this.updateFreehandDraw(obj.currentPointColl, obj.currentSelPointColl);
|
|
19705
|
-
parent.notify('freehand-draw', { prop: 'setCurrentFreehandDrawIndex',
|
|
19755
|
+
parent.notify('freehand-draw', { prop: 'setCurrentFreehandDrawIndex',
|
|
19756
|
+
value: { value: parent.pointColl.length } });
|
|
19706
19757
|
break;
|
|
19707
19758
|
case 'freehanddrawCustomized':
|
|
19708
19759
|
this.updateFreehandDrawCustomized(obj.currentObjColl, obj.currentPointColl);
|
|
@@ -20531,6 +20582,8 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
20531
20582
|
/** @hidden */
|
|
20532
20583
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20533
20584
|
this.shapeColl = [];
|
|
20585
|
+
/** @hidden */
|
|
20586
|
+
this.isKBDNavigation = false;
|
|
20534
20587
|
ImageEditor_1.Inject(Crop, Draw, Selection, Transform, Export, ToolbarModule);
|
|
20535
20588
|
ImageEditor_1.Inject(UndoRedo);
|
|
20536
20589
|
ImageEditor_1.Inject(Filter);
|
|
@@ -21285,7 +21338,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
21285
21338
|
this.aspectWidth = this.aspectHeight = null;
|
|
21286
21339
|
this.isResize = false;
|
|
21287
21340
|
this.drawingShape = null;
|
|
21288
|
-
this.isShapeDrawing = this.noPushUndo = this.isUndoRedoStack = false;
|
|
21341
|
+
this.isShapeDrawing = this.noPushUndo = this.isUndoRedoStack = this.isKBDNavigation = false;
|
|
21289
21342
|
this.shapeColl = [];
|
|
21290
21343
|
const obj = { initialZoomValue: false };
|
|
21291
21344
|
this.notify('draw', { prop: 'getInitialZoomValue', onPropertyChange: false, value: { obj: obj } });
|
|
@@ -21351,15 +21404,16 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
21351
21404
|
*
|
|
21352
21405
|
* @param {string} type - Specifies a format of image to be saved.
|
|
21353
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.
|
|
21354
21408
|
*
|
|
21355
21409
|
* @remarks
|
|
21356
21410
|
* The supported file types are JPG, JPEG, PNG, and SVG.
|
|
21357
21411
|
*
|
|
21358
21412
|
* @returns {void}.
|
|
21359
21413
|
*/
|
|
21360
|
-
export(type, fileName) {
|
|
21414
|
+
export(type, fileName, imageQuality) {
|
|
21361
21415
|
this.applyShapes();
|
|
21362
|
-
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 } });
|
|
21363
21417
|
}
|
|
21364
21418
|
/**
|
|
21365
21419
|
* Perform selection in an image editor. The selection helps to crop an image.
|
|
@@ -24940,7 +24994,7 @@ class ToolbarModule {
|
|
|
24940
24994
|
const toolbarItems = [];
|
|
24941
24995
|
if (isOkBtn) {
|
|
24942
24996
|
toolbarItems.push({ id: id + '_ok', prefixIcon: 'e-icons e-check', cssClass: 'top-icon e-tick',
|
|
24943
|
-
tooltipText: this.l10n.getConstant('OK'), align: 'Right' });
|
|
24997
|
+
tooltipText: this.l10n.getConstant('OK'), align: 'Right', tabIndex: 0 });
|
|
24944
24998
|
toolbarItems.push({ id: id + '_cancel', prefixIcon: 'e-icons e-close', cssClass: 'top-icon e-save',
|
|
24945
24999
|
tooltipText: this.l10n.getConstant('Cancel'), align: 'Right' });
|
|
24946
25000
|
}
|
|
@@ -25022,7 +25076,7 @@ class ToolbarModule {
|
|
|
25022
25076
|
}
|
|
25023
25077
|
if (isApplyOption) {
|
|
25024
25078
|
toolbarItems.push({ id: id + '_ok', prefixIcon: 'e-icons e-check', cssClass: 'top-icon e-tick',
|
|
25025
|
-
tooltipText: this.l10n.getConstant('OK'), align: 'Right' });
|
|
25079
|
+
tooltipText: this.l10n.getConstant('OK'), align: 'Right', tabIndex: 0 });
|
|
25026
25080
|
toolbarItems.push({ id: id + '_cancel', prefixIcon: 'e-icons e-close', cssClass: 'top-icon e-save',
|
|
25027
25081
|
tooltipText: this.l10n.getConstant('Cancel'), align: 'Right' });
|
|
25028
25082
|
}
|
|
@@ -25166,7 +25220,7 @@ class ToolbarModule {
|
|
|
25166
25220
|
}
|
|
25167
25221
|
widthAspectRatio(e) {
|
|
25168
25222
|
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
25169
|
-
if (e.keyCode === 109) {
|
|
25223
|
+
if (e.keyCode === 109 || e.keyCode === 9) {
|
|
25170
25224
|
return;
|
|
25171
25225
|
}
|
|
25172
25226
|
const parent = this.parent;
|
|
@@ -25210,7 +25264,7 @@ class ToolbarModule {
|
|
|
25210
25264
|
}
|
|
25211
25265
|
heightAspectRatio(e) {
|
|
25212
25266
|
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
25213
|
-
if (e.keyCode === 109) {
|
|
25267
|
+
if (e.keyCode === 109 || e.keyCode === 9) {
|
|
25214
25268
|
return;
|
|
25215
25269
|
}
|
|
25216
25270
|
const parent = this.parent;
|
|
@@ -25278,7 +25332,8 @@ class ToolbarModule {
|
|
|
25278
25332
|
placeholder: isResize ? null : height, format: '###.## px' })
|
|
25279
25333
|
});
|
|
25280
25334
|
if (!this.isAspectRatio) {
|
|
25281
|
-
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 });
|
|
25282
25337
|
this.isAspectRatio = true;
|
|
25283
25338
|
}
|
|
25284
25339
|
else {
|
|
@@ -25287,7 +25342,7 @@ class ToolbarModule {
|
|
|
25287
25342
|
}
|
|
25288
25343
|
if (!Browser.isDevice) {
|
|
25289
25344
|
toolbarItems.push({ id: id + '_ok', prefixIcon: 'e-icons e-check', cssClass: 'top-icon e-tick',
|
|
25290
|
-
tooltipText: this.l10n.getConstant('OK'), align: 'Right' });
|
|
25345
|
+
tooltipText: this.l10n.getConstant('OK'), align: 'Right', tabIndex: 0 });
|
|
25291
25346
|
toolbarItems.push({ id: id + '_cancel', prefixIcon: 'e-icons e-close', cssClass: 'top-icon e-save',
|
|
25292
25347
|
tooltipText: this.l10n.getConstant('Cancel'), align: 'Right' });
|
|
25293
25348
|
}
|
|
@@ -25926,7 +25981,7 @@ class ToolbarModule {
|
|
|
25926
25981
|
{ id: 'svg', text: 'SVG' }
|
|
25927
25982
|
];
|
|
25928
25983
|
const inputObj = new TextBox({
|
|
25929
|
-
placeholder: this.l10n.getConstant('ImageName')
|
|
25984
|
+
placeholder: this.l10n.getConstant('ImageName')
|
|
25930
25985
|
});
|
|
25931
25986
|
inputObj.appendTo('#' + id + '_imgNametext');
|
|
25932
25987
|
const qualityContainer = document.getElementById(id + '_imgQualitydiv');
|
|
@@ -26096,7 +26151,7 @@ class ToolbarModule {
|
|
|
26096
26151
|
else {
|
|
26097
26152
|
imageNameLabel = document.getElementById(id + '_imageNameLabel');
|
|
26098
26153
|
}
|
|
26099
|
-
/* eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
26154
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
26100
26155
|
tempCanvas.toBlob((function (blob) {
|
|
26101
26156
|
fileSize = Math.floor(blob.size / 1024);
|
|
26102
26157
|
if (fileSize > 1000) {
|
|
@@ -26176,7 +26231,7 @@ class ToolbarModule {
|
|
|
26176
26231
|
}
|
|
26177
26232
|
if (!Browser.isDevice) {
|
|
26178
26233
|
toolbarItems.push({ id: id + '_ok', prefixIcon: 'e-icons e-check', cssClass: 'top-icon e-tick',
|
|
26179
|
-
tooltipText: this.l10n.getConstant('OK'), align: 'Right' });
|
|
26234
|
+
tooltipText: this.l10n.getConstant('OK'), align: 'Right', tabIndex: 0 });
|
|
26180
26235
|
toolbarItems.push({ id: id + '_cancel', prefixIcon: 'e-icons e-close', cssClass: 'top-icon e-save',
|
|
26181
26236
|
tooltipText: this.l10n.getConstant('Cancel'), align: 'Right' });
|
|
26182
26237
|
}
|
|
@@ -26253,7 +26308,7 @@ class ToolbarModule {
|
|
|
26253
26308
|
parent.notify('selection', { prop: 'getCurrentDrawingShape', value: { obj: obj } });
|
|
26254
26309
|
if (obj['shape'] !== 'path') {
|
|
26255
26310
|
toolbarItems.push({ id: id + '_ok', prefixIcon: 'e-icons e-check', cssClass: 'top-icon e-tick',
|
|
26256
|
-
tooltipText: this.l10n.getConstant('OK'), align: 'Right' });
|
|
26311
|
+
tooltipText: this.l10n.getConstant('OK'), align: 'Right', tabIndex: 0 });
|
|
26257
26312
|
toolbarItems.push({ id: id + '_cancel', prefixIcon: 'e-icons e-close', cssClass: 'top-icon e-save',
|
|
26258
26313
|
tooltipText: this.l10n.getConstant('Cancel'), align: 'Right' });
|
|
26259
26314
|
}
|
|
@@ -26860,7 +26915,7 @@ class ToolbarModule {
|
|
|
26860
26915
|
}
|
|
26861
26916
|
if (!Browser.isDevice) {
|
|
26862
26917
|
toolbarItems.push({ id: id + '_ok', prefixIcon: 'e-icons e-check', cssClass: 'top-icon e-tick',
|
|
26863
|
-
tooltipText: this.l10n.getConstant('OK'), align: 'Right' });
|
|
26918
|
+
tooltipText: this.l10n.getConstant('OK'), align: 'Right', tabIndex: 0 });
|
|
26864
26919
|
toolbarItems.push({ id: id + '_cancel', prefixIcon: 'e-icons e-close', cssClass: 'top-icon e-save',
|
|
26865
26920
|
tooltipText: this.l10n.getConstant('Cancel'), align: 'Right' });
|
|
26866
26921
|
}
|
|
@@ -27240,6 +27295,44 @@ class ToolbarModule {
|
|
|
27240
27295
|
}
|
|
27241
27296
|
this.currToolbar = type;
|
|
27242
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
|
+
}
|
|
27243
27336
|
}
|
|
27244
27337
|
performCropTransformClick(shape, isTransform) {
|
|
27245
27338
|
const parent = this.parent;
|
|
@@ -27305,7 +27398,7 @@ class ToolbarModule {
|
|
|
27305
27398
|
}
|
|
27306
27399
|
if (!Browser.isDevice) {
|
|
27307
27400
|
toolbarItems.push({ id: id + '_ok', prefixIcon: 'e-icons e-check', cssClass: 'top-icon e-tick',
|
|
27308
|
-
tooltipText: this.l10n.getConstant('OK'), align: 'Right' });
|
|
27401
|
+
tooltipText: this.l10n.getConstant('OK'), align: 'Right', tabIndex: 0 });
|
|
27309
27402
|
toolbarItems.push({ id: id + '_cancel', prefixIcon: 'e-icons e-close', cssClass: 'top-icon e-save',
|
|
27310
27403
|
tooltipText: this.l10n.getConstant('Cancel'), align: 'Right' });
|
|
27311
27404
|
}
|
|
@@ -27358,7 +27451,7 @@ class ToolbarModule {
|
|
|
27358
27451
|
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Default') > -1)) {
|
|
27359
27452
|
toolbarItems.push({ id: id + '_default', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
|
|
27360
27453
|
tooltipText: this.l10n.getConstant('Default'), align: 'Center',
|
|
27361
|
-
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>' });
|
|
27362
27455
|
}
|
|
27363
27456
|
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Chrome') > -1)) {
|
|
27364
27457
|
toolbarItems.push({ id: id + '_chrome', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
|
|
@@ -27431,7 +27524,7 @@ class ToolbarModule {
|
|
|
27431
27524
|
}
|
|
27432
27525
|
if (!Browser.isDevice) {
|
|
27433
27526
|
toolbarItems.push({ id: id + '_ok', prefixIcon: 'e-icons e-check', cssClass: 'top-icon e-tick',
|
|
27434
|
-
tooltipText: this.l10n.getConstant('OK'), align: 'Right' });
|
|
27527
|
+
tooltipText: this.l10n.getConstant('OK'), align: 'Right', tabIndex: 0 });
|
|
27435
27528
|
toolbarItems.push({ id: id + '_cancel', prefixIcon: 'e-icons e-close', cssClass: 'top-icon e-save',
|
|
27436
27529
|
tooltipText: this.l10n.getConstant('Cancel'), align: 'Right' });
|
|
27437
27530
|
}
|