@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
|
@@ -5000,7 +5000,7 @@ class Draw {
|
|
|
5000
5000
|
this.errorLoading();
|
|
5001
5001
|
parent.showDialogPopup('unsupported', fileTypeError);
|
|
5002
5002
|
if (dropArea && !parent.isImageLoaded) {
|
|
5003
|
-
dropArea.style.display = '
|
|
5003
|
+
dropArea.style.display = 'flex';
|
|
5004
5004
|
}
|
|
5005
5005
|
}
|
|
5006
5006
|
else {
|
|
@@ -6379,12 +6379,8 @@ class Export {
|
|
|
6379
6379
|
type = type ? type : 'Png';
|
|
6380
6380
|
parent.notify('shape', { prop: 'redrawActObj', onPropertyChange: false,
|
|
6381
6381
|
value: { x: null, y: null, isMouseDown: null } });
|
|
6382
|
-
const imageQualityObj = { currentImageQuality: 1 };
|
|
6383
|
-
if (type.toLowerCase() === 'jpeg') {
|
|
6384
|
-
parent.notify('toolbar', { prop: 'getcurrentImageQuality', onPropertyChange: false, value: { obj: imageQualityObj } });
|
|
6385
|
-
}
|
|
6386
6382
|
const beforeSave = { cancel: false, fileName: fileName ? fileName : imageName,
|
|
6387
|
-
fileType: type, imageQuality: imgQuality
|
|
6383
|
+
fileType: type, imageQuality: imgQuality };
|
|
6388
6384
|
parent.trigger('beforeSave', beforeSave);
|
|
6389
6385
|
this.beforeSaveEvent(beforeSave, type, fileName, imageName, imgQuality);
|
|
6390
6386
|
}
|
|
@@ -8886,11 +8882,6 @@ class FreehandDrawing {
|
|
|
8886
8882
|
const parent = this.parent;
|
|
8887
8883
|
const point = parent.pointColl[this.fhdSelIdx];
|
|
8888
8884
|
parent.trigger('shapeChanging', shapeChangingArgs);
|
|
8889
|
-
if (shapeChangingArgs.cancel) {
|
|
8890
|
-
parent.editCompleteArgs = shapeChangingArgs;
|
|
8891
|
-
this.cancelFhd();
|
|
8892
|
-
return;
|
|
8893
|
-
}
|
|
8894
8885
|
if (parent.element.getAttribute('data-value') === 'mask-drawing' && !this.isMasking) {
|
|
8895
8886
|
this.isMasking = true;
|
|
8896
8887
|
parent.upperCanvas.style.cursor = 'crosshair';
|
|
@@ -12158,6 +12149,10 @@ class Selection {
|
|
|
12158
12149
|
}
|
|
12159
12150
|
mouseDownEventHandler(e) {
|
|
12160
12151
|
const parent = this.parent;
|
|
12152
|
+
if (parent.isSafari && e.buttons === 0 && (this.parent.isShapeDrawing || this.parent.togglePen) && this.parent.drawingShape !== 'path') {
|
|
12153
|
+
e.stopImmediatePropagation();
|
|
12154
|
+
return;
|
|
12155
|
+
}
|
|
12161
12156
|
parent.isKBDNavigation = false;
|
|
12162
12157
|
this.mouseDown = e.currentTarget === parent.lowerCanvas || e.currentTarget === parent.upperCanvas ?
|
|
12163
12158
|
'canvas' : '';
|
|
@@ -12435,9 +12430,6 @@ class Selection {
|
|
|
12435
12430
|
const objColl = extend([], parent.objColl, [], true);
|
|
12436
12431
|
if (!isNullOrUndefined(obj['index']) && obj['index'] > -1) {
|
|
12437
12432
|
parent.notify('freehand-draw', { prop: 'selectFhd', value: { type: 'ok' } });
|
|
12438
|
-
if (!this.isFhdPoint) {
|
|
12439
|
-
return;
|
|
12440
|
-
}
|
|
12441
12433
|
parent.notify('freehand-draw', { prop: 'hoverFhd', onPropertyChange: false,
|
|
12442
12434
|
value: { strokeColor: null, strokeWidth: null } });
|
|
12443
12435
|
parent.notify('toolbar', { prop: 'renderQAT', onPropertyChange: false, value: { isPenEdit: true } });
|
|
@@ -12982,9 +12974,7 @@ class Selection {
|
|
|
12982
12974
|
this.currentDrawingShape = parent.drawingShape.toLowerCase();
|
|
12983
12975
|
if (dummyClick) {
|
|
12984
12976
|
parent.enableShapeDrawing(parent.toPascalCase(parent.drawingShape), true);
|
|
12985
|
-
|
|
12986
|
-
parent.upperCanvas.style.cursor = 'crosshair';
|
|
12987
|
-
}
|
|
12977
|
+
parent.upperCanvas.style.cursor = 'crosshair';
|
|
12988
12978
|
}
|
|
12989
12979
|
}
|
|
12990
12980
|
parent.isShapeDrawing = false;
|
|
@@ -14006,14 +13996,7 @@ class Selection {
|
|
|
14006
13996
|
}
|
|
14007
13997
|
if (!this.isCropSelection && parent.activeObj.shape !== 'redact') {
|
|
14008
13998
|
parent.trigger('shapeChanging', shapeChangingArgs);
|
|
14009
|
-
|
|
14010
|
-
parent.objColl.splice(i, 0, temp);
|
|
14011
|
-
parent.notify('shape', { prop: 'refreshActiveObj', onPropertyChange: false });
|
|
14012
|
-
parent.notify('draw', { prop: 'render-image', value: { isMouseWheel: null } });
|
|
14013
|
-
}
|
|
14014
|
-
else {
|
|
14015
|
-
this.shapeEvent(shapeChangingArgs);
|
|
14016
|
-
}
|
|
13999
|
+
this.shapeEvent(shapeChangingArgs);
|
|
14017
14000
|
parent.editCompleteArgs = shapeChangingArgs;
|
|
14018
14001
|
}
|
|
14019
14002
|
else {
|
|
@@ -14682,7 +14665,6 @@ class Shape {
|
|
|
14682
14665
|
this.keyHistory = ''; // text history
|
|
14683
14666
|
this.preventFrameAnnotation = false;
|
|
14684
14667
|
this.redactType = 'blur';
|
|
14685
|
-
this.isPublicUpdateShape = false;
|
|
14686
14668
|
this.parent = parent;
|
|
14687
14669
|
this.addEventListener();
|
|
14688
14670
|
}
|
|
@@ -14956,9 +14938,6 @@ class Shape {
|
|
|
14956
14938
|
case 'setRedactType':
|
|
14957
14939
|
this.redactType = args.value['redactType'];
|
|
14958
14940
|
break;
|
|
14959
|
-
case 'setPublicUpdateShape':
|
|
14960
|
-
this.isPublicUpdateShape = args.value['isPublicUpdateShape'];
|
|
14961
|
-
break;
|
|
14962
14941
|
}
|
|
14963
14942
|
}
|
|
14964
14943
|
getModuleName() {
|
|
@@ -14985,7 +14964,7 @@ class Shape {
|
|
|
14985
14964
|
this.textSettings =
|
|
14986
14965
|
{ text: 'Enter Text', fontFamily: this.parent.fontFamily.default, fontSize: null, fontRatio: null, bold: false, italic: false, underline: false, strikethrough: false };
|
|
14987
14966
|
this.strokeSettings = { strokeColor: '#fff', fillColor: '', strokeWidth: null, radius: null, outlineColor: '', outlineWidth: null };
|
|
14988
|
-
this.preventFrameAnnotation =
|
|
14967
|
+
this.preventFrameAnnotation = false;
|
|
14989
14968
|
}
|
|
14990
14969
|
drawEllipse(x, y, radiusX, radiusY, strokeWidth, strokeColor, fillColor, degree, isSelected) {
|
|
14991
14970
|
this.initializeShape('ellipse');
|
|
@@ -15698,7 +15677,7 @@ class Shape {
|
|
|
15698
15677
|
}
|
|
15699
15678
|
parent.notify('selection', { prop: 'setTextSelection', onPropertyChange: false,
|
|
15700
15679
|
value: { width: width, height: height } });
|
|
15701
|
-
if (parent.activeObj.rotatedAngle !== 0
|
|
15680
|
+
if (parent.activeObj.rotatedAngle !== 0) {
|
|
15702
15681
|
const width = parent.activeObj.activePoint.width - tempActiveObj.activePoint.width;
|
|
15703
15682
|
const height = parent.activeObj.activePoint.height - tempActiveObj.activePoint.height;
|
|
15704
15683
|
let value = '';
|
|
@@ -15717,20 +15696,6 @@ class Shape {
|
|
|
15717
15696
|
parent.notify('shape', { prop: 'updateFontSize', onPropertyChange: false,
|
|
15718
15697
|
value: { obj: parent.activeObj } });
|
|
15719
15698
|
}
|
|
15720
|
-
else if (this.isPublicUpdateShape) {
|
|
15721
|
-
const width = parent.activeObj.activePoint.width - tempActiveObj.activePoint.width;
|
|
15722
|
-
const height = parent.activeObj.activePoint.height - tempActiveObj.activePoint.height;
|
|
15723
|
-
let value = '';
|
|
15724
|
-
if (parent.transform.degree === 0 || parent.transform.degree === 180) {
|
|
15725
|
-
value = 'width';
|
|
15726
|
-
}
|
|
15727
|
-
else if (parent.transform.degree === 90 || parent.transform.degree === 270) {
|
|
15728
|
-
value = 'height';
|
|
15729
|
-
}
|
|
15730
|
-
parent.activeObj.activePoint = extend({}, tempActiveObj.activePoint, {}, true);
|
|
15731
|
-
parent.notify('selection', { prop: 'adjustRotationPoints', onPropertyChange: false, value: { rectangle: parent.activeObj.activePoint,
|
|
15732
|
-
x: width, y: height, angle: parent.activeObj.rotatedAngle, type: 'text', elem: value } });
|
|
15733
|
-
}
|
|
15734
15699
|
parent.notify('draw', { prop: 'updateActiveObject', onPropertyChange: false, value: { actPoint: parent.activeObj.activePoint, obj: parent.activeObj,
|
|
15735
15700
|
isMouseMove: null, x: null, y: null } });
|
|
15736
15701
|
this.updImgRatioForActObj();
|
|
@@ -23275,12 +23240,10 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
23275
23240
|
const dropAreaElement = this.createElement('div', { id: this.element.id + '_dropArea', className: 'e-ie-drop-area' });
|
|
23276
23241
|
dropAreaElement.style.position = 'relative';
|
|
23277
23242
|
const dropIconElement = this.createElement('span', { className: 'e-ie-drop-icon e-icons e-image' });
|
|
23278
|
-
dropIconElement.style.position = 'absolute';
|
|
23279
23243
|
const dropContentElement = this.createElement('span', { className: 'e-ie-drop-content' });
|
|
23280
|
-
dropContentElement.style.cssText = '
|
|
23244
|
+
dropContentElement.style.cssText = 'display: none;';
|
|
23281
23245
|
dropContentElement.textContent = dragObj['value'] + ' ';
|
|
23282
23246
|
const minDropContentElem = this.createElement('span', { className: 'e-ie-min-drop-content' });
|
|
23283
|
-
minDropContentElem.style.position = 'absolute';
|
|
23284
23247
|
minDropContentElem.textContent = dropObj['value'] + ' ';
|
|
23285
23248
|
const dropAnchorElement = this.createElement('a', { id: this.element.id + '_dropBrowse', className: 'e-ie-drop-browse' });
|
|
23286
23249
|
dropAnchorElement.textContent = browseObj['value'];
|
|
@@ -23290,7 +23253,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
23290
23253
|
minDropContentElem.appendChild(minDropAnchorElem);
|
|
23291
23254
|
dropAnchorElement.href = '';
|
|
23292
23255
|
minDropAnchorElem.href = '';
|
|
23293
|
-
const dropInfoElement = this.createElement('span', { className: 'e-ie-drop-info'
|
|
23256
|
+
const dropInfoElement = this.createElement('span', { className: 'e-ie-drop-info' });
|
|
23294
23257
|
this.updateDropInfoContent(dropInfoElement);
|
|
23295
23258
|
const dropUploader = dropAreaElement.appendChild(this.createElement('input', {
|
|
23296
23259
|
id: this.element.id + '_dropfileUpload', className: 'e-fileUpload e-image-upload'
|
|
@@ -24154,9 +24117,6 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
24154
24117
|
*
|
|
24155
24118
|
*/
|
|
24156
24119
|
updateShape(setting, isSelected) {
|
|
24157
|
-
if (setting.type.toLowerCase() === 'text') {
|
|
24158
|
-
this.notify('shape', { prop: 'setPublicUpdateShape', onPropertyChange: false, value: { isPublicUpdateShape: true } });
|
|
24159
|
-
}
|
|
24160
24120
|
const obj = { isSelected: false };
|
|
24161
24121
|
let isTextArea = false;
|
|
24162
24122
|
const freehandObj = { bool: false };
|
|
@@ -24228,9 +24188,6 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
24228
24188
|
}
|
|
24229
24189
|
}
|
|
24230
24190
|
}
|
|
24231
|
-
if (setting.type.toLowerCase() === 'text') {
|
|
24232
|
-
this.notify('shape', { prop: 'setPublicUpdateShape', onPropertyChange: false, value: { isPublicUpdateShape: false } });
|
|
24233
|
-
}
|
|
24234
24191
|
return obj['isSelected'];
|
|
24235
24192
|
}
|
|
24236
24193
|
/**
|
|
@@ -24861,7 +24818,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
24861
24818
|
this.notify('toolbar', { prop: 'create-contextual-toolbar', onPropertyChange: false });
|
|
24862
24819
|
const dropArea = document.getElementById(this.element.id + '_dropArea');
|
|
24863
24820
|
if (dropArea) {
|
|
24864
|
-
dropArea.style.display = '
|
|
24821
|
+
dropArea.style.display = 'flex';
|
|
24865
24822
|
}
|
|
24866
24823
|
}
|
|
24867
24824
|
// AI related codes
|
|
@@ -27925,9 +27882,6 @@ class ToolbarModule {
|
|
|
27925
27882
|
case 'getToolbarHeight':
|
|
27926
27883
|
args.value['obj']['toolbarHeight'] = this.toolbarHeight;
|
|
27927
27884
|
break;
|
|
27928
|
-
case 'getcurrentImageQuality':
|
|
27929
|
-
args.value['obj']['currentImageQuality'] = this.currentQuality;
|
|
27930
|
-
break;
|
|
27931
27885
|
case 'setToolbarHeight':
|
|
27932
27886
|
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.length > 0 && parent.toolbar.indexOf('Open') > -1)) {
|
|
27933
27887
|
this.toolbarHeight = args.value['height'];
|
|
@@ -28842,17 +28796,17 @@ class ToolbarModule {
|
|
|
28842
28796
|
}
|
|
28843
28797
|
const frame = document.querySelector('#' + id + '_frame');
|
|
28844
28798
|
if (frame && ((parent.currSelectionPoint && parent.currSelectionPoint.shape === 'crop-circle') || parent.isCircleCrop)) {
|
|
28845
|
-
frame.classList.add('e-overlay');
|
|
28799
|
+
frame.parentElement.classList.add('e-overlay');
|
|
28846
28800
|
}
|
|
28847
28801
|
else if (frame) {
|
|
28848
|
-
frame.classList.remove('e-overlay');
|
|
28802
|
+
frame.parentElement.classList.remove('e-overlay');
|
|
28849
28803
|
}
|
|
28850
28804
|
const ratio = document.querySelector('#' + id + '_aspectratio');
|
|
28851
28805
|
if (ratio && ((parent.currSelectionPoint && parent.currSelectionPoint.shape === 'crop-circle') || parent.isCircleCrop)) {
|
|
28852
|
-
ratio.classList.add('e-overlay');
|
|
28806
|
+
ratio.parentElement.classList.add('e-overlay');
|
|
28853
28807
|
}
|
|
28854
28808
|
else if (ratio) {
|
|
28855
|
-
ratio.classList.remove('e-overlay');
|
|
28809
|
+
ratio.parentElement.classList.remove('e-overlay');
|
|
28856
28810
|
}
|
|
28857
28811
|
}
|
|
28858
28812
|
createLeftToolbarControls() {
|
|
@@ -29085,34 +29039,34 @@ class ToolbarModule {
|
|
|
29085
29039
|
&& parent.activeObj.pointColl.length === 0)) &&
|
|
29086
29040
|
isNullOrUndefined(obj['freehandDrawSelectedId'])) {
|
|
29087
29041
|
if (duplicateElement) {
|
|
29088
|
-
duplicateElement.classList.add('e-overlay');
|
|
29042
|
+
duplicateElement.parentElement.classList.add('e-overlay');
|
|
29089
29043
|
}
|
|
29090
29044
|
if (removeElement) {
|
|
29091
|
-
removeElement.classList.add('e-overlay');
|
|
29045
|
+
removeElement.parentElement.classList.add('e-overlay');
|
|
29092
29046
|
}
|
|
29093
29047
|
if (editTextElement) {
|
|
29094
|
-
editTextElement.classList.add('e-overlay');
|
|
29048
|
+
editTextElement.parentElement.classList.add('e-overlay');
|
|
29095
29049
|
}
|
|
29096
29050
|
if (zOrderElement) {
|
|
29097
|
-
zOrderElement.classList.add('e-overlay');
|
|
29051
|
+
zOrderElement.parentElement.classList.add('e-overlay');
|
|
29098
29052
|
}
|
|
29099
29053
|
}
|
|
29100
29054
|
else {
|
|
29101
29055
|
if (duplicateElement) {
|
|
29102
|
-
duplicateElement.classList.remove('e-overlay');
|
|
29056
|
+
duplicateElement.parentElement.classList.remove('e-overlay');
|
|
29103
29057
|
}
|
|
29104
29058
|
if (removeElement) {
|
|
29105
|
-
removeElement.classList.remove('e-overlay');
|
|
29059
|
+
removeElement.parentElement.classList.remove('e-overlay');
|
|
29106
29060
|
}
|
|
29107
29061
|
if (editTextElement) {
|
|
29108
|
-
editTextElement.classList.remove('e-overlay');
|
|
29062
|
+
editTextElement.parentElement.classList.remove('e-overlay');
|
|
29109
29063
|
}
|
|
29110
29064
|
if (zOrderElement) {
|
|
29111
|
-
zOrderElement.classList.remove('e-overlay');
|
|
29065
|
+
zOrderElement.parentElement.classList.remove('e-overlay');
|
|
29112
29066
|
}
|
|
29113
29067
|
}
|
|
29114
29068
|
if (zOrderElement && (parent.shapeColl.length === 0 || (obj['freehandDrawSelectedId'] && parent.shapeColl.length === 1))) {
|
|
29115
|
-
zOrderElement.classList.add('e-overlay');
|
|
29069
|
+
zOrderElement.parentElement.classList.add('e-overlay');
|
|
29116
29070
|
}
|
|
29117
29071
|
}
|
|
29118
29072
|
renderStraightenSlider() {
|
|
@@ -30981,7 +30935,7 @@ class ToolbarModule {
|
|
|
30981
30935
|
const drawingObject = { shape: '' };
|
|
30982
30936
|
parent.notify('selection', { prop: 'getCurrentDrawingShape', onPropertyChange: false, value: { obj: drawingObject } });
|
|
30983
30937
|
if (drawingObject['shape'] === 'path' && okBtn) {
|
|
30984
|
-
okBtn.classList.add('e-overlay');
|
|
30938
|
+
okBtn.parentElement.classList.add('e-overlay');
|
|
30985
30939
|
}
|
|
30986
30940
|
}
|
|
30987
30941
|
if (parent.activeObj.shape === 'line' || parent.activeObj.shape === 'path') {
|
|
@@ -32461,11 +32415,11 @@ class ToolbarModule {
|
|
|
32461
32415
|
const orderObj = { order: null };
|
|
32462
32416
|
parent.notify('shape', { prop: 'getHighestOrder', onPropertyChange: false, value: { obj: orderObj } });
|
|
32463
32417
|
if (parent.activeObj.order > orderObj['order'] && document.getElementById(parent.element.id + '_bringToFront')) {
|
|
32464
|
-
document.getElementById(parent.element.id + '_bringToFront').classList.add('e-overlay');
|
|
32418
|
+
document.getElementById(parent.element.id + '_bringToFront').parentElement.classList.add('e-overlay');
|
|
32465
32419
|
}
|
|
32466
32420
|
else {
|
|
32467
32421
|
if (document.getElementById(parent.element.id + '_bringToFront')) {
|
|
32468
|
-
document.getElementById(parent.element.id + '_bringToFront').classList.remove('e-overlay');
|
|
32422
|
+
document.getElementById(parent.element.id + '_bringToFront').parentElement.classList.remove('e-overlay');
|
|
32469
32423
|
}
|
|
32470
32424
|
}
|
|
32471
32425
|
qtArea.style.width = 'auto';
|
|
@@ -32519,11 +32473,11 @@ class ToolbarModule {
|
|
|
32519
32473
|
parent.notify('shape', { prop: 'getHighestOrder', onPropertyChange: false, value: { obj: orderObj } });
|
|
32520
32474
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
32521
32475
|
if (parent.getObjFromId(parent.pointColl[indexObj['freehandSelectedIndex']].id).order >= orderObj['order'] && document.getElementById(parent.element.id + '_bringToFront')) {
|
|
32522
|
-
document.getElementById(parent.element.id + '_bringToFront').classList.add('e-overlay');
|
|
32476
|
+
document.getElementById(parent.element.id + '_bringToFront').parentElement.classList.add('e-overlay');
|
|
32523
32477
|
}
|
|
32524
32478
|
else {
|
|
32525
32479
|
if (document.getElementById(parent.element.id + '_bringToFront')) {
|
|
32526
|
-
document.getElementById(parent.element.id + '_bringToFront').classList.remove('e-overlay');
|
|
32480
|
+
document.getElementById(parent.element.id + '_bringToFront').parentElement.classList.remove('e-overlay');
|
|
32527
32481
|
}
|
|
32528
32482
|
}
|
|
32529
32483
|
const obj = { activePoint: null };
|
|
@@ -32689,32 +32643,30 @@ class ToolbarModule {
|
|
|
32689
32643
|
parent.notify('undo-redo', { prop: 'updateUndoRedoStack', onPropertyChange: false });
|
|
32690
32644
|
break;
|
|
32691
32645
|
case 'bringtofront':
|
|
32692
|
-
|
|
32693
|
-
|
|
32694
|
-
|
|
32695
|
-
|
|
32696
|
-
|
|
32697
|
-
|
|
32698
|
-
|
|
32699
|
-
|
|
32700
|
-
|
|
32701
|
-
|
|
32702
|
-
|
|
32703
|
-
|
|
32704
|
-
|
|
32705
|
-
|
|
32706
|
-
|
|
32707
|
-
|
|
32708
|
-
|
|
32709
|
-
|
|
32710
|
-
|
|
32711
|
-
document.getElementById(parent.element.id + '_bringToFront').classList.add('e-overlay');
|
|
32712
|
-
}
|
|
32713
|
-
else {
|
|
32714
|
-
document.getElementById(parent.element.id + '_bringToFront').classList.remove('e-overlay');
|
|
32715
|
-
}
|
|
32716
|
-
parent.notify('undo-redo', { prop: 'updateUndoRedoStack', onPropertyChange: false });
|
|
32646
|
+
parent.notify('freehand-draw', { prop: 'getFreehandSelectedIndex', onPropertyChange: false, value: { obj: indexObj } });
|
|
32647
|
+
shapeId = indexObj['freehandSelectedIndex'] !== null ? parent.pointColl[indexObj['freehandSelectedIndex']].id :
|
|
32648
|
+
parent.activeObj.currIndex;
|
|
32649
|
+
parent.updateShapeOrder(shapeId, type);
|
|
32650
|
+
isDisabled = false;
|
|
32651
|
+
parent.notify('shape', { prop: 'getHighestOrder', onPropertyChange: false, value: { obj: orderObj } });
|
|
32652
|
+
if (shapeId.indexOf('pen') > -1) {
|
|
32653
|
+
parent.notify('shape', { prop: 'updateShapeColl', onPropertyChange: false });
|
|
32654
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
32655
|
+
const order = parent.getObjFromId(shapeId).order;
|
|
32656
|
+
isDisabled = order >= orderObj['order'] ? true : false;
|
|
32657
|
+
}
|
|
32658
|
+
else {
|
|
32659
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
32660
|
+
const order = parent.getObjFromId(shapeId).order;
|
|
32661
|
+
isDisabled = order > orderObj['order'] ? true : false;
|
|
32662
|
+
}
|
|
32663
|
+
if (isDisabled) {
|
|
32664
|
+
document.getElementById(parent.element.id + '_bringToFront').parentElement.classList.add('e-overlay');
|
|
32717
32665
|
}
|
|
32666
|
+
else {
|
|
32667
|
+
document.getElementById(parent.element.id + '_bringToFront').parentElement.classList.remove('e-overlay');
|
|
32668
|
+
}
|
|
32669
|
+
parent.notify('undo-redo', { prop: 'updateUndoRedoStack', onPropertyChange: false });
|
|
32718
32670
|
break;
|
|
32719
32671
|
}
|
|
32720
32672
|
if (type === 'duplicate' || type === 'remove') {
|
|
@@ -33659,29 +33611,25 @@ class ToolbarModule {
|
|
|
33659
33611
|
}
|
|
33660
33612
|
hdrWrapper = canvasWrapper.appendChild(parent.createElement('div', {
|
|
33661
33613
|
id: id + '_headWrapper',
|
|
33614
|
+
className: 'e-ie-head-wrapper',
|
|
33662
33615
|
styles: 'position: relative'
|
|
33663
33616
|
}));
|
|
33664
33617
|
if (type === 'transparency') {
|
|
33665
33618
|
labelWrapper = hdrWrapper.appendChild(parent.createElement('label', {
|
|
33666
33619
|
id: id + '_labelWrapper',
|
|
33667
|
-
className: 'e-ie-finetune-slider-label'
|
|
33668
|
-
styles: Browser.isDevice ? 'position: absolute; top: 31%; left: calc(50% - 150px); font-size: 15px; text-transform: capitalize; font-weight: 400;'
|
|
33669
|
-
: 'position: absolute; top: 31%; left: calc(50% - 220px); font-size: 15px; text-transform: capitalize; font-weight: 400;'
|
|
33620
|
+
className: 'e-ie-finetune-slider-label'
|
|
33670
33621
|
}));
|
|
33671
33622
|
}
|
|
33672
33623
|
else {
|
|
33673
33624
|
labelWrapper = hdrWrapper.appendChild(parent.createElement('label', {
|
|
33674
33625
|
id: id + '_labelWrapper',
|
|
33675
|
-
className: 'e-ie-finetune-slider-label'
|
|
33676
|
-
styles: Browser.isDevice ? ('position: absolute; top: 31%; left: calc(50% - 160px); font-size: 15px; text-transform: capitalize; font-weight: 400;')
|
|
33677
|
-
: 'position: absolute; top: 25%; left: calc(50% - 226px); font-size: 15px; text-transform: capitalize; font-weight: 400;'
|
|
33626
|
+
className: 'e-ie-finetune-slider-label'
|
|
33678
33627
|
}));
|
|
33679
33628
|
}
|
|
33680
33629
|
labelWrapper.textContent = this.l10n.getConstant(parent.toPascalCase(type === 'transparency' ? 'opacity' : type));
|
|
33681
33630
|
const sliderWrapper = hdrWrapper.appendChild(parent.createElement('div', {
|
|
33682
33631
|
id: id + '_sliderWrapper',
|
|
33683
|
-
className: 'e-ie-finetune-slider-wrap'
|
|
33684
|
-
styles: 'position: absolute'
|
|
33632
|
+
className: 'e-ie-finetune-slider-wrap'
|
|
33685
33633
|
}));
|
|
33686
33634
|
let value = parent.getCurrAdjustmentValue(type);
|
|
33687
33635
|
if (isSelect && type === 'straighten' && Browser.isDevice) {
|
|
@@ -33759,8 +33707,7 @@ class ToolbarModule {
|
|
|
33759
33707
|
if (type === 'straighten' && Browser.isDevice) {
|
|
33760
33708
|
const sLabelWrapper = hdrWrapper.appendChild(parent.createElement('label', {
|
|
33761
33709
|
id: id + '_sLabelWrapper',
|
|
33762
|
-
className: 'e-ie-straighten-value-span e-ie-finetune-value-span'
|
|
33763
|
-
styles: 'position: absolute; top: 31%; margin-left: 20px; font-size: 15px; text-transform: capitalize; font-weight: 400;'
|
|
33710
|
+
className: 'e-ie-straighten-value-span e-ie-finetune-value-span'
|
|
33764
33711
|
}));
|
|
33765
33712
|
sLabelWrapper.innerHTML = parent.transform.straighten.toString() + '°';
|
|
33766
33713
|
sliderWrapper.parentElement.classList.add('e-straighten-slider');
|
|
@@ -33768,9 +33715,7 @@ class ToolbarModule {
|
|
|
33768
33715
|
if (type !== 'straighten') {
|
|
33769
33716
|
hdrWrapper.appendChild(parent.createElement('label', {
|
|
33770
33717
|
id: id + '_finetuneSpan',
|
|
33771
|
-
className: 'e-ie-finetune-value-span'
|
|
33772
|
-
styles: Browser.isDevice ? ('position: absolute; top: 25%; margin-left: 20px; font-size: 15px; text-transform: capitalize; font-weight: 400;') :
|
|
33773
|
-
'position: absolute; top: 25%; left: calc(50% + 190px); font-size: 15px; text-transform: capitalize; font-weight: 400;'
|
|
33718
|
+
className: 'e-ie-finetune-value-span'
|
|
33774
33719
|
}));
|
|
33775
33720
|
sliderWrapper.parentElement.classList.add('e-finetune-slider');
|
|
33776
33721
|
if (type === 'transparency' && Browser.isDevice) {
|
|
@@ -34284,26 +34229,22 @@ class ToolbarModule {
|
|
|
34284
34229
|
}
|
|
34285
34230
|
hdrWrapper = canvasWrapper.appendChild(parent.createElement('div', {
|
|
34286
34231
|
id: id + '_headWrapper',
|
|
34232
|
+
className: 'e-ie-head-wrapper',
|
|
34287
34233
|
styles: 'position: relative'
|
|
34288
34234
|
}));
|
|
34289
34235
|
labelWrapper = hdrWrapper.appendChild(parent.createElement('label', {
|
|
34290
34236
|
id: id + '_labelWrapper',
|
|
34291
|
-
className: 'e-ie-finetune-slider-label'
|
|
34292
|
-
styles: Browser.isDevice ? ('position: absolute; top: 31%; left: calc(50% - 160px); font-size: 15px; text-transform: capitalize; font-weight: 400;')
|
|
34293
|
-
: 'position: absolute; top: 25%; left: calc(50% - 226px); font-size: 15px; text-transform: capitalize; font-weight: 400;'
|
|
34237
|
+
className: 'e-ie-finetune-slider-label'
|
|
34294
34238
|
}));
|
|
34295
34239
|
const text = type === 'blur' ? this.l10n.getConstant('Blur') : this.l10n.getConstant('PixelSize');
|
|
34296
34240
|
labelWrapper.textContent = text;
|
|
34297
34241
|
const sliderWrapper = hdrWrapper.appendChild(parent.createElement('div', {
|
|
34298
34242
|
id: id + '_sliderWrapper',
|
|
34299
|
-
className: 'e-ie-finetune-slider-wrap'
|
|
34300
|
-
styles: 'position: absolute'
|
|
34243
|
+
className: 'e-ie-finetune-slider-wrap'
|
|
34301
34244
|
}));
|
|
34302
34245
|
hdrWrapper.appendChild(parent.createElement('label', {
|
|
34303
34246
|
id: id + '_redactSpan',
|
|
34304
|
-
className: 'e-ie-redact-value-span'
|
|
34305
|
-
styles: Browser.isDevice ? ('position: absolute; top: 30%; margin-left: 20px; font-size: 15px; text-transform: capitalize; font-weight: 400;') :
|
|
34306
|
-
'position: absolute; top: 30%; left: calc(50% + 190px); font-size: 15px; text-transform: capitalize; font-weight: 400;'
|
|
34247
|
+
className: 'e-ie-redact-value-span'
|
|
34307
34248
|
}));
|
|
34308
34249
|
sliderWrapper.parentElement.classList.add('e-finetune-slider');
|
|
34309
34250
|
const value = parent.activeObj.redactType === 'blur' ? parent.activeObj.redactBlur :
|
|
@@ -34343,6 +34284,9 @@ class ToolbarModule {
|
|
|
34343
34284
|
const ht = parent.element.querySelector('#' + id + '_canvasWrapper').offsetHeight;
|
|
34344
34285
|
contextualToolbarArea.style.top = this.toolbarHeight + 1 + ht - cHt + 'px';
|
|
34345
34286
|
}
|
|
34287
|
+
else {
|
|
34288
|
+
contextualToolbarArea.style.top = parent.element.querySelector('#' + parent.element.id + '_toolbarArea').clientHeight + 'px';
|
|
34289
|
+
}
|
|
34346
34290
|
}
|
|
34347
34291
|
}
|
|
34348
34292
|
|