@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
|
@@ -5051,7 +5051,7 @@ var Draw = /** @__PURE__ @class */ (function () {
|
|
|
5051
5051
|
this.errorLoading();
|
|
5052
5052
|
parent.showDialogPopup('unsupported', fileTypeError);
|
|
5053
5053
|
if (dropArea && !parent.isImageLoaded) {
|
|
5054
|
-
dropArea.style.display = '
|
|
5054
|
+
dropArea.style.display = 'flex';
|
|
5055
5055
|
}
|
|
5056
5056
|
}
|
|
5057
5057
|
else {
|
|
@@ -6437,12 +6437,8 @@ var Export = /** @__PURE__ @class */ (function () {
|
|
|
6437
6437
|
type = type ? type : 'Png';
|
|
6438
6438
|
parent.notify('shape', { prop: 'redrawActObj', onPropertyChange: false,
|
|
6439
6439
|
value: { x: null, y: null, isMouseDown: null } });
|
|
6440
|
-
var imageQualityObj = { currentImageQuality: 1 };
|
|
6441
|
-
if (type.toLowerCase() === 'jpeg') {
|
|
6442
|
-
parent.notify('toolbar', { prop: 'getcurrentImageQuality', onPropertyChange: false, value: { obj: imageQualityObj } });
|
|
6443
|
-
}
|
|
6444
6440
|
var beforeSave = { cancel: false, fileName: fileName ? fileName : imageName,
|
|
6445
|
-
fileType: type, imageQuality: imgQuality
|
|
6441
|
+
fileType: type, imageQuality: imgQuality };
|
|
6446
6442
|
parent.trigger('beforeSave', beforeSave);
|
|
6447
6443
|
this.beforeSaveEvent(beforeSave, type, fileName, imageName, imgQuality);
|
|
6448
6444
|
}
|
|
@@ -8956,11 +8952,6 @@ var FreehandDrawing = /** @__PURE__ @class */ (function () {
|
|
|
8956
8952
|
var parent = this.parent;
|
|
8957
8953
|
var point = parent.pointColl[this.fhdSelIdx];
|
|
8958
8954
|
parent.trigger('shapeChanging', shapeChangingArgs);
|
|
8959
|
-
if (shapeChangingArgs.cancel) {
|
|
8960
|
-
parent.editCompleteArgs = shapeChangingArgs;
|
|
8961
|
-
this.cancelFhd();
|
|
8962
|
-
return;
|
|
8963
|
-
}
|
|
8964
8955
|
if (parent.element.getAttribute('data-value') === 'mask-drawing' && !this.isMasking) {
|
|
8965
8956
|
this.isMasking = true;
|
|
8966
8957
|
parent.upperCanvas.style.cursor = 'crosshair';
|
|
@@ -12231,6 +12222,10 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
12231
12222
|
};
|
|
12232
12223
|
Selection.prototype.mouseDownEventHandler = function (e) {
|
|
12233
12224
|
var parent = this.parent;
|
|
12225
|
+
if (parent.isSafari && e.buttons === 0 && (this.parent.isShapeDrawing || this.parent.togglePen) && this.parent.drawingShape !== 'path') {
|
|
12226
|
+
e.stopImmediatePropagation();
|
|
12227
|
+
return;
|
|
12228
|
+
}
|
|
12234
12229
|
parent.isKBDNavigation = false;
|
|
12235
12230
|
this.mouseDown = e.currentTarget === parent.lowerCanvas || e.currentTarget === parent.upperCanvas ?
|
|
12236
12231
|
'canvas' : '';
|
|
@@ -12508,9 +12503,6 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
12508
12503
|
var objColl = extend([], parent.objColl, [], true);
|
|
12509
12504
|
if (!isNullOrUndefined(obj['index']) && obj['index'] > -1) {
|
|
12510
12505
|
parent.notify('freehand-draw', { prop: 'selectFhd', value: { type: 'ok' } });
|
|
12511
|
-
if (!this.isFhdPoint) {
|
|
12512
|
-
return;
|
|
12513
|
-
}
|
|
12514
12506
|
parent.notify('freehand-draw', { prop: 'hoverFhd', onPropertyChange: false,
|
|
12515
12507
|
value: { strokeColor: null, strokeWidth: null } });
|
|
12516
12508
|
parent.notify('toolbar', { prop: 'renderQAT', onPropertyChange: false, value: { isPenEdit: true } });
|
|
@@ -13055,9 +13047,7 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
13055
13047
|
this.currentDrawingShape = parent.drawingShape.toLowerCase();
|
|
13056
13048
|
if (dummyClick) {
|
|
13057
13049
|
parent.enableShapeDrawing(parent.toPascalCase(parent.drawingShape), true);
|
|
13058
|
-
|
|
13059
|
-
parent.upperCanvas.style.cursor = 'crosshair';
|
|
13060
|
-
}
|
|
13050
|
+
parent.upperCanvas.style.cursor = 'crosshair';
|
|
13061
13051
|
}
|
|
13062
13052
|
}
|
|
13063
13053
|
parent.isShapeDrawing = false;
|
|
@@ -14079,14 +14069,7 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
14079
14069
|
}
|
|
14080
14070
|
if (!this.isCropSelection && parent.activeObj.shape !== 'redact') {
|
|
14081
14071
|
parent.trigger('shapeChanging', shapeChangingArgs);
|
|
14082
|
-
|
|
14083
|
-
parent.objColl.splice(i, 0, temp);
|
|
14084
|
-
parent.notify('shape', { prop: 'refreshActiveObj', onPropertyChange: false });
|
|
14085
|
-
parent.notify('draw', { prop: 'render-image', value: { isMouseWheel: null } });
|
|
14086
|
-
}
|
|
14087
|
-
else {
|
|
14088
|
-
this.shapeEvent(shapeChangingArgs);
|
|
14089
|
-
}
|
|
14072
|
+
this.shapeEvent(shapeChangingArgs);
|
|
14090
14073
|
parent.editCompleteArgs = shapeChangingArgs;
|
|
14091
14074
|
}
|
|
14092
14075
|
else {
|
|
@@ -14756,7 +14739,6 @@ var Shape = /** @__PURE__ @class */ (function () {
|
|
|
14756
14739
|
this.keyHistory = ''; // text history
|
|
14757
14740
|
this.preventFrameAnnotation = false;
|
|
14758
14741
|
this.redactType = 'blur';
|
|
14759
|
-
this.isPublicUpdateShape = false;
|
|
14760
14742
|
this.parent = parent;
|
|
14761
14743
|
this.addEventListener();
|
|
14762
14744
|
}
|
|
@@ -15030,9 +15012,6 @@ var Shape = /** @__PURE__ @class */ (function () {
|
|
|
15030
15012
|
case 'setRedactType':
|
|
15031
15013
|
this.redactType = args.value['redactType'];
|
|
15032
15014
|
break;
|
|
15033
|
-
case 'setPublicUpdateShape':
|
|
15034
|
-
this.isPublicUpdateShape = args.value['isPublicUpdateShape'];
|
|
15035
|
-
break;
|
|
15036
15015
|
}
|
|
15037
15016
|
};
|
|
15038
15017
|
Shape.prototype.getModuleName = function () {
|
|
@@ -15059,7 +15038,7 @@ var Shape = /** @__PURE__ @class */ (function () {
|
|
|
15059
15038
|
this.textSettings =
|
|
15060
15039
|
{ text: 'Enter Text', fontFamily: this.parent.fontFamily.default, fontSize: null, fontRatio: null, bold: false, italic: false, underline: false, strikethrough: false };
|
|
15061
15040
|
this.strokeSettings = { strokeColor: '#fff', fillColor: '', strokeWidth: null, radius: null, outlineColor: '', outlineWidth: null };
|
|
15062
|
-
this.preventFrameAnnotation =
|
|
15041
|
+
this.preventFrameAnnotation = false;
|
|
15063
15042
|
};
|
|
15064
15043
|
Shape.prototype.drawEllipse = function (x, y, radiusX, radiusY, strokeWidth, strokeColor, fillColor, degree, isSelected) {
|
|
15065
15044
|
this.initializeShape('ellipse');
|
|
@@ -15772,7 +15751,7 @@ var Shape = /** @__PURE__ @class */ (function () {
|
|
|
15772
15751
|
}
|
|
15773
15752
|
parent.notify('selection', { prop: 'setTextSelection', onPropertyChange: false,
|
|
15774
15753
|
value: { width: width, height: height } });
|
|
15775
|
-
if (parent.activeObj.rotatedAngle !== 0
|
|
15754
|
+
if (parent.activeObj.rotatedAngle !== 0) {
|
|
15776
15755
|
var width_1 = parent.activeObj.activePoint.width - tempActiveObj.activePoint.width;
|
|
15777
15756
|
var height_1 = parent.activeObj.activePoint.height - tempActiveObj.activePoint.height;
|
|
15778
15757
|
var value = '';
|
|
@@ -15791,20 +15770,6 @@ var Shape = /** @__PURE__ @class */ (function () {
|
|
|
15791
15770
|
parent.notify('shape', { prop: 'updateFontSize', onPropertyChange: false,
|
|
15792
15771
|
value: { obj: parent.activeObj } });
|
|
15793
15772
|
}
|
|
15794
|
-
else if (this.isPublicUpdateShape) {
|
|
15795
|
-
var width_2 = parent.activeObj.activePoint.width - tempActiveObj.activePoint.width;
|
|
15796
|
-
var height_2 = parent.activeObj.activePoint.height - tempActiveObj.activePoint.height;
|
|
15797
|
-
var value = '';
|
|
15798
|
-
if (parent.transform.degree === 0 || parent.transform.degree === 180) {
|
|
15799
|
-
value = 'width';
|
|
15800
|
-
}
|
|
15801
|
-
else if (parent.transform.degree === 90 || parent.transform.degree === 270) {
|
|
15802
|
-
value = 'height';
|
|
15803
|
-
}
|
|
15804
|
-
parent.activeObj.activePoint = extend({}, tempActiveObj.activePoint, {}, true);
|
|
15805
|
-
parent.notify('selection', { prop: 'adjustRotationPoints', onPropertyChange: false, value: { rectangle: parent.activeObj.activePoint,
|
|
15806
|
-
x: width_2, y: height_2, angle: parent.activeObj.rotatedAngle, type: 'text', elem: value } });
|
|
15807
|
-
}
|
|
15808
15773
|
parent.notify('draw', { prop: 'updateActiveObject', onPropertyChange: false, value: { actPoint: parent.activeObj.activePoint, obj: parent.activeObj,
|
|
15809
15774
|
isMouseMove: null, x: null, y: null } });
|
|
15810
15775
|
this.updImgRatioForActObj();
|
|
@@ -23399,12 +23364,10 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23399
23364
|
var dropAreaElement = this.createElement('div', { id: this.element.id + '_dropArea', className: 'e-ie-drop-area' });
|
|
23400
23365
|
dropAreaElement.style.position = 'relative';
|
|
23401
23366
|
var dropIconElement = this.createElement('span', { className: 'e-ie-drop-icon e-icons e-image' });
|
|
23402
|
-
dropIconElement.style.position = 'absolute';
|
|
23403
23367
|
var dropContentElement = this.createElement('span', { className: 'e-ie-drop-content' });
|
|
23404
|
-
dropContentElement.style.cssText = '
|
|
23368
|
+
dropContentElement.style.cssText = 'display: none;';
|
|
23405
23369
|
dropContentElement.textContent = dragObj['value'] + ' ';
|
|
23406
23370
|
var minDropContentElem = this.createElement('span', { className: 'e-ie-min-drop-content' });
|
|
23407
|
-
minDropContentElem.style.position = 'absolute';
|
|
23408
23371
|
minDropContentElem.textContent = dropObj['value'] + ' ';
|
|
23409
23372
|
var dropAnchorElement = this.createElement('a', { id: this.element.id + '_dropBrowse', className: 'e-ie-drop-browse' });
|
|
23410
23373
|
dropAnchorElement.textContent = browseObj['value'];
|
|
@@ -23414,7 +23377,7 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23414
23377
|
minDropContentElem.appendChild(minDropAnchorElem);
|
|
23415
23378
|
dropAnchorElement.href = '';
|
|
23416
23379
|
minDropAnchorElem.href = '';
|
|
23417
|
-
var dropInfoElement = this.createElement('span', { className: 'e-ie-drop-info'
|
|
23380
|
+
var dropInfoElement = this.createElement('span', { className: 'e-ie-drop-info' });
|
|
23418
23381
|
this.updateDropInfoContent(dropInfoElement);
|
|
23419
23382
|
var dropUploader = dropAreaElement.appendChild(this.createElement('input', {
|
|
23420
23383
|
id: this.element.id + '_dropfileUpload', className: 'e-fileUpload e-image-upload'
|
|
@@ -24279,9 +24242,6 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
24279
24242
|
*
|
|
24280
24243
|
*/
|
|
24281
24244
|
ImageEditor.prototype.updateShape = function (setting, isSelected) {
|
|
24282
|
-
if (setting.type.toLowerCase() === 'text') {
|
|
24283
|
-
this.notify('shape', { prop: 'setPublicUpdateShape', onPropertyChange: false, value: { isPublicUpdateShape: true } });
|
|
24284
|
-
}
|
|
24285
24245
|
var obj = { isSelected: false };
|
|
24286
24246
|
var isTextArea = false;
|
|
24287
24247
|
var freehandObj = { bool: false };
|
|
@@ -24353,9 +24313,6 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
24353
24313
|
}
|
|
24354
24314
|
}
|
|
24355
24315
|
}
|
|
24356
|
-
if (setting.type.toLowerCase() === 'text') {
|
|
24357
|
-
this.notify('shape', { prop: 'setPublicUpdateShape', onPropertyChange: false, value: { isPublicUpdateShape: false } });
|
|
24358
|
-
}
|
|
24359
24316
|
return obj['isSelected'];
|
|
24360
24317
|
};
|
|
24361
24318
|
/**
|
|
@@ -24986,7 +24943,7 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
24986
24943
|
this.notify('toolbar', { prop: 'create-contextual-toolbar', onPropertyChange: false });
|
|
24987
24944
|
var dropArea = document.getElementById(this.element.id + '_dropArea');
|
|
24988
24945
|
if (dropArea) {
|
|
24989
|
-
dropArea.style.display = '
|
|
24946
|
+
dropArea.style.display = 'flex';
|
|
24990
24947
|
}
|
|
24991
24948
|
};
|
|
24992
24949
|
// AI related codes
|
|
@@ -28054,9 +28011,6 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
28054
28011
|
case 'getToolbarHeight':
|
|
28055
28012
|
args.value['obj']['toolbarHeight'] = this.toolbarHeight;
|
|
28056
28013
|
break;
|
|
28057
|
-
case 'getcurrentImageQuality':
|
|
28058
|
-
args.value['obj']['currentImageQuality'] = this.currentQuality;
|
|
28059
|
-
break;
|
|
28060
28014
|
case 'setToolbarHeight':
|
|
28061
28015
|
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.length > 0 && parent.toolbar.indexOf('Open') > -1)) {
|
|
28062
28016
|
this.toolbarHeight = args.value['height'];
|
|
@@ -28975,17 +28929,17 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
28975
28929
|
}
|
|
28976
28930
|
var frame = document.querySelector('#' + id + '_frame');
|
|
28977
28931
|
if (frame && ((parent.currSelectionPoint && parent.currSelectionPoint.shape === 'crop-circle') || parent.isCircleCrop)) {
|
|
28978
|
-
frame.classList.add('e-overlay');
|
|
28932
|
+
frame.parentElement.classList.add('e-overlay');
|
|
28979
28933
|
}
|
|
28980
28934
|
else if (frame) {
|
|
28981
|
-
frame.classList.remove('e-overlay');
|
|
28935
|
+
frame.parentElement.classList.remove('e-overlay');
|
|
28982
28936
|
}
|
|
28983
28937
|
var ratio = document.querySelector('#' + id + '_aspectratio');
|
|
28984
28938
|
if (ratio && ((parent.currSelectionPoint && parent.currSelectionPoint.shape === 'crop-circle') || parent.isCircleCrop)) {
|
|
28985
|
-
ratio.classList.add('e-overlay');
|
|
28939
|
+
ratio.parentElement.classList.add('e-overlay');
|
|
28986
28940
|
}
|
|
28987
28941
|
else if (ratio) {
|
|
28988
|
-
ratio.classList.remove('e-overlay');
|
|
28942
|
+
ratio.parentElement.classList.remove('e-overlay');
|
|
28989
28943
|
}
|
|
28990
28944
|
};
|
|
28991
28945
|
ToolbarModule.prototype.createLeftToolbarControls = function () {
|
|
@@ -29219,34 +29173,34 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
29219
29173
|
&& parent.activeObj.pointColl.length === 0)) &&
|
|
29220
29174
|
isNullOrUndefined(obj['freehandDrawSelectedId'])) {
|
|
29221
29175
|
if (duplicateElement) {
|
|
29222
|
-
duplicateElement.classList.add('e-overlay');
|
|
29176
|
+
duplicateElement.parentElement.classList.add('e-overlay');
|
|
29223
29177
|
}
|
|
29224
29178
|
if (removeElement) {
|
|
29225
|
-
removeElement.classList.add('e-overlay');
|
|
29179
|
+
removeElement.parentElement.classList.add('e-overlay');
|
|
29226
29180
|
}
|
|
29227
29181
|
if (editTextElement) {
|
|
29228
|
-
editTextElement.classList.add('e-overlay');
|
|
29182
|
+
editTextElement.parentElement.classList.add('e-overlay');
|
|
29229
29183
|
}
|
|
29230
29184
|
if (zOrderElement) {
|
|
29231
|
-
zOrderElement.classList.add('e-overlay');
|
|
29185
|
+
zOrderElement.parentElement.classList.add('e-overlay');
|
|
29232
29186
|
}
|
|
29233
29187
|
}
|
|
29234
29188
|
else {
|
|
29235
29189
|
if (duplicateElement) {
|
|
29236
|
-
duplicateElement.classList.remove('e-overlay');
|
|
29190
|
+
duplicateElement.parentElement.classList.remove('e-overlay');
|
|
29237
29191
|
}
|
|
29238
29192
|
if (removeElement) {
|
|
29239
|
-
removeElement.classList.remove('e-overlay');
|
|
29193
|
+
removeElement.parentElement.classList.remove('e-overlay');
|
|
29240
29194
|
}
|
|
29241
29195
|
if (editTextElement) {
|
|
29242
|
-
editTextElement.classList.remove('e-overlay');
|
|
29196
|
+
editTextElement.parentElement.classList.remove('e-overlay');
|
|
29243
29197
|
}
|
|
29244
29198
|
if (zOrderElement) {
|
|
29245
|
-
zOrderElement.classList.remove('e-overlay');
|
|
29199
|
+
zOrderElement.parentElement.classList.remove('e-overlay');
|
|
29246
29200
|
}
|
|
29247
29201
|
}
|
|
29248
29202
|
if (zOrderElement && (parent.shapeColl.length === 0 || (obj['freehandDrawSelectedId'] && parent.shapeColl.length === 1))) {
|
|
29249
|
-
zOrderElement.classList.add('e-overlay');
|
|
29203
|
+
zOrderElement.parentElement.classList.add('e-overlay');
|
|
29250
29204
|
}
|
|
29251
29205
|
};
|
|
29252
29206
|
ToolbarModule.prototype.renderStraightenSlider = function () {
|
|
@@ -31133,7 +31087,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
31133
31087
|
var drawingObject = { shape: '' };
|
|
31134
31088
|
parent.notify('selection', { prop: 'getCurrentDrawingShape', onPropertyChange: false, value: { obj: drawingObject } });
|
|
31135
31089
|
if (drawingObject['shape'] === 'path' && okBtn) {
|
|
31136
|
-
okBtn.classList.add('e-overlay');
|
|
31090
|
+
okBtn.parentElement.classList.add('e-overlay');
|
|
31137
31091
|
}
|
|
31138
31092
|
}
|
|
31139
31093
|
if (parent.activeObj.shape === 'line' || parent.activeObj.shape === 'path') {
|
|
@@ -32625,11 +32579,11 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
32625
32579
|
var orderObj = { order: null };
|
|
32626
32580
|
parent.notify('shape', { prop: 'getHighestOrder', onPropertyChange: false, value: { obj: orderObj } });
|
|
32627
32581
|
if (parent.activeObj.order > orderObj['order'] && document.getElementById(parent.element.id + '_bringToFront')) {
|
|
32628
|
-
document.getElementById(parent.element.id + '_bringToFront').classList.add('e-overlay');
|
|
32582
|
+
document.getElementById(parent.element.id + '_bringToFront').parentElement.classList.add('e-overlay');
|
|
32629
32583
|
}
|
|
32630
32584
|
else {
|
|
32631
32585
|
if (document.getElementById(parent.element.id + '_bringToFront')) {
|
|
32632
|
-
document.getElementById(parent.element.id + '_bringToFront').classList.remove('e-overlay');
|
|
32586
|
+
document.getElementById(parent.element.id + '_bringToFront').parentElement.classList.remove('e-overlay');
|
|
32633
32587
|
}
|
|
32634
32588
|
}
|
|
32635
32589
|
qtArea.style.width = 'auto';
|
|
@@ -32683,11 +32637,11 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
32683
32637
|
parent.notify('shape', { prop: 'getHighestOrder', onPropertyChange: false, value: { obj: orderObj } });
|
|
32684
32638
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
32685
32639
|
if (parent.getObjFromId(parent.pointColl[indexObj['freehandSelectedIndex']].id).order >= orderObj['order'] && document.getElementById(parent.element.id + '_bringToFront')) {
|
|
32686
|
-
document.getElementById(parent.element.id + '_bringToFront').classList.add('e-overlay');
|
|
32640
|
+
document.getElementById(parent.element.id + '_bringToFront').parentElement.classList.add('e-overlay');
|
|
32687
32641
|
}
|
|
32688
32642
|
else {
|
|
32689
32643
|
if (document.getElementById(parent.element.id + '_bringToFront')) {
|
|
32690
|
-
document.getElementById(parent.element.id + '_bringToFront').classList.remove('e-overlay');
|
|
32644
|
+
document.getElementById(parent.element.id + '_bringToFront').parentElement.classList.remove('e-overlay');
|
|
32691
32645
|
}
|
|
32692
32646
|
}
|
|
32693
32647
|
var obj = { activePoint: null };
|
|
@@ -32853,32 +32807,30 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
32853
32807
|
parent.notify('undo-redo', { prop: 'updateUndoRedoStack', onPropertyChange: false });
|
|
32854
32808
|
break;
|
|
32855
32809
|
case 'bringtofront':
|
|
32856
|
-
|
|
32857
|
-
|
|
32858
|
-
|
|
32859
|
-
|
|
32860
|
-
|
|
32861
|
-
|
|
32862
|
-
|
|
32863
|
-
|
|
32864
|
-
|
|
32865
|
-
|
|
32866
|
-
|
|
32867
|
-
isDisabled = order >= orderObj['order'] ? true : false;
|
|
32868
|
-
}
|
|
32869
|
-
else {
|
|
32870
|
-
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
32871
|
-
var order = parent.getObjFromId(shapeId).order;
|
|
32872
|
-
isDisabled = order > orderObj['order'] ? true : false;
|
|
32873
|
-
}
|
|
32874
|
-
if (isDisabled) {
|
|
32875
|
-
document.getElementById(parent.element.id + '_bringToFront').classList.add('e-overlay');
|
|
32876
|
-
}
|
|
32877
|
-
else {
|
|
32878
|
-
document.getElementById(parent.element.id + '_bringToFront').classList.remove('e-overlay');
|
|
32879
|
-
}
|
|
32880
|
-
parent.notify('undo-redo', { prop: 'updateUndoRedoStack', onPropertyChange: false });
|
|
32810
|
+
parent.notify('freehand-draw', { prop: 'getFreehandSelectedIndex', onPropertyChange: false, value: { obj: indexObj } });
|
|
32811
|
+
shapeId = indexObj['freehandSelectedIndex'] !== null ? parent.pointColl[indexObj['freehandSelectedIndex']].id :
|
|
32812
|
+
parent.activeObj.currIndex;
|
|
32813
|
+
parent.updateShapeOrder(shapeId, type);
|
|
32814
|
+
isDisabled = false;
|
|
32815
|
+
parent.notify('shape', { prop: 'getHighestOrder', onPropertyChange: false, value: { obj: orderObj } });
|
|
32816
|
+
if (shapeId.indexOf('pen') > -1) {
|
|
32817
|
+
parent.notify('shape', { prop: 'updateShapeColl', onPropertyChange: false });
|
|
32818
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
32819
|
+
var order = parent.getObjFromId(shapeId).order;
|
|
32820
|
+
isDisabled = order >= orderObj['order'] ? true : false;
|
|
32881
32821
|
}
|
|
32822
|
+
else {
|
|
32823
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
32824
|
+
var order = parent.getObjFromId(shapeId).order;
|
|
32825
|
+
isDisabled = order > orderObj['order'] ? true : false;
|
|
32826
|
+
}
|
|
32827
|
+
if (isDisabled) {
|
|
32828
|
+
document.getElementById(parent.element.id + '_bringToFront').parentElement.classList.add('e-overlay');
|
|
32829
|
+
}
|
|
32830
|
+
else {
|
|
32831
|
+
document.getElementById(parent.element.id + '_bringToFront').parentElement.classList.remove('e-overlay');
|
|
32832
|
+
}
|
|
32833
|
+
parent.notify('undo-redo', { prop: 'updateUndoRedoStack', onPropertyChange: false });
|
|
32882
32834
|
break;
|
|
32883
32835
|
}
|
|
32884
32836
|
if (type === 'duplicate' || type === 'remove') {
|
|
@@ -33823,29 +33775,25 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
33823
33775
|
}
|
|
33824
33776
|
hdrWrapper = canvasWrapper.appendChild(parent.createElement('div', {
|
|
33825
33777
|
id: id + '_headWrapper',
|
|
33778
|
+
className: 'e-ie-head-wrapper',
|
|
33826
33779
|
styles: 'position: relative'
|
|
33827
33780
|
}));
|
|
33828
33781
|
if (type === 'transparency') {
|
|
33829
33782
|
labelWrapper = hdrWrapper.appendChild(parent.createElement('label', {
|
|
33830
33783
|
id: id + '_labelWrapper',
|
|
33831
|
-
className: 'e-ie-finetune-slider-label'
|
|
33832
|
-
styles: Browser.isDevice ? 'position: absolute; top: 31%; left: calc(50% - 150px); font-size: 15px; text-transform: capitalize; font-weight: 400;'
|
|
33833
|
-
: 'position: absolute; top: 31%; left: calc(50% - 220px); font-size: 15px; text-transform: capitalize; font-weight: 400;'
|
|
33784
|
+
className: 'e-ie-finetune-slider-label'
|
|
33834
33785
|
}));
|
|
33835
33786
|
}
|
|
33836
33787
|
else {
|
|
33837
33788
|
labelWrapper = hdrWrapper.appendChild(parent.createElement('label', {
|
|
33838
33789
|
id: id + '_labelWrapper',
|
|
33839
|
-
className: 'e-ie-finetune-slider-label'
|
|
33840
|
-
styles: Browser.isDevice ? ('position: absolute; top: 31%; left: calc(50% - 160px); font-size: 15px; text-transform: capitalize; font-weight: 400;')
|
|
33841
|
-
: 'position: absolute; top: 25%; left: calc(50% - 226px); font-size: 15px; text-transform: capitalize; font-weight: 400;'
|
|
33790
|
+
className: 'e-ie-finetune-slider-label'
|
|
33842
33791
|
}));
|
|
33843
33792
|
}
|
|
33844
33793
|
labelWrapper.textContent = this.l10n.getConstant(parent.toPascalCase(type === 'transparency' ? 'opacity' : type));
|
|
33845
33794
|
var sliderWrapper = hdrWrapper.appendChild(parent.createElement('div', {
|
|
33846
33795
|
id: id + '_sliderWrapper',
|
|
33847
|
-
className: 'e-ie-finetune-slider-wrap'
|
|
33848
|
-
styles: 'position: absolute'
|
|
33796
|
+
className: 'e-ie-finetune-slider-wrap'
|
|
33849
33797
|
}));
|
|
33850
33798
|
var value = parent.getCurrAdjustmentValue(type);
|
|
33851
33799
|
if (isSelect && type === 'straighten' && Browser.isDevice) {
|
|
@@ -33923,8 +33871,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
33923
33871
|
if (type === 'straighten' && Browser.isDevice) {
|
|
33924
33872
|
var sLabelWrapper = hdrWrapper.appendChild(parent.createElement('label', {
|
|
33925
33873
|
id: id + '_sLabelWrapper',
|
|
33926
|
-
className: 'e-ie-straighten-value-span e-ie-finetune-value-span'
|
|
33927
|
-
styles: 'position: absolute; top: 31%; margin-left: 20px; font-size: 15px; text-transform: capitalize; font-weight: 400;'
|
|
33874
|
+
className: 'e-ie-straighten-value-span e-ie-finetune-value-span'
|
|
33928
33875
|
}));
|
|
33929
33876
|
sLabelWrapper.innerHTML = parent.transform.straighten.toString() + '°';
|
|
33930
33877
|
sliderWrapper.parentElement.classList.add('e-straighten-slider');
|
|
@@ -33932,9 +33879,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
33932
33879
|
if (type !== 'straighten') {
|
|
33933
33880
|
hdrWrapper.appendChild(parent.createElement('label', {
|
|
33934
33881
|
id: id + '_finetuneSpan',
|
|
33935
|
-
className: 'e-ie-finetune-value-span'
|
|
33936
|
-
styles: Browser.isDevice ? ('position: absolute; top: 25%; margin-left: 20px; font-size: 15px; text-transform: capitalize; font-weight: 400;') :
|
|
33937
|
-
'position: absolute; top: 25%; left: calc(50% + 190px); font-size: 15px; text-transform: capitalize; font-weight: 400;'
|
|
33882
|
+
className: 'e-ie-finetune-value-span'
|
|
33938
33883
|
}));
|
|
33939
33884
|
sliderWrapper.parentElement.classList.add('e-finetune-slider');
|
|
33940
33885
|
if (type === 'transparency' && Browser.isDevice) {
|
|
@@ -34451,26 +34396,22 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
34451
34396
|
}
|
|
34452
34397
|
hdrWrapper = canvasWrapper.appendChild(parent.createElement('div', {
|
|
34453
34398
|
id: id + '_headWrapper',
|
|
34399
|
+
className: 'e-ie-head-wrapper',
|
|
34454
34400
|
styles: 'position: relative'
|
|
34455
34401
|
}));
|
|
34456
34402
|
labelWrapper = hdrWrapper.appendChild(parent.createElement('label', {
|
|
34457
34403
|
id: id + '_labelWrapper',
|
|
34458
|
-
className: 'e-ie-finetune-slider-label'
|
|
34459
|
-
styles: Browser.isDevice ? ('position: absolute; top: 31%; left: calc(50% - 160px); font-size: 15px; text-transform: capitalize; font-weight: 400;')
|
|
34460
|
-
: 'position: absolute; top: 25%; left: calc(50% - 226px); font-size: 15px; text-transform: capitalize; font-weight: 400;'
|
|
34404
|
+
className: 'e-ie-finetune-slider-label'
|
|
34461
34405
|
}));
|
|
34462
34406
|
var text = type === 'blur' ? this.l10n.getConstant('Blur') : this.l10n.getConstant('PixelSize');
|
|
34463
34407
|
labelWrapper.textContent = text;
|
|
34464
34408
|
var sliderWrapper = hdrWrapper.appendChild(parent.createElement('div', {
|
|
34465
34409
|
id: id + '_sliderWrapper',
|
|
34466
|
-
className: 'e-ie-finetune-slider-wrap'
|
|
34467
|
-
styles: 'position: absolute'
|
|
34410
|
+
className: 'e-ie-finetune-slider-wrap'
|
|
34468
34411
|
}));
|
|
34469
34412
|
hdrWrapper.appendChild(parent.createElement('label', {
|
|
34470
34413
|
id: id + '_redactSpan',
|
|
34471
|
-
className: 'e-ie-redact-value-span'
|
|
34472
|
-
styles: Browser.isDevice ? ('position: absolute; top: 30%; margin-left: 20px; font-size: 15px; text-transform: capitalize; font-weight: 400;') :
|
|
34473
|
-
'position: absolute; top: 30%; left: calc(50% + 190px); font-size: 15px; text-transform: capitalize; font-weight: 400;'
|
|
34414
|
+
className: 'e-ie-redact-value-span'
|
|
34474
34415
|
}));
|
|
34475
34416
|
sliderWrapper.parentElement.classList.add('e-finetune-slider');
|
|
34476
34417
|
var value = parent.activeObj.redactType === 'blur' ? parent.activeObj.redactBlur :
|
|
@@ -34510,6 +34451,9 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
34510
34451
|
var ht = parent.element.querySelector('#' + id + '_canvasWrapper').offsetHeight;
|
|
34511
34452
|
contextualToolbarArea.style.top = this.toolbarHeight + 1 + ht - cHt + 'px';
|
|
34512
34453
|
}
|
|
34454
|
+
else {
|
|
34455
|
+
contextualToolbarArea.style.top = parent.element.querySelector('#' + parent.element.id + '_toolbarArea').clientHeight + 'px';
|
|
34456
|
+
}
|
|
34513
34457
|
};
|
|
34514
34458
|
return ToolbarModule;
|
|
34515
34459
|
}());
|