@syncfusion/ej2-image-editor 31.2.12 → 32.1.19
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/README.md +2 -12
- package/aceconfig.js +17 -0
- package/dist/ej2-image-editor.umd.min.js +1 -10
- package/dist/ej2-image-editor.umd.min.js.map +1 -1
- package/dist/es6/ej2-image-editor.es2015.js +67 -123
- package/dist/es6/ej2-image-editor.es2015.js.map +1 -1
- package/dist/es6/ej2-image-editor.es5.js +67 -123
- package/dist/es6/ej2-image-editor.es5.js.map +1 -1
- package/dist/global/ej2-image-editor.min.js +1 -10
- package/dist/global/ej2-image-editor.min.js.map +1 -1
- package/dist/global/index.d.ts +0 -9
- package/package.json +8 -8
- package/src/image-editor/action/draw.js +1 -1
- package/src/image-editor/action/export.js +1 -5
- package/src/image-editor/action/freehand-draw.js +0 -5
- package/src/image-editor/action/selection.js +6 -14
- package/src/image-editor/action/shape.d.ts +0 -1
- package/src/image-editor/action/shape.js +2 -20
- package/src/image-editor/base/image-editor.js +3 -11
- package/src/image-editor/renderer/toolbar.js +54 -67
- package/styles/bds-lite.css +58 -57
- package/styles/bds-lite.scss +12 -13
- package/styles/bds.css +82 -60
- package/styles/bds.scss +13 -14
- package/styles/bootstrap-dark-lite.css +58 -57
- package/styles/bootstrap-dark-lite.scss +12 -13
- package/styles/bootstrap-dark.css +82 -60
- package/styles/bootstrap-dark.scss +13 -14
- package/styles/bootstrap-lite.css +58 -57
- package/styles/bootstrap-lite.scss +12 -13
- package/styles/bootstrap.css +82 -60
- package/styles/bootstrap.scss +13 -14
- package/styles/bootstrap4-lite.css +58 -57
- package/styles/bootstrap4-lite.scss +12 -13
- package/styles/bootstrap4.css +82 -60
- package/styles/bootstrap4.scss +13 -14
- package/styles/bootstrap5-dark-lite.css +58 -57
- package/styles/bootstrap5-dark-lite.scss +12 -13
- package/styles/bootstrap5-dark.css +82 -60
- package/styles/bootstrap5-dark.scss +13 -14
- package/styles/bootstrap5-lite.css +58 -57
- package/styles/bootstrap5-lite.scss +13 -13
- package/styles/bootstrap5.3-lite.css +138 -57
- package/styles/bootstrap5.3-lite.scss +13 -13
- package/styles/bootstrap5.3.css +162 -60
- package/styles/bootstrap5.3.scss +14 -14
- package/styles/bootstrap5.css +82 -60
- package/styles/bootstrap5.scss +14 -14
- package/styles/fabric-dark-lite.css +58 -57
- package/styles/fabric-dark-lite.scss +13 -13
- package/styles/fabric-dark.css +82 -60
- package/styles/fabric-dark.scss +14 -14
- package/styles/fabric-lite.css +58 -57
- package/styles/fabric-lite.scss +13 -13
- package/styles/fabric.css +82 -60
- package/styles/fabric.scss +14 -14
- package/styles/fluent-dark-lite.css +58 -57
- package/styles/fluent-dark-lite.scss +13 -13
- package/styles/fluent-dark.css +82 -60
- package/styles/fluent-dark.scss +14 -14
- package/styles/fluent-lite.css +58 -57
- package/styles/fluent-lite.scss +13 -13
- package/styles/fluent.css +82 -60
- package/styles/fluent.scss +14 -14
- package/styles/fluent2-lite.css +139 -60
- package/styles/fluent2-lite.scss +13 -13
- package/styles/fluent2.css +163 -63
- package/styles/fluent2.scss +14 -14
- package/styles/highcontrast-light-lite.css +58 -57
- package/styles/highcontrast-light-lite.scss +13 -13
- package/styles/highcontrast-light.css +82 -60
- package/styles/highcontrast-light.scss +14 -14
- package/styles/highcontrast-lite.css +57 -57
- package/styles/highcontrast-lite.scss +13 -13
- package/styles/highcontrast.css +81 -60
- package/styles/highcontrast.scss +14 -14
- package/styles/image-editor/_all.scss +2 -2
- package/styles/image-editor/_bds-definition.scss +51 -0
- package/styles/image-editor/_bigger.scss +61 -9
- package/styles/image-editor/_bootstrap-dark-definition.scss +51 -0
- package/styles/image-editor/_bootstrap-definition.scss +51 -0
- package/styles/image-editor/_bootstrap4-definition.scss +55 -0
- package/styles/image-editor/_bootstrap5-dark-definition.scss +81 -1
- package/styles/image-editor/_bootstrap5-definition.scss +52 -0
- package/styles/image-editor/_bootstrap5.3-definition.scss +51 -0
- package/styles/image-editor/_fabric-dark-definition.scss +51 -0
- package/styles/image-editor/_fabric-definition.scss +51 -0
- package/styles/image-editor/_fluent-dark-definition.scss +81 -1
- package/styles/image-editor/_fluent-definition.scss +52 -0
- package/styles/image-editor/_fluent2-definition.scss +51 -0
- package/styles/image-editor/_fusionnew-definition.scss +51 -0
- package/styles/image-editor/_highcontrast-definition.scss +51 -0
- package/styles/image-editor/_highcontrast-light-definition.scss +51 -0
- package/styles/image-editor/_layout.scss +198 -115
- package/styles/image-editor/_material-dark-definition.scss +51 -0
- package/styles/image-editor/_material-definition.scss +51 -0
- package/styles/image-editor/_material3-dark-definition.scss +82 -1
- package/styles/image-editor/_material3-definition.scss +53 -0
- package/styles/image-editor/_tailwind-dark-definition.scss +81 -1
- package/styles/image-editor/_tailwind-definition.scss +52 -0
- package/styles/image-editor/_tailwind3-definition.scss +75 -1
- package/styles/image-editor/_theme-variables.scss +1 -0
- package/styles/image-editor/_theme.scss +59 -11
- package/styles/image-editor/bds.css +82 -60
- package/styles/image-editor/bds.scss +14 -14
- package/styles/image-editor/bootstrap-dark.css +82 -60
- package/styles/image-editor/bootstrap-dark.scss +14 -14
- package/styles/image-editor/bootstrap.css +82 -60
- package/styles/image-editor/bootstrap.scss +14 -14
- package/styles/image-editor/bootstrap4.css +82 -60
- package/styles/image-editor/bootstrap4.scss +14 -14
- package/styles/image-editor/bootstrap5-dark.css +82 -60
- package/styles/image-editor/bootstrap5-dark.scss +14 -14
- package/styles/image-editor/bootstrap5.3.css +162 -60
- package/styles/image-editor/bootstrap5.3.scss +14 -14
- package/styles/image-editor/bootstrap5.css +82 -60
- package/styles/image-editor/bootstrap5.scss +14 -14
- package/styles/image-editor/fabric-dark.css +82 -60
- package/styles/image-editor/fabric-dark.scss +14 -14
- package/styles/image-editor/fabric.css +82 -60
- package/styles/image-editor/fabric.scss +14 -14
- package/styles/image-editor/fluent-dark.css +82 -60
- package/styles/image-editor/fluent-dark.scss +14 -14
- package/styles/image-editor/fluent.css +82 -60
- package/styles/image-editor/fluent.scss +14 -14
- package/styles/image-editor/fluent2.css +163 -63
- package/styles/image-editor/fluent2.scss +14 -14
- package/styles/image-editor/highcontrast-light.css +82 -60
- package/styles/image-editor/highcontrast-light.scss +14 -14
- package/styles/image-editor/highcontrast.css +81 -60
- package/styles/image-editor/highcontrast.scss +14 -14
- package/styles/image-editor/icons/_bds.scss +1 -0
- package/styles/image-editor/icons/_bootstrap-dark.scss +1 -0
- package/styles/image-editor/icons/_bootstrap.scss +1 -0
- package/styles/image-editor/icons/_bootstrap4.scss +1 -0
- package/styles/image-editor/icons/_bootstrap5-dark.scss +1 -1
- package/styles/image-editor/icons/_bootstrap5.3.scss +1 -0
- package/styles/image-editor/icons/_bootstrap5.scss +1 -0
- package/styles/image-editor/icons/_fabric-dark.scss +1 -0
- package/styles/image-editor/icons/_fabric.scss +1 -0
- package/styles/image-editor/icons/_fluent-dark.scss +1 -1
- package/styles/image-editor/icons/_fluent.scss +1 -0
- package/styles/image-editor/icons/_fluent2.scss +1 -0
- package/styles/image-editor/icons/_fusionnew.scss +1 -0
- package/styles/image-editor/icons/_highcontrast-light.scss +1 -0
- package/styles/image-editor/icons/_highcontrast.scss +1 -0
- package/styles/image-editor/icons/_material-dark.scss +1 -0
- package/styles/image-editor/icons/_material.scss +1 -0
- package/styles/image-editor/icons/_material3-dark.scss +1 -1
- package/styles/image-editor/icons/_material3.scss +1 -0
- package/styles/image-editor/icons/_tailwind-dark.scss +1 -1
- package/styles/image-editor/icons/_tailwind.scss +1 -0
- package/styles/image-editor/icons/_tailwind3.scss +1 -0
- package/styles/image-editor/material-dark.css +82 -60
- package/styles/image-editor/material-dark.scss +14 -14
- package/styles/image-editor/material.css +82 -60
- package/styles/image-editor/material.scss +14 -14
- package/styles/image-editor/material3-dark.css +161 -60
- package/styles/image-editor/material3-dark.scss +14 -15
- package/styles/image-editor/material3.css +161 -60
- package/styles/image-editor/material3.scss +14 -15
- package/styles/image-editor/tailwind-dark.css +82 -60
- package/styles/image-editor/tailwind-dark.scss +14 -14
- package/styles/image-editor/tailwind.css +82 -60
- package/styles/image-editor/tailwind.scss +14 -14
- package/styles/image-editor/tailwind3.css +235 -84
- package/styles/image-editor/tailwind3.scss +14 -14
- package/styles/material-dark-lite.css +58 -57
- package/styles/material-dark-lite.scss +13 -13
- package/styles/material-dark.css +82 -60
- package/styles/material-dark.scss +14 -14
- package/styles/material-lite.css +58 -57
- package/styles/material-lite.scss +12 -13
- package/styles/material.css +82 -60
- package/styles/material.scss +13 -14
- package/styles/material3-dark-lite.css +137 -57
- package/styles/material3-dark-lite.scss +13 -13
- package/styles/material3-dark.css +161 -60
- package/styles/material3-dark.scss +14 -16
- package/styles/material3-lite.css +137 -57
- package/styles/material3-lite.scss +13 -13
- package/styles/material3.css +161 -60
- package/styles/material3.scss +14 -16
- package/styles/tailwind-dark-lite.css +58 -57
- package/styles/tailwind-dark-lite.scss +13 -13
- package/styles/tailwind-dark.css +82 -60
- package/styles/tailwind-dark.scss +14 -14
- package/styles/tailwind-lite.css +58 -57
- package/styles/tailwind-lite.scss +13 -13
- package/styles/tailwind.css +82 -60
- package/styles/tailwind.scss +14 -14
- package/styles/tailwind3-lite.css +195 -72
- package/styles/tailwind3-lite.scss +13 -13
- package/styles/tailwind3.css +235 -84
- package/styles/tailwind3.scss +14 -14
package/dist/global/index.d.ts
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* filename: index.d.ts
|
|
3
|
-
* version : 31.2.12
|
|
4
|
-
* Copyright Syncfusion Inc. 2001 - 2025. All rights reserved.
|
|
5
|
-
* Use of this code is subject to the terms of our license.
|
|
6
|
-
* A copy of the current license can be obtained at any time by e-mailing
|
|
7
|
-
* licensing@syncfusion.com. Any infringement will be prosecuted under
|
|
8
|
-
* applicable laws.
|
|
9
|
-
*/
|
|
10
1
|
import * as _imageeditor from '@syncfusion/ej2-image-editor';
|
|
11
2
|
|
|
12
3
|
export declare namespace ej {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncfusion/ej2-image-editor",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "32.1.19",
|
|
4
4
|
"description": "Essential JS 2 ImageEditor",
|
|
5
5
|
"author": "Syncfusion Inc.",
|
|
6
6
|
"license": "SEE LICENSE IN license",
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
"module": "./index.js",
|
|
9
9
|
"es2015": "./dist/es6/ej2-image-editor.es5.js",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@syncfusion/ej2-base": "~
|
|
12
|
-
"@syncfusion/ej2-buttons": "~
|
|
13
|
-
"@syncfusion/ej2-dropdowns": "~
|
|
14
|
-
"@syncfusion/ej2-inputs": "~
|
|
15
|
-
"@syncfusion/ej2-navigations": "~
|
|
16
|
-
"@syncfusion/ej2-popups": "~
|
|
17
|
-
"@syncfusion/ej2-splitbuttons": "~
|
|
11
|
+
"@syncfusion/ej2-base": "~32.1.19",
|
|
12
|
+
"@syncfusion/ej2-buttons": "~32.1.19",
|
|
13
|
+
"@syncfusion/ej2-dropdowns": "~32.1.19",
|
|
14
|
+
"@syncfusion/ej2-inputs": "~32.1.19",
|
|
15
|
+
"@syncfusion/ej2-navigations": "~32.1.19",
|
|
16
|
+
"@syncfusion/ej2-popups": "~32.1.19",
|
|
17
|
+
"@syncfusion/ej2-splitbuttons": "~32.1.19"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {},
|
|
20
20
|
"keywords": [
|
|
@@ -4129,7 +4129,7 @@ var Draw = /** @class */ (function () {
|
|
|
4129
4129
|
this.errorLoading();
|
|
4130
4130
|
parent.showDialogPopup('unsupported', fileTypeError);
|
|
4131
4131
|
if (dropArea && !parent.isImageLoaded) {
|
|
4132
|
-
dropArea.style.display = '
|
|
4132
|
+
dropArea.style.display = 'flex';
|
|
4133
4133
|
}
|
|
4134
4134
|
}
|
|
4135
4135
|
else {
|
|
@@ -65,12 +65,8 @@ var Export = /** @class */ (function () {
|
|
|
65
65
|
type = type ? type : 'Png';
|
|
66
66
|
parent.notify('shape', { prop: 'redrawActObj', onPropertyChange: false,
|
|
67
67
|
value: { x: null, y: null, isMouseDown: null } });
|
|
68
|
-
var imageQualityObj = { currentImageQuality: 1 };
|
|
69
|
-
if (type.toLowerCase() === 'jpeg') {
|
|
70
|
-
parent.notify('toolbar', { prop: 'getcurrentImageQuality', onPropertyChange: false, value: { obj: imageQualityObj } });
|
|
71
|
-
}
|
|
72
68
|
var beforeSave = { cancel: false, fileName: fileName ? fileName : imageName,
|
|
73
|
-
fileType: type, imageQuality: imgQuality
|
|
69
|
+
fileType: type, imageQuality: imgQuality };
|
|
74
70
|
parent.trigger('beforeSave', beforeSave);
|
|
75
71
|
this.beforeSaveEvent(beforeSave, type, fileName, imageName, imgQuality);
|
|
76
72
|
}
|
|
@@ -1164,11 +1164,6 @@ var FreehandDrawing = /** @class */ (function () {
|
|
|
1164
1164
|
var parent = this.parent;
|
|
1165
1165
|
var point = parent.pointColl[this.fhdSelIdx];
|
|
1166
1166
|
parent.trigger('shapeChanging', shapeChangingArgs);
|
|
1167
|
-
if (shapeChangingArgs.cancel) {
|
|
1168
|
-
parent.editCompleteArgs = shapeChangingArgs;
|
|
1169
|
-
this.cancelFhd();
|
|
1170
|
-
return;
|
|
1171
|
-
}
|
|
1172
1167
|
if (parent.element.getAttribute('data-value') === 'mask-drawing' && !this.isMasking) {
|
|
1173
1168
|
this.isMasking = true;
|
|
1174
1169
|
parent.upperCanvas.style.cursor = 'crosshair';
|
|
@@ -3209,6 +3209,10 @@ var Selection = /** @class */ (function () {
|
|
|
3209
3209
|
};
|
|
3210
3210
|
Selection.prototype.mouseDownEventHandler = function (e) {
|
|
3211
3211
|
var parent = this.parent;
|
|
3212
|
+
if (parent.isSafari && e.buttons === 0 && (this.parent.isShapeDrawing || this.parent.togglePen) && this.parent.drawingShape !== 'path') {
|
|
3213
|
+
e.stopImmediatePropagation();
|
|
3214
|
+
return;
|
|
3215
|
+
}
|
|
3212
3216
|
parent.isKBDNavigation = false;
|
|
3213
3217
|
this.mouseDown = e.currentTarget === parent.lowerCanvas || e.currentTarget === parent.upperCanvas ?
|
|
3214
3218
|
'canvas' : '';
|
|
@@ -3486,9 +3490,6 @@ var Selection = /** @class */ (function () {
|
|
|
3486
3490
|
var objColl = extend([], parent.objColl, [], true);
|
|
3487
3491
|
if (!isNullOrUndefined(obj['index']) && obj['index'] > -1) {
|
|
3488
3492
|
parent.notify('freehand-draw', { prop: 'selectFhd', value: { type: 'ok' } });
|
|
3489
|
-
if (!this.isFhdPoint) {
|
|
3490
|
-
return;
|
|
3491
|
-
}
|
|
3492
3493
|
parent.notify('freehand-draw', { prop: 'hoverFhd', onPropertyChange: false,
|
|
3493
3494
|
value: { strokeColor: null, strokeWidth: null } });
|
|
3494
3495
|
parent.notify('toolbar', { prop: 'renderQAT', onPropertyChange: false, value: { isPenEdit: true } });
|
|
@@ -4033,9 +4034,7 @@ var Selection = /** @class */ (function () {
|
|
|
4033
4034
|
this.currentDrawingShape = parent.drawingShape.toLowerCase();
|
|
4034
4035
|
if (dummyClick) {
|
|
4035
4036
|
parent.enableShapeDrawing(parent.toPascalCase(parent.drawingShape), true);
|
|
4036
|
-
|
|
4037
|
-
parent.upperCanvas.style.cursor = 'crosshair';
|
|
4038
|
-
}
|
|
4037
|
+
parent.upperCanvas.style.cursor = 'crosshair';
|
|
4039
4038
|
}
|
|
4040
4039
|
}
|
|
4041
4040
|
parent.isShapeDrawing = false;
|
|
@@ -5057,14 +5056,7 @@ var Selection = /** @class */ (function () {
|
|
|
5057
5056
|
}
|
|
5058
5057
|
if (!this.isCropSelection && parent.activeObj.shape !== 'redact') {
|
|
5059
5058
|
parent.trigger('shapeChanging', shapeChangingArgs);
|
|
5060
|
-
|
|
5061
|
-
parent.objColl.splice(i, 0, temp);
|
|
5062
|
-
parent.notify('shape', { prop: 'refreshActiveObj', onPropertyChange: false });
|
|
5063
|
-
parent.notify('draw', { prop: 'render-image', value: { isMouseWheel: null } });
|
|
5064
|
-
}
|
|
5065
|
-
else {
|
|
5066
|
-
this.shapeEvent(shapeChangingArgs);
|
|
5067
|
-
}
|
|
5059
|
+
this.shapeEvent(shapeChangingArgs);
|
|
5068
5060
|
parent.editCompleteArgs = shapeChangingArgs;
|
|
5069
5061
|
}
|
|
5070
5062
|
else {
|
|
@@ -8,7 +8,6 @@ var Shape = /** @class */ (function () {
|
|
|
8
8
|
this.keyHistory = ''; // text history
|
|
9
9
|
this.preventFrameAnnotation = false;
|
|
10
10
|
this.redactType = 'blur';
|
|
11
|
-
this.isPublicUpdateShape = false;
|
|
12
11
|
this.parent = parent;
|
|
13
12
|
this.addEventListener();
|
|
14
13
|
}
|
|
@@ -282,9 +281,6 @@ var Shape = /** @class */ (function () {
|
|
|
282
281
|
case 'setRedactType':
|
|
283
282
|
this.redactType = args.value['redactType'];
|
|
284
283
|
break;
|
|
285
|
-
case 'setPublicUpdateShape':
|
|
286
|
-
this.isPublicUpdateShape = args.value['isPublicUpdateShape'];
|
|
287
|
-
break;
|
|
288
284
|
}
|
|
289
285
|
};
|
|
290
286
|
Shape.prototype.getModuleName = function () {
|
|
@@ -311,7 +307,7 @@ var Shape = /** @class */ (function () {
|
|
|
311
307
|
this.textSettings =
|
|
312
308
|
{ text: 'Enter Text', fontFamily: this.parent.fontFamily.default, fontSize: null, fontRatio: null, bold: false, italic: false, underline: false, strikethrough: false };
|
|
313
309
|
this.strokeSettings = { strokeColor: '#fff', fillColor: '', strokeWidth: null, radius: null, outlineColor: '', outlineWidth: null };
|
|
314
|
-
this.preventFrameAnnotation =
|
|
310
|
+
this.preventFrameAnnotation = false;
|
|
315
311
|
};
|
|
316
312
|
Shape.prototype.drawEllipse = function (x, y, radiusX, radiusY, strokeWidth, strokeColor, fillColor, degree, isSelected) {
|
|
317
313
|
this.initializeShape('ellipse');
|
|
@@ -1024,7 +1020,7 @@ var Shape = /** @class */ (function () {
|
|
|
1024
1020
|
}
|
|
1025
1021
|
parent.notify('selection', { prop: 'setTextSelection', onPropertyChange: false,
|
|
1026
1022
|
value: { width: width, height: height } });
|
|
1027
|
-
if (parent.activeObj.rotatedAngle !== 0
|
|
1023
|
+
if (parent.activeObj.rotatedAngle !== 0) {
|
|
1028
1024
|
var width_1 = parent.activeObj.activePoint.width - tempActiveObj.activePoint.width;
|
|
1029
1025
|
var height_1 = parent.activeObj.activePoint.height - tempActiveObj.activePoint.height;
|
|
1030
1026
|
var value = '';
|
|
@@ -1043,20 +1039,6 @@ var Shape = /** @class */ (function () {
|
|
|
1043
1039
|
parent.notify('shape', { prop: 'updateFontSize', onPropertyChange: false,
|
|
1044
1040
|
value: { obj: parent.activeObj } });
|
|
1045
1041
|
}
|
|
1046
|
-
else if (this.isPublicUpdateShape) {
|
|
1047
|
-
var width_2 = parent.activeObj.activePoint.width - tempActiveObj.activePoint.width;
|
|
1048
|
-
var height_2 = parent.activeObj.activePoint.height - tempActiveObj.activePoint.height;
|
|
1049
|
-
var value = '';
|
|
1050
|
-
if (parent.transform.degree === 0 || parent.transform.degree === 180) {
|
|
1051
|
-
value = 'width';
|
|
1052
|
-
}
|
|
1053
|
-
else if (parent.transform.degree === 90 || parent.transform.degree === 270) {
|
|
1054
|
-
value = 'height';
|
|
1055
|
-
}
|
|
1056
|
-
parent.activeObj.activePoint = extend({}, tempActiveObj.activePoint, {}, true);
|
|
1057
|
-
parent.notify('selection', { prop: 'adjustRotationPoints', onPropertyChange: false, value: { rectangle: parent.activeObj.activePoint,
|
|
1058
|
-
x: width_2, y: height_2, angle: parent.activeObj.rotatedAngle, type: 'text', elem: value } });
|
|
1059
|
-
}
|
|
1060
1042
|
parent.notify('draw', { prop: 'updateActiveObject', onPropertyChange: false, value: { actPoint: parent.activeObj.activePoint, obj: parent.activeObj,
|
|
1061
1043
|
isMouseMove: null, x: null, y: null } });
|
|
1062
1044
|
this.updImgRatioForActObj();
|
|
@@ -937,12 +937,10 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
937
937
|
var dropAreaElement = this.createElement('div', { id: this.element.id + '_dropArea', className: 'e-ie-drop-area' });
|
|
938
938
|
dropAreaElement.style.position = 'relative';
|
|
939
939
|
var dropIconElement = this.createElement('span', { className: 'e-ie-drop-icon e-icons e-image' });
|
|
940
|
-
dropIconElement.style.position = 'absolute';
|
|
941
940
|
var dropContentElement = this.createElement('span', { className: 'e-ie-drop-content' });
|
|
942
|
-
dropContentElement.style.cssText = '
|
|
941
|
+
dropContentElement.style.cssText = 'display: none;';
|
|
943
942
|
dropContentElement.textContent = dragObj['value'] + ' ';
|
|
944
943
|
var minDropContentElem = this.createElement('span', { className: 'e-ie-min-drop-content' });
|
|
945
|
-
minDropContentElem.style.position = 'absolute';
|
|
946
944
|
minDropContentElem.textContent = dropObj['value'] + ' ';
|
|
947
945
|
var dropAnchorElement = this.createElement('a', { id: this.element.id + '_dropBrowse', className: 'e-ie-drop-browse' });
|
|
948
946
|
dropAnchorElement.textContent = browseObj['value'];
|
|
@@ -952,7 +950,7 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
952
950
|
minDropContentElem.appendChild(minDropAnchorElem);
|
|
953
951
|
dropAnchorElement.href = '';
|
|
954
952
|
minDropAnchorElem.href = '';
|
|
955
|
-
var dropInfoElement = this.createElement('span', { className: 'e-ie-drop-info'
|
|
953
|
+
var dropInfoElement = this.createElement('span', { className: 'e-ie-drop-info' });
|
|
956
954
|
this.updateDropInfoContent(dropInfoElement);
|
|
957
955
|
var dropUploader = dropAreaElement.appendChild(this.createElement('input', {
|
|
958
956
|
id: this.element.id + '_dropfileUpload', className: 'e-fileUpload e-image-upload'
|
|
@@ -1817,9 +1815,6 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
1817
1815
|
*
|
|
1818
1816
|
*/
|
|
1819
1817
|
ImageEditor.prototype.updateShape = function (setting, isSelected) {
|
|
1820
|
-
if (setting.type.toLowerCase() === 'text') {
|
|
1821
|
-
this.notify('shape', { prop: 'setPublicUpdateShape', onPropertyChange: false, value: { isPublicUpdateShape: true } });
|
|
1822
|
-
}
|
|
1823
1818
|
var obj = { isSelected: false };
|
|
1824
1819
|
var isTextArea = false;
|
|
1825
1820
|
var freehandObj = { bool: false };
|
|
@@ -1891,9 +1886,6 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
1891
1886
|
}
|
|
1892
1887
|
}
|
|
1893
1888
|
}
|
|
1894
|
-
if (setting.type.toLowerCase() === 'text') {
|
|
1895
|
-
this.notify('shape', { prop: 'setPublicUpdateShape', onPropertyChange: false, value: { isPublicUpdateShape: false } });
|
|
1896
|
-
}
|
|
1897
1889
|
return obj['isSelected'];
|
|
1898
1890
|
};
|
|
1899
1891
|
/**
|
|
@@ -2524,7 +2516,7 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
2524
2516
|
this.notify('toolbar', { prop: 'create-contextual-toolbar', onPropertyChange: false });
|
|
2525
2517
|
var dropArea = document.getElementById(this.element.id + '_dropArea');
|
|
2526
2518
|
if (dropArea) {
|
|
2527
|
-
dropArea.style.display = '
|
|
2519
|
+
dropArea.style.display = 'flex';
|
|
2528
2520
|
}
|
|
2529
2521
|
};
|
|
2530
2522
|
// AI related codes
|
|
@@ -280,9 +280,6 @@ var ToolbarModule = /** @class */ (function () {
|
|
|
280
280
|
case 'getToolbarHeight':
|
|
281
281
|
args.value['obj']['toolbarHeight'] = this.toolbarHeight;
|
|
282
282
|
break;
|
|
283
|
-
case 'getcurrentImageQuality':
|
|
284
|
-
args.value['obj']['currentImageQuality'] = this.currentQuality;
|
|
285
|
-
break;
|
|
286
283
|
case 'setToolbarHeight':
|
|
287
284
|
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.length > 0 && parent.toolbar.indexOf('Open') > -1)) {
|
|
288
285
|
this.toolbarHeight = args.value['height'];
|
|
@@ -1201,17 +1198,17 @@ var ToolbarModule = /** @class */ (function () {
|
|
|
1201
1198
|
}
|
|
1202
1199
|
var frame = document.querySelector('#' + id + '_frame');
|
|
1203
1200
|
if (frame && ((parent.currSelectionPoint && parent.currSelectionPoint.shape === 'crop-circle') || parent.isCircleCrop)) {
|
|
1204
|
-
frame.classList.add('e-overlay');
|
|
1201
|
+
frame.parentElement.classList.add('e-overlay');
|
|
1205
1202
|
}
|
|
1206
1203
|
else if (frame) {
|
|
1207
|
-
frame.classList.remove('e-overlay');
|
|
1204
|
+
frame.parentElement.classList.remove('e-overlay');
|
|
1208
1205
|
}
|
|
1209
1206
|
var ratio = document.querySelector('#' + id + '_aspectratio');
|
|
1210
1207
|
if (ratio && ((parent.currSelectionPoint && parent.currSelectionPoint.shape === 'crop-circle') || parent.isCircleCrop)) {
|
|
1211
|
-
ratio.classList.add('e-overlay');
|
|
1208
|
+
ratio.parentElement.classList.add('e-overlay');
|
|
1212
1209
|
}
|
|
1213
1210
|
else if (ratio) {
|
|
1214
|
-
ratio.classList.remove('e-overlay');
|
|
1211
|
+
ratio.parentElement.classList.remove('e-overlay');
|
|
1215
1212
|
}
|
|
1216
1213
|
};
|
|
1217
1214
|
ToolbarModule.prototype.createLeftToolbarControls = function () {
|
|
@@ -1445,34 +1442,34 @@ var ToolbarModule = /** @class */ (function () {
|
|
|
1445
1442
|
&& parent.activeObj.pointColl.length === 0)) &&
|
|
1446
1443
|
isNullOrUndefined(obj['freehandDrawSelectedId'])) {
|
|
1447
1444
|
if (duplicateElement) {
|
|
1448
|
-
duplicateElement.classList.add('e-overlay');
|
|
1445
|
+
duplicateElement.parentElement.classList.add('e-overlay');
|
|
1449
1446
|
}
|
|
1450
1447
|
if (removeElement) {
|
|
1451
|
-
removeElement.classList.add('e-overlay');
|
|
1448
|
+
removeElement.parentElement.classList.add('e-overlay');
|
|
1452
1449
|
}
|
|
1453
1450
|
if (editTextElement) {
|
|
1454
|
-
editTextElement.classList.add('e-overlay');
|
|
1451
|
+
editTextElement.parentElement.classList.add('e-overlay');
|
|
1455
1452
|
}
|
|
1456
1453
|
if (zOrderElement) {
|
|
1457
|
-
zOrderElement.classList.add('e-overlay');
|
|
1454
|
+
zOrderElement.parentElement.classList.add('e-overlay');
|
|
1458
1455
|
}
|
|
1459
1456
|
}
|
|
1460
1457
|
else {
|
|
1461
1458
|
if (duplicateElement) {
|
|
1462
|
-
duplicateElement.classList.remove('e-overlay');
|
|
1459
|
+
duplicateElement.parentElement.classList.remove('e-overlay');
|
|
1463
1460
|
}
|
|
1464
1461
|
if (removeElement) {
|
|
1465
|
-
removeElement.classList.remove('e-overlay');
|
|
1462
|
+
removeElement.parentElement.classList.remove('e-overlay');
|
|
1466
1463
|
}
|
|
1467
1464
|
if (editTextElement) {
|
|
1468
|
-
editTextElement.classList.remove('e-overlay');
|
|
1465
|
+
editTextElement.parentElement.classList.remove('e-overlay');
|
|
1469
1466
|
}
|
|
1470
1467
|
if (zOrderElement) {
|
|
1471
|
-
zOrderElement.classList.remove('e-overlay');
|
|
1468
|
+
zOrderElement.parentElement.classList.remove('e-overlay');
|
|
1472
1469
|
}
|
|
1473
1470
|
}
|
|
1474
1471
|
if (zOrderElement && (parent.shapeColl.length === 0 || (obj['freehandDrawSelectedId'] && parent.shapeColl.length === 1))) {
|
|
1475
|
-
zOrderElement.classList.add('e-overlay');
|
|
1472
|
+
zOrderElement.parentElement.classList.add('e-overlay');
|
|
1476
1473
|
}
|
|
1477
1474
|
};
|
|
1478
1475
|
ToolbarModule.prototype.renderStraightenSlider = function () {
|
|
@@ -3359,7 +3356,7 @@ var ToolbarModule = /** @class */ (function () {
|
|
|
3359
3356
|
var drawingObject = { shape: '' };
|
|
3360
3357
|
parent.notify('selection', { prop: 'getCurrentDrawingShape', onPropertyChange: false, value: { obj: drawingObject } });
|
|
3361
3358
|
if (drawingObject['shape'] === 'path' && okBtn) {
|
|
3362
|
-
okBtn.classList.add('e-overlay');
|
|
3359
|
+
okBtn.parentElement.classList.add('e-overlay');
|
|
3363
3360
|
}
|
|
3364
3361
|
}
|
|
3365
3362
|
if (parent.activeObj.shape === 'line' || parent.activeObj.shape === 'path') {
|
|
@@ -4851,11 +4848,11 @@ var ToolbarModule = /** @class */ (function () {
|
|
|
4851
4848
|
var orderObj = { order: null };
|
|
4852
4849
|
parent.notify('shape', { prop: 'getHighestOrder', onPropertyChange: false, value: { obj: orderObj } });
|
|
4853
4850
|
if (parent.activeObj.order > orderObj['order'] && document.getElementById(parent.element.id + '_bringToFront')) {
|
|
4854
|
-
document.getElementById(parent.element.id + '_bringToFront').classList.add('e-overlay');
|
|
4851
|
+
document.getElementById(parent.element.id + '_bringToFront').parentElement.classList.add('e-overlay');
|
|
4855
4852
|
}
|
|
4856
4853
|
else {
|
|
4857
4854
|
if (document.getElementById(parent.element.id + '_bringToFront')) {
|
|
4858
|
-
document.getElementById(parent.element.id + '_bringToFront').classList.remove('e-overlay');
|
|
4855
|
+
document.getElementById(parent.element.id + '_bringToFront').parentElement.classList.remove('e-overlay');
|
|
4859
4856
|
}
|
|
4860
4857
|
}
|
|
4861
4858
|
qtArea.style.width = 'auto';
|
|
@@ -4909,11 +4906,11 @@ var ToolbarModule = /** @class */ (function () {
|
|
|
4909
4906
|
parent.notify('shape', { prop: 'getHighestOrder', onPropertyChange: false, value: { obj: orderObj } });
|
|
4910
4907
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4911
4908
|
if (parent.getObjFromId(parent.pointColl[indexObj['freehandSelectedIndex']].id).order >= orderObj['order'] && document.getElementById(parent.element.id + '_bringToFront')) {
|
|
4912
|
-
document.getElementById(parent.element.id + '_bringToFront').classList.add('e-overlay');
|
|
4909
|
+
document.getElementById(parent.element.id + '_bringToFront').parentElement.classList.add('e-overlay');
|
|
4913
4910
|
}
|
|
4914
4911
|
else {
|
|
4915
4912
|
if (document.getElementById(parent.element.id + '_bringToFront')) {
|
|
4916
|
-
document.getElementById(parent.element.id + '_bringToFront').classList.remove('e-overlay');
|
|
4913
|
+
document.getElementById(parent.element.id + '_bringToFront').parentElement.classList.remove('e-overlay');
|
|
4917
4914
|
}
|
|
4918
4915
|
}
|
|
4919
4916
|
var obj = { activePoint: null };
|
|
@@ -5079,32 +5076,30 @@ var ToolbarModule = /** @class */ (function () {
|
|
|
5079
5076
|
parent.notify('undo-redo', { prop: 'updateUndoRedoStack', onPropertyChange: false });
|
|
5080
5077
|
break;
|
|
5081
5078
|
case 'bringtofront':
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
|
|
5101
|
-
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
document.getElementById(parent.element.id + '_bringToFront').classList.remove('e-overlay');
|
|
5105
|
-
}
|
|
5106
|
-
parent.notify('undo-redo', { prop: 'updateUndoRedoStack', onPropertyChange: false });
|
|
5079
|
+
parent.notify('freehand-draw', { prop: 'getFreehandSelectedIndex', onPropertyChange: false, value: { obj: indexObj } });
|
|
5080
|
+
shapeId = indexObj['freehandSelectedIndex'] !== null ? parent.pointColl[indexObj['freehandSelectedIndex']].id :
|
|
5081
|
+
parent.activeObj.currIndex;
|
|
5082
|
+
parent.updateShapeOrder(shapeId, type);
|
|
5083
|
+
isDisabled = false;
|
|
5084
|
+
parent.notify('shape', { prop: 'getHighestOrder', onPropertyChange: false, value: { obj: orderObj } });
|
|
5085
|
+
if (shapeId.indexOf('pen') > -1) {
|
|
5086
|
+
parent.notify('shape', { prop: 'updateShapeColl', onPropertyChange: false });
|
|
5087
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
5088
|
+
var order = parent.getObjFromId(shapeId).order;
|
|
5089
|
+
isDisabled = order >= orderObj['order'] ? true : false;
|
|
5090
|
+
}
|
|
5091
|
+
else {
|
|
5092
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
5093
|
+
var order = parent.getObjFromId(shapeId).order;
|
|
5094
|
+
isDisabled = order > orderObj['order'] ? true : false;
|
|
5095
|
+
}
|
|
5096
|
+
if (isDisabled) {
|
|
5097
|
+
document.getElementById(parent.element.id + '_bringToFront').parentElement.classList.add('e-overlay');
|
|
5098
|
+
}
|
|
5099
|
+
else {
|
|
5100
|
+
document.getElementById(parent.element.id + '_bringToFront').parentElement.classList.remove('e-overlay');
|
|
5107
5101
|
}
|
|
5102
|
+
parent.notify('undo-redo', { prop: 'updateUndoRedoStack', onPropertyChange: false });
|
|
5108
5103
|
break;
|
|
5109
5104
|
}
|
|
5110
5105
|
if (type === 'duplicate' || type === 'remove') {
|
|
@@ -6049,29 +6044,25 @@ var ToolbarModule = /** @class */ (function () {
|
|
|
6049
6044
|
}
|
|
6050
6045
|
hdrWrapper = canvasWrapper.appendChild(parent.createElement('div', {
|
|
6051
6046
|
id: id + '_headWrapper',
|
|
6047
|
+
className: 'e-ie-head-wrapper',
|
|
6052
6048
|
styles: 'position: relative'
|
|
6053
6049
|
}));
|
|
6054
6050
|
if (type === 'transparency') {
|
|
6055
6051
|
labelWrapper = hdrWrapper.appendChild(parent.createElement('label', {
|
|
6056
6052
|
id: id + '_labelWrapper',
|
|
6057
|
-
className: 'e-ie-finetune-slider-label'
|
|
6058
|
-
styles: Browser.isDevice ? 'position: absolute; top: 31%; left: calc(50% - 150px); font-size: 15px; text-transform: capitalize; font-weight: 400;'
|
|
6059
|
-
: 'position: absolute; top: 31%; left: calc(50% - 220px); font-size: 15px; text-transform: capitalize; font-weight: 400;'
|
|
6053
|
+
className: 'e-ie-finetune-slider-label'
|
|
6060
6054
|
}));
|
|
6061
6055
|
}
|
|
6062
6056
|
else {
|
|
6063
6057
|
labelWrapper = hdrWrapper.appendChild(parent.createElement('label', {
|
|
6064
6058
|
id: id + '_labelWrapper',
|
|
6065
|
-
className: 'e-ie-finetune-slider-label'
|
|
6066
|
-
styles: Browser.isDevice ? ('position: absolute; top: 31%; left: calc(50% - 160px); font-size: 15px; text-transform: capitalize; font-weight: 400;')
|
|
6067
|
-
: 'position: absolute; top: 25%; left: calc(50% - 226px); font-size: 15px; text-transform: capitalize; font-weight: 400;'
|
|
6059
|
+
className: 'e-ie-finetune-slider-label'
|
|
6068
6060
|
}));
|
|
6069
6061
|
}
|
|
6070
6062
|
labelWrapper.textContent = this.l10n.getConstant(parent.toPascalCase(type === 'transparency' ? 'opacity' : type));
|
|
6071
6063
|
var sliderWrapper = hdrWrapper.appendChild(parent.createElement('div', {
|
|
6072
6064
|
id: id + '_sliderWrapper',
|
|
6073
|
-
className: 'e-ie-finetune-slider-wrap'
|
|
6074
|
-
styles: 'position: absolute'
|
|
6065
|
+
className: 'e-ie-finetune-slider-wrap'
|
|
6075
6066
|
}));
|
|
6076
6067
|
var value = parent.getCurrAdjustmentValue(type);
|
|
6077
6068
|
if (isSelect && type === 'straighten' && Browser.isDevice) {
|
|
@@ -6149,8 +6140,7 @@ var ToolbarModule = /** @class */ (function () {
|
|
|
6149
6140
|
if (type === 'straighten' && Browser.isDevice) {
|
|
6150
6141
|
var sLabelWrapper = hdrWrapper.appendChild(parent.createElement('label', {
|
|
6151
6142
|
id: id + '_sLabelWrapper',
|
|
6152
|
-
className: 'e-ie-straighten-value-span e-ie-finetune-value-span'
|
|
6153
|
-
styles: 'position: absolute; top: 31%; margin-left: 20px; font-size: 15px; text-transform: capitalize; font-weight: 400;'
|
|
6143
|
+
className: 'e-ie-straighten-value-span e-ie-finetune-value-span'
|
|
6154
6144
|
}));
|
|
6155
6145
|
sLabelWrapper.innerHTML = parent.transform.straighten.toString() + '°';
|
|
6156
6146
|
sliderWrapper.parentElement.classList.add('e-straighten-slider');
|
|
@@ -6158,9 +6148,7 @@ var ToolbarModule = /** @class */ (function () {
|
|
|
6158
6148
|
if (type !== 'straighten') {
|
|
6159
6149
|
hdrWrapper.appendChild(parent.createElement('label', {
|
|
6160
6150
|
id: id + '_finetuneSpan',
|
|
6161
|
-
className: 'e-ie-finetune-value-span'
|
|
6162
|
-
styles: Browser.isDevice ? ('position: absolute; top: 25%; margin-left: 20px; font-size: 15px; text-transform: capitalize; font-weight: 400;') :
|
|
6163
|
-
'position: absolute; top: 25%; left: calc(50% + 190px); font-size: 15px; text-transform: capitalize; font-weight: 400;'
|
|
6151
|
+
className: 'e-ie-finetune-value-span'
|
|
6164
6152
|
}));
|
|
6165
6153
|
sliderWrapper.parentElement.classList.add('e-finetune-slider');
|
|
6166
6154
|
if (type === 'transparency' && Browser.isDevice) {
|
|
@@ -6677,26 +6665,22 @@ var ToolbarModule = /** @class */ (function () {
|
|
|
6677
6665
|
}
|
|
6678
6666
|
hdrWrapper = canvasWrapper.appendChild(parent.createElement('div', {
|
|
6679
6667
|
id: id + '_headWrapper',
|
|
6668
|
+
className: 'e-ie-head-wrapper',
|
|
6680
6669
|
styles: 'position: relative'
|
|
6681
6670
|
}));
|
|
6682
6671
|
labelWrapper = hdrWrapper.appendChild(parent.createElement('label', {
|
|
6683
6672
|
id: id + '_labelWrapper',
|
|
6684
|
-
className: 'e-ie-finetune-slider-label'
|
|
6685
|
-
styles: Browser.isDevice ? ('position: absolute; top: 31%; left: calc(50% - 160px); font-size: 15px; text-transform: capitalize; font-weight: 400;')
|
|
6686
|
-
: 'position: absolute; top: 25%; left: calc(50% - 226px); font-size: 15px; text-transform: capitalize; font-weight: 400;'
|
|
6673
|
+
className: 'e-ie-finetune-slider-label'
|
|
6687
6674
|
}));
|
|
6688
6675
|
var text = type === 'blur' ? this.l10n.getConstant('Blur') : this.l10n.getConstant('PixelSize');
|
|
6689
6676
|
labelWrapper.textContent = text;
|
|
6690
6677
|
var sliderWrapper = hdrWrapper.appendChild(parent.createElement('div', {
|
|
6691
6678
|
id: id + '_sliderWrapper',
|
|
6692
|
-
className: 'e-ie-finetune-slider-wrap'
|
|
6693
|
-
styles: 'position: absolute'
|
|
6679
|
+
className: 'e-ie-finetune-slider-wrap'
|
|
6694
6680
|
}));
|
|
6695
6681
|
hdrWrapper.appendChild(parent.createElement('label', {
|
|
6696
6682
|
id: id + '_redactSpan',
|
|
6697
|
-
className: 'e-ie-redact-value-span'
|
|
6698
|
-
styles: Browser.isDevice ? ('position: absolute; top: 30%; margin-left: 20px; font-size: 15px; text-transform: capitalize; font-weight: 400;') :
|
|
6699
|
-
'position: absolute; top: 30%; left: calc(50% + 190px); font-size: 15px; text-transform: capitalize; font-weight: 400;'
|
|
6683
|
+
className: 'e-ie-redact-value-span'
|
|
6700
6684
|
}));
|
|
6701
6685
|
sliderWrapper.parentElement.classList.add('e-finetune-slider');
|
|
6702
6686
|
var value = parent.activeObj.redactType === 'blur' ? parent.activeObj.redactBlur :
|
|
@@ -6736,6 +6720,9 @@ var ToolbarModule = /** @class */ (function () {
|
|
|
6736
6720
|
var ht = parent.element.querySelector('#' + id + '_canvasWrapper').offsetHeight;
|
|
6737
6721
|
contextualToolbarArea.style.top = this.toolbarHeight + 1 + ht - cHt + 'px';
|
|
6738
6722
|
}
|
|
6723
|
+
else {
|
|
6724
|
+
contextualToolbarArea.style.top = parent.element.querySelector('#' + parent.element.id + '_toolbarArea').clientHeight + 'px';
|
|
6725
|
+
}
|
|
6739
6726
|
};
|
|
6740
6727
|
return ToolbarModule;
|
|
6741
6728
|
}());
|