@syncfusion/ej2-image-editor 23.1.36 → 23.1.39
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/CHANGELOG.md +18 -0
- package/dist/ej2-image-editor.umd.min.js +3 -3
- package/dist/ej2-image-editor.umd.min.js.map +1 -1
- package/dist/es6/ej2-image-editor.es2015.js +249 -31
- package/dist/es6/ej2-image-editor.es2015.js.map +1 -1
- package/dist/es6/ej2-image-editor.es5.js +266 -48
- package/dist/es6/ej2-image-editor.es5.js.map +1 -1
- package/dist/global/ej2-image-editor.min.js +3 -3
- package/dist/global/ej2-image-editor.min.js.map +1 -1
- package/dist/global/index.d.ts +2 -2
- package/package.json +10 -10
- package/src/image-editor/action/draw.js +5 -1
- package/src/image-editor/action/freehand-draw.d.ts +1 -0
- package/src/image-editor/action/freehand-draw.js +53 -26
- package/src/image-editor/action/selection.js +38 -3
- package/src/image-editor/action/shape.js +33 -16
- package/src/image-editor/base/enum.d.ts +28 -1
- package/src/image-editor/base/enum.js +27 -0
- package/src/image-editor/base/image-editor-model.d.ts +1 -1
- package/src/image-editor/base/image-editor.d.ts +8 -0
- package/src/image-editor/base/image-editor.js +110 -3
- package/src/image-editor/renderer/toolbar.js +1 -0
- package/styles/bootstrap-dark.css +5 -0
- package/styles/bootstrap.css +5 -0
- package/styles/bootstrap4.css +5 -0
- package/styles/bootstrap5-dark.css +5 -0
- package/styles/bootstrap5.css +5 -0
- package/styles/fabric-dark.css +5 -0
- package/styles/fabric.css +5 -0
- package/styles/fluent-dark.css +5 -0
- package/styles/fluent.css +5 -0
- package/styles/highcontrast-light.css +5 -0
- package/styles/highcontrast.css +5 -0
- package/styles/image-editor/_layout.scss +6 -0
- package/styles/image-editor/bootstrap-dark.css +5 -0
- package/styles/image-editor/bootstrap.css +5 -0
- package/styles/image-editor/bootstrap4.css +5 -0
- package/styles/image-editor/bootstrap5-dark.css +5 -0
- package/styles/image-editor/bootstrap5.css +5 -0
- package/styles/image-editor/fabric-dark.css +5 -0
- package/styles/image-editor/fabric.css +5 -0
- package/styles/image-editor/fluent-dark.css +5 -0
- package/styles/image-editor/fluent.css +5 -0
- package/styles/image-editor/highcontrast-light.css +5 -0
- package/styles/image-editor/highcontrast.css +5 -0
- package/styles/image-editor/material-dark.css +5 -0
- package/styles/image-editor/material.css +5 -0
- package/styles/image-editor/material3-dark.css +5 -0
- package/styles/image-editor/material3.css +5 -0
- package/styles/image-editor/tailwind-dark.css +5 -0
- package/styles/image-editor/tailwind.css +5 -0
- package/styles/material-dark.css +5 -0
- package/styles/material.css +5 -0
- package/styles/material3-dark.css +5 -0
- package/styles/material3.css +5 -0
- package/styles/tailwind-dark.css +5 -0
- package/styles/tailwind.css +5 -0
|
@@ -4288,7 +4288,11 @@ class Draw {
|
|
|
4288
4288
|
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
4289
4289
|
filesData = fileData = args.filesData[0].rawFile;
|
|
4290
4290
|
}
|
|
4291
|
-
let fileExtension
|
|
4291
|
+
let fileExtension;
|
|
4292
|
+
if (fileData.name) {
|
|
4293
|
+
let fileExtensionArray = fileData.name.split('.');
|
|
4294
|
+
fileExtension = fileExtensionArray[fileExtensionArray.length - 1].toLowerCase();
|
|
4295
|
+
}
|
|
4292
4296
|
if (fileExtension && ['jpg', 'jpeg', 'png', 'svg'].indexOf(fileExtension) === -1) {
|
|
4293
4297
|
this.errorLoading();
|
|
4294
4298
|
return;
|
|
@@ -6255,6 +6259,13 @@ class FreehandDrawing {
|
|
|
6255
6259
|
}
|
|
6256
6260
|
this.isFreehandPointMoved = false;
|
|
6257
6261
|
EventHandler.add(canvas, 'mousemove touchmove', this.freehandMoveHandler, this);
|
|
6262
|
+
const shapeSettings = { id: 'pen_' + (this.currFHDIdx + 1), type: ShapeType.FreehandDraw,
|
|
6263
|
+
startX: this.freehandDownPoint.x, startY: this.freehandDownPoint.y,
|
|
6264
|
+
strokeColor: this.parent.activeObj.strokeSettings.strokeColor, strokeWidth: this.penStrokeWidth,
|
|
6265
|
+
points: null };
|
|
6266
|
+
const shapeChangingArgs = { action: 'draw-start', previousShapeSettings: shapeSettings,
|
|
6267
|
+
currentShapeSettings: shapeSettings };
|
|
6268
|
+
this.triggerShapeChanging(shapeChangingArgs);
|
|
6258
6269
|
}
|
|
6259
6270
|
freehandUpHandler(e, canvas, context) {
|
|
6260
6271
|
const rect = canvas.getBoundingClientRect();
|
|
@@ -6299,13 +6310,20 @@ class FreehandDrawing {
|
|
|
6299
6310
|
this.selPoints = [];
|
|
6300
6311
|
this.pointCounter = 0;
|
|
6301
6312
|
parent.freehandCounter++;
|
|
6302
|
-
this.currFHDIdx++;
|
|
6303
6313
|
this.isFreehandDrawing = false;
|
|
6304
6314
|
parent.notify('undo-redo', { prop: 'updateUndoRedoColl', onPropertyChange: false,
|
|
6305
6315
|
value: { operation: 'freehand-draw', previousObj: prevObj, previousObjColl: prevObj.objColl,
|
|
6306
6316
|
previousPointColl: prevObj.pointColl, previousSelPointColl: prevObj.selPointColl,
|
|
6307
6317
|
previousCropObj: prevCropObj, previousText: null,
|
|
6308
6318
|
currentText: null, previousFilter: null, isCircleCrop: null } });
|
|
6319
|
+
const shapeSettings = { id: 'pen_' + (this.currFHDIdx + 1), type: ShapeType.FreehandDraw,
|
|
6320
|
+
startX: this.freehandDownPoint.x, startY: this.freehandDownPoint.y,
|
|
6321
|
+
strokeColor: this.parent.activeObj.strokeSettings.strokeColor, strokeWidth: this.penStrokeWidth,
|
|
6322
|
+
points: this.parent.pointColl[this.currFHDIdx].points };
|
|
6323
|
+
const shapeChangingArgs = { action: 'draw-end', previousShapeSettings: shapeSettings,
|
|
6324
|
+
currentShapeSettings: shapeSettings };
|
|
6325
|
+
this.triggerShapeChanging(shapeChangingArgs);
|
|
6326
|
+
this.currFHDIdx++;
|
|
6309
6327
|
}
|
|
6310
6328
|
freehandMoveHandler(e) {
|
|
6311
6329
|
this.isFreehandPointMoved = true;
|
|
@@ -6321,6 +6339,7 @@ class FreehandDrawing {
|
|
|
6321
6339
|
y = e.touches[0].clientY - rect.top;
|
|
6322
6340
|
}
|
|
6323
6341
|
if (this.isFreehandDrawing) {
|
|
6342
|
+
this.upperContext.fillStyle = this.parent.activeObj.strokeSettings.strokeColor;
|
|
6324
6343
|
this.processPoint(x, y, false, this.upperContext);
|
|
6325
6344
|
}
|
|
6326
6345
|
}
|
|
@@ -6671,30 +6690,7 @@ class FreehandDrawing {
|
|
|
6671
6690
|
points: parent.pointColl[this.fhdSelIdx].points };
|
|
6672
6691
|
const shapeChangingArgs = { action: 'select', previousShapeSettings: shapeSettings,
|
|
6673
6692
|
currentShapeSettings: shapeSettings };
|
|
6674
|
-
|
|
6675
|
-
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
6676
|
-
parent.dotNetRef.invokeMethodAsync('ShapeEventAsync', 'OnShape', shapeChangingArgs).then((shapeChangingArgs) => {
|
|
6677
|
-
parent.activeObj.strokeSettings.strokeColor = parent.pointColl[this.fhdSelIdx].strokeColor =
|
|
6678
|
-
shapeChangingArgs.currentShapeSettings.strokeColor;
|
|
6679
|
-
parent.activeObj.strokeSettings.strokeWidth = parent.pointColl[this.fhdSelIdx].strokeWidth =
|
|
6680
|
-
shapeChangingArgs.currentShapeSettings.strokeWidth;
|
|
6681
|
-
parent.pointColl[this.fhdSelIdx].points = shapeChangingArgs.currentShapeSettings.points;
|
|
6682
|
-
this.freehandRedraw(this.upperContext);
|
|
6683
|
-
parent.updateToolbar(parent.element, 'imageLoaded');
|
|
6684
|
-
parent.updateToolbar(parent.element, 'pen');
|
|
6685
|
-
});
|
|
6686
|
-
}
|
|
6687
|
-
else {
|
|
6688
|
-
parent.trigger('shapeChanging', shapeChangingArgs);
|
|
6689
|
-
parent.activeObj.strokeSettings.strokeColor = parent.pointColl[this.fhdSelIdx].strokeColor =
|
|
6690
|
-
shapeChangingArgs.currentShapeSettings.strokeColor;
|
|
6691
|
-
parent.activeObj.strokeSettings.strokeWidth = parent.pointColl[this.fhdSelIdx].strokeWidth =
|
|
6692
|
-
shapeChangingArgs.currentShapeSettings.strokeWidth;
|
|
6693
|
-
parent.pointColl[this.fhdSelIdx].points = shapeChangingArgs.currentShapeSettings.points;
|
|
6694
|
-
this.freehandRedraw(this.upperContext);
|
|
6695
|
-
parent.notify('toolbar', { prop: 'refresh-toolbar', onPropertyChange: false, value: { type: 'pen',
|
|
6696
|
-
isApplyBtn: null, isCropping: null, isZooming: null, cType: null } });
|
|
6697
|
-
}
|
|
6693
|
+
this.triggerShapeChanging(shapeChangingArgs);
|
|
6698
6694
|
}
|
|
6699
6695
|
else {
|
|
6700
6696
|
parent.okBtn();
|
|
@@ -7074,6 +7070,41 @@ class FreehandDrawing {
|
|
|
7074
7070
|
}
|
|
7075
7071
|
}
|
|
7076
7072
|
}
|
|
7073
|
+
triggerShapeChanging(shapeChangingArgs) {
|
|
7074
|
+
const parent = this.parent;
|
|
7075
|
+
if (isBlazor() && parent.events && parent.events.shapeChanging.hasDelegate === true) {
|
|
7076
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
7077
|
+
parent.dotNetRef.invokeMethodAsync('ShapeEventAsync', 'OnShape', shapeChangingArgs).then((shapeChangingArgs) => {
|
|
7078
|
+
parent.activeObj.strokeSettings.strokeColor = shapeChangingArgs.currentShapeSettings.strokeColor;
|
|
7079
|
+
this.penStrokeWidth = shapeChangingArgs.currentShapeSettings.strokeWidth;
|
|
7080
|
+
if (this.fhdSelID) {
|
|
7081
|
+
parent.pointColl[this.fhdSelIdx].strokeColor = shapeChangingArgs.currentShapeSettings.strokeColor;
|
|
7082
|
+
parent.pointColl[this.fhdSelIdx].strokeWidth = shapeChangingArgs.currentShapeSettings.strokeWidth;
|
|
7083
|
+
parent.pointColl[this.fhdSelIdx].points = shapeChangingArgs.currentShapeSettings.points;
|
|
7084
|
+
}
|
|
7085
|
+
if (shapeChangingArgs.action === 'select') {
|
|
7086
|
+
this.freehandRedraw(this.upperContext);
|
|
7087
|
+
parent.updateToolbar(parent.element, 'imageLoaded');
|
|
7088
|
+
parent.updateToolbar(parent.element, 'pen');
|
|
7089
|
+
}
|
|
7090
|
+
});
|
|
7091
|
+
}
|
|
7092
|
+
else {
|
|
7093
|
+
parent.trigger('shapeChanging', shapeChangingArgs);
|
|
7094
|
+
parent.activeObj.strokeSettings.strokeColor = shapeChangingArgs.currentShapeSettings.strokeColor;
|
|
7095
|
+
this.penStrokeWidth = shapeChangingArgs.currentShapeSettings.strokeWidth;
|
|
7096
|
+
if (this.fhdSelID) {
|
|
7097
|
+
parent.pointColl[this.fhdSelIdx].strokeColor = shapeChangingArgs.currentShapeSettings.strokeColor;
|
|
7098
|
+
parent.pointColl[this.fhdSelIdx].strokeWidth = shapeChangingArgs.currentShapeSettings.strokeWidth;
|
|
7099
|
+
parent.pointColl[this.fhdSelIdx].points = shapeChangingArgs.currentShapeSettings.points;
|
|
7100
|
+
}
|
|
7101
|
+
if (shapeChangingArgs.action === 'select') {
|
|
7102
|
+
this.freehandRedraw(this.upperContext);
|
|
7103
|
+
parent.notify('toolbar', { prop: 'refresh-toolbar', onPropertyChange: false, value: { type: 'pen',
|
|
7104
|
+
isApplyBtn: null, isCropping: null, isZooming: null, cType: null } });
|
|
7105
|
+
}
|
|
7106
|
+
}
|
|
7107
|
+
}
|
|
7077
7108
|
}
|
|
7078
7109
|
|
|
7079
7110
|
class Selection {
|
|
@@ -7331,6 +7362,9 @@ class Selection {
|
|
|
7331
7362
|
case 'upgradeImageQuality':
|
|
7332
7363
|
this.upgradeImageQuality();
|
|
7333
7364
|
break;
|
|
7365
|
+
case 'triggerShapeChange':
|
|
7366
|
+
this.triggerShapeChange(args.value['shapeResizingArgs'], args.value['shapeMovingArgs'], args.value['type']);
|
|
7367
|
+
break;
|
|
7334
7368
|
}
|
|
7335
7369
|
}
|
|
7336
7370
|
getModuleName() {
|
|
@@ -8152,8 +8186,14 @@ class Selection {
|
|
|
8152
8186
|
parent.activeObj.activePoint.width = parent.activeObj.activePoint.endX - parent.activeObj.activePoint.startX;
|
|
8153
8187
|
parent.activeObj.activePoint.height = parent.activeObj.activePoint.endY - parent.activeObj.activePoint.startY;
|
|
8154
8188
|
const currentShapeSettings = this.updatePrevShapeSettings();
|
|
8155
|
-
shapeResizingArgs
|
|
8156
|
-
|
|
8189
|
+
if (!isNullOrUndefined(this.shapeResizingArgs) && !isNullOrUndefined(this.shapeMovingArgs)) {
|
|
8190
|
+
shapeResizingArgs.currentShapeSettings = this.shapeResizingArgs.currentShapeSettings = currentShapeSettings;
|
|
8191
|
+
shapeMovingArgs.currentShapeSettings = this.shapeMovingArgs.currentShapeSettings = currentShapeSettings;
|
|
8192
|
+
}
|
|
8193
|
+
else {
|
|
8194
|
+
shapeResizingArgs.currentShapeSettings = currentShapeSettings;
|
|
8195
|
+
shapeMovingArgs.currentShapeSettings = currentShapeSettings;
|
|
8196
|
+
}
|
|
8157
8197
|
if (type === 'resize') {
|
|
8158
8198
|
this.isCropSelection = false;
|
|
8159
8199
|
let splitWords;
|
|
@@ -8208,6 +8248,20 @@ class Selection {
|
|
|
8208
8248
|
}
|
|
8209
8249
|
}
|
|
8210
8250
|
}
|
|
8251
|
+
else if (type === 'mouse-down' || type === 'mouse-up') {
|
|
8252
|
+
if (isBlazor() && parent.events && parent.events.shapeChanging.hasDelegate === true) {
|
|
8253
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
8254
|
+
parent.dotNetRef.invokeMethodAsync('ShapeEventAsync', 'OnShape', shapeResizingArgs).then((shapeResizingArgs) => {
|
|
8255
|
+
parent.notify('shape', { prop: 'updateShapeChangeEventArgs', onPropertyChange: false,
|
|
8256
|
+
value: { shapeSettings: shapeResizingArgs.currentShapeSettings } });
|
|
8257
|
+
});
|
|
8258
|
+
}
|
|
8259
|
+
else {
|
|
8260
|
+
parent.trigger('shapeChanging', shapeResizingArgs);
|
|
8261
|
+
parent.notify('shape', { prop: 'updateShapeChangeEventArgs', onPropertyChange: false,
|
|
8262
|
+
value: { shapeSettings: shapeResizingArgs.currentShapeSettings } });
|
|
8263
|
+
}
|
|
8264
|
+
}
|
|
8211
8265
|
else {
|
|
8212
8266
|
if (isBlazor() && isNullOrUndefined(this.parent.eventType) && parent.events &&
|
|
8213
8267
|
parent.events.onShapeDragStart.hasDelegate === true) {
|
|
@@ -9917,6 +9971,12 @@ class Selection {
|
|
|
9917
9971
|
parent.activeObj.activePoint.endX = parent.activeObj.activePoint.startX;
|
|
9918
9972
|
parent.activeObj.activePoint.endY = parent.activeObj.activePoint.startY;
|
|
9919
9973
|
parent.currObjType.isDragging = true;
|
|
9974
|
+
const previousShapeSettings = this.updatePrevShapeSettings();
|
|
9975
|
+
const shapeResizingArgs = { action: 'draw-start', previousShapeSettings: previousShapeSettings };
|
|
9976
|
+
const shapeMovingArgs = { action: 'move', previousShapeSettings: previousShapeSettings };
|
|
9977
|
+
this.shapeResizingArgs = shapeResizingArgs;
|
|
9978
|
+
this.shapeMovingArgs = shapeMovingArgs;
|
|
9979
|
+
this.triggerShapeChange(shapeResizingArgs, shapeMovingArgs, 'mouse-down');
|
|
9920
9980
|
return;
|
|
9921
9981
|
}
|
|
9922
9982
|
parent.notify('draw', { prop: 'resetFrameZoom', onPropertyChange: false });
|
|
@@ -10320,7 +10380,7 @@ class Selection {
|
|
|
10320
10380
|
}
|
|
10321
10381
|
if (this.currentDrawingShape === 'path') {
|
|
10322
10382
|
const elem = e.srcElement;
|
|
10323
|
-
if (e.currentTarget !== parent.upperCanvas && e.currentTarget !== parent.lowerCanvas &&
|
|
10383
|
+
if (e.currentTarget !== parent.upperCanvas && e.currentTarget !== parent.lowerCanvas && parent.activeObj.pointColl.length > 0 &&
|
|
10324
10384
|
(elem.classList.contains('e-upload-icon') || elem.parentElement.id === parent.element.id + '_zoomIn' ||
|
|
10325
10385
|
elem.parentElement.id === parent.element.id + '_zoomOut' || elem.parentElement.id === parent.element.id + '_annotationBtn' ||
|
|
10326
10386
|
elem.parentElement.id === parent.element.id + '_borderColorBtn' || elem.parentElement.id === parent.element.id + '_borderWidthBtn' ||
|
|
@@ -10351,6 +10411,12 @@ class Selection {
|
|
|
10351
10411
|
if (parent.activeObj.activePoint.width === 0 && parent.activeObj.activePoint.height === 0) {
|
|
10352
10412
|
parent.notify('draw', { prop: 'performCancel', value: { isContextualToolbar: null } });
|
|
10353
10413
|
}
|
|
10414
|
+
const previousShapeSettings = this.updatePrevShapeSettings();
|
|
10415
|
+
const shapeResizingArgs = { action: 'draw-end', previousShapeSettings: previousShapeSettings };
|
|
10416
|
+
const shapeMovingArgs = { action: 'move', previousShapeSettings: previousShapeSettings };
|
|
10417
|
+
this.shapeResizingArgs = shapeResizingArgs;
|
|
10418
|
+
this.shapeMovingArgs = shapeMovingArgs;
|
|
10419
|
+
this.triggerShapeChange(shapeResizingArgs, shapeMovingArgs, 'mouse-up');
|
|
10354
10420
|
}
|
|
10355
10421
|
this.adjustActObjForLineArrow();
|
|
10356
10422
|
this.updPtCollForShpRot();
|
|
@@ -12684,6 +12750,9 @@ class Shape {
|
|
|
12684
12750
|
parent.activeObj.activePoint.endY = parent.activeObj.activePoint.startY + parent.activeObj.activePoint.height;
|
|
12685
12751
|
parent.activeObj.strokeSettings.strokeColor = shapeSettings.strokeColor;
|
|
12686
12752
|
parent.activeObj.strokeSettings.fillColor = shapeSettings.fillColor;
|
|
12753
|
+
if (isNullOrUndefined(shapeSettings.degree)) {
|
|
12754
|
+
shapeSettings.degree = 0;
|
|
12755
|
+
}
|
|
12687
12756
|
switch (parent.activeObj.shape) {
|
|
12688
12757
|
case 'ellipse':
|
|
12689
12758
|
parent.activeObj.activePoint.width = shapeSettings.radius * 2;
|
|
@@ -13514,6 +13583,13 @@ class Shape {
|
|
|
13514
13583
|
else {
|
|
13515
13584
|
parent.updateToolbar(parent.element, 'quickAccessToolbar', parent.activeObj.shape);
|
|
13516
13585
|
}
|
|
13586
|
+
const obj = { shapeSettingsObj: {} };
|
|
13587
|
+
parent.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: obj } });
|
|
13588
|
+
const shapeSettings = obj['shapeSettingsObj'];
|
|
13589
|
+
const shapeResizingArgs = { action: 'draw-end', previousShapeSettings: shapeSettings };
|
|
13590
|
+
const shapeMovingArgs = { action: 'move', previousShapeSettings: shapeSettings };
|
|
13591
|
+
parent.notify('selection', { prop: 'triggerShapeChange', onPropertyChange: false,
|
|
13592
|
+
value: { shapeResizingArgs: shapeResizingArgs, shapeMovingArgs: shapeMovingArgs, type: 'mouse-up' } });
|
|
13517
13593
|
}
|
|
13518
13594
|
}
|
|
13519
13595
|
}
|
|
@@ -14009,6 +14085,9 @@ class Shape {
|
|
|
14009
14085
|
}
|
|
14010
14086
|
applyFontStyle(item) {
|
|
14011
14087
|
const parent = this.parent;
|
|
14088
|
+
const obj = { shapeSettingsObj: {} };
|
|
14089
|
+
parent.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: obj } });
|
|
14090
|
+
const shapeSettings = obj['shapeSettingsObj'];
|
|
14012
14091
|
this.pushActItemIntoObj();
|
|
14013
14092
|
const objColl = extend([], parent.objColl, [], true);
|
|
14014
14093
|
parent.objColl.pop();
|
|
@@ -14032,6 +14111,10 @@ class Shape {
|
|
|
14032
14111
|
this.updateFontStyle(item, objColl, 'bold', 'italic');
|
|
14033
14112
|
break;
|
|
14034
14113
|
}
|
|
14114
|
+
const shapeChangedArgs = { action: 'font-style', previousShapeSettings: extend({}, shapeSettings, {}, true),
|
|
14115
|
+
currentShapeSettings: extend({}, shapeSettings, {}, true) };
|
|
14116
|
+
shapeChangedArgs.currentShapeSettings.fontStyle = [item];
|
|
14117
|
+
parent.triggerShapeChanged(shapeChangedArgs);
|
|
14035
14118
|
}
|
|
14036
14119
|
updateFontStyle(item, objColl, fontWeight, fontStyle) {
|
|
14037
14120
|
const parent = this.parent;
|
|
@@ -18444,6 +18527,10 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
18444
18527
|
this.notify('toolbar', { prop: 'create-contextual-toolbar', onPropertyChange: false });
|
|
18445
18528
|
}
|
|
18446
18529
|
this.createCanvas();
|
|
18530
|
+
if (this.element.offsetWidth > 359 && this.element.querySelector('.e-ie-min-drop-content') && this.element.querySelector('.e-ie-drop-content')) {
|
|
18531
|
+
this.element.querySelector('.e-ie-min-drop-content').style.display = 'none';
|
|
18532
|
+
this.element.querySelector('.e-ie-drop-content').style.display = 'block';
|
|
18533
|
+
}
|
|
18447
18534
|
this.createDropUploader();
|
|
18448
18535
|
if (this.showQuickAccessToolbar) {
|
|
18449
18536
|
const canvasWrapper = document.querySelector('#' + this.element.id + '_canvasWrapper');
|
|
@@ -18601,18 +18688,26 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
18601
18688
|
}));
|
|
18602
18689
|
const dragObj = { key: 'DragText' };
|
|
18603
18690
|
this.notify('toolbar', { prop: 'getLocaleText', onPropertyChange: false, value: { obj: dragObj } });
|
|
18691
|
+
const dropObj = { key: 'DropText' };
|
|
18692
|
+
this.notify('toolbar', { prop: 'getLocaleText', onPropertyChange: false, value: { obj: dropObj } });
|
|
18604
18693
|
const browseObj = { key: 'BrowseText' };
|
|
18605
18694
|
this.notify('toolbar', { prop: 'getLocaleText', onPropertyChange: false, value: { obj: browseObj } });
|
|
18606
18695
|
const supportObj = { key: 'SupportText' };
|
|
18607
18696
|
this.notify('toolbar', { prop: 'getLocaleText', onPropertyChange: false, value: { obj: supportObj } });
|
|
18608
18697
|
const dropAreaElement = this.createElement('div', { id: this.element.id + '_dropArea', className: 'e-ie-drop-area', attrs: { style: 'position: relative;' } });
|
|
18609
18698
|
const dropIconElement = this.createElement('span', { className: 'e-ie-drop-icon e-icons e-image', attrs: { style: 'position: absolute;' } });
|
|
18610
|
-
const dropContentElement = this.createElement('span', { className: 'e-ie-drop-content', attrs: { style: 'position: absolute;' } });
|
|
18699
|
+
const dropContentElement = this.createElement('span', { className: 'e-ie-drop-content', attrs: { style: 'position: absolute; display: none;' } });
|
|
18611
18700
|
dropContentElement.textContent = dragObj['value'] + ' ';
|
|
18701
|
+
const minDropContentElem = this.createElement('span', { className: 'e-ie-min-drop-content', attrs: { style: 'position: absolute;' } });
|
|
18702
|
+
minDropContentElem.textContent = dropObj['value'] + ' ';
|
|
18612
18703
|
const dropAnchorElement = this.createElement('a', { id: this.element.id + '_dropBrowse', className: 'e-ie-drop-browse' });
|
|
18613
18704
|
dropAnchorElement.textContent = browseObj['value'];
|
|
18705
|
+
const minDropAnchorElem = this.createElement('a', { id: this.element.id + '_dropBrowse', className: 'e-ie-drop-browse' });
|
|
18706
|
+
minDropAnchorElem.textContent = browseObj['value'];
|
|
18614
18707
|
dropContentElement.appendChild(dropAnchorElement);
|
|
18708
|
+
minDropContentElem.appendChild(minDropAnchorElem);
|
|
18615
18709
|
dropAnchorElement.href = '';
|
|
18710
|
+
minDropAnchorElem.href = '';
|
|
18616
18711
|
const dropInfoElement = this.createElement('span', { className: 'e-ie-drop-info', attrs: { position: 'absolute' } });
|
|
18617
18712
|
dropInfoElement.textContent = supportObj['value'] + ' SVG, PNG, and JPG';
|
|
18618
18713
|
const dropUploader = dropAreaElement.appendChild(this.createElement('input', {
|
|
@@ -18622,6 +18717,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
18622
18717
|
dropUploader.setAttribute('accept', 'image/*');
|
|
18623
18718
|
dropAreaElement.appendChild(dropIconElement);
|
|
18624
18719
|
dropAreaElement.appendChild(dropContentElement);
|
|
18720
|
+
dropAreaElement.appendChild(minDropContentElem);
|
|
18625
18721
|
dropAreaElement.appendChild(dropInfoElement);
|
|
18626
18722
|
canvasWrapper.appendChild(dropAreaElement);
|
|
18627
18723
|
this.lowerCanvas = canvasWrapper.appendChild(this.createElement('canvas', {
|
|
@@ -19628,7 +19724,9 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
19628
19724
|
* @returns {void}.
|
|
19629
19725
|
*/
|
|
19630
19726
|
okBtn(isMouseDown) {
|
|
19631
|
-
this.element.querySelector('.e-contextual-toolbar-wrapper')
|
|
19727
|
+
if (this.element.querySelector('.e-contextual-toolbar-wrapper')) {
|
|
19728
|
+
this.element.querySelector('.e-contextual-toolbar-wrapper').classList.remove('e-frame-wrapper');
|
|
19729
|
+
}
|
|
19632
19730
|
let isCropSelection = false;
|
|
19633
19731
|
let splitWords;
|
|
19634
19732
|
const aspectIcon = this.element.querySelector('#' + this.element.id + '_aspectratio');
|
|
@@ -19645,6 +19743,17 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
19645
19743
|
isCropSelection = true;
|
|
19646
19744
|
}
|
|
19647
19745
|
this.allowDownScale = true;
|
|
19746
|
+
if ((this.activeObj.shape && this.activeObj.shape !== 'image' || this.togglePen) && !isCropSelection) {
|
|
19747
|
+
const objt = { shapeSettingsObj: {} };
|
|
19748
|
+
this.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: objt } });
|
|
19749
|
+
const shapeSettings = objt['shapeSettingsObj'];
|
|
19750
|
+
if (this.togglePen) {
|
|
19751
|
+
shapeSettings.type = ShapeType.FreehandDraw;
|
|
19752
|
+
}
|
|
19753
|
+
const shapeChangedArgs = { action: 'apply', previousShapeSettings: extend({}, shapeSettings, {}, true),
|
|
19754
|
+
currentShapeSettings: extend({}, shapeSettings, {}, true) };
|
|
19755
|
+
this.triggerShapeChanged(shapeChangedArgs);
|
|
19756
|
+
}
|
|
19648
19757
|
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
19649
19758
|
if (aspectIcon || nonAspectIcon || (isBlazor() && this.currentToolbar === 'resize-toolbar')) {
|
|
19650
19759
|
const obj = { width: null, height: null };
|
|
@@ -19940,6 +20049,9 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
19940
20049
|
this.notify('shape', { prop: 'pushActItemIntoObj' });
|
|
19941
20050
|
const prevCropObj = extend({}, this.cropObj, {}, true);
|
|
19942
20051
|
const object = { currObj: {} };
|
|
20052
|
+
const objt = { shapeSettingsObj: {} };
|
|
20053
|
+
this.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: objt } });
|
|
20054
|
+
const shapeSettings = objt['shapeSettingsObj'];
|
|
19943
20055
|
this.notify('filter', { prop: 'getCurrentObj', onPropertyChange: false, value: { object: object } });
|
|
19944
20056
|
const prevObj = object['currObj'];
|
|
19945
20057
|
prevObj.objColl = extend([], this.objColl, [], true);
|
|
@@ -19976,6 +20088,9 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
19976
20088
|
}
|
|
19977
20089
|
}
|
|
19978
20090
|
}
|
|
20091
|
+
const shapeChangedArgs = { action: type, previousShapeSettings: extend({}, shapeSettings, {}, true),
|
|
20092
|
+
currentShapeSettings: extend({}, shapeSettings, {}, true) };
|
|
20093
|
+
this.triggerShapeChanged(shapeChangedArgs);
|
|
19979
20094
|
}
|
|
19980
20095
|
/**
|
|
19981
20096
|
* Apply Font style for text.
|
|
@@ -19989,6 +20104,9 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
19989
20104
|
this.notify('shape', { prop: 'pushActItemIntoObj' });
|
|
19990
20105
|
const objColl = extend([], this.objColl, [], true);
|
|
19991
20106
|
const prevCropObj = extend({}, this.cropObj, {}, true);
|
|
20107
|
+
const objt = { shapeSettingsObj: {} };
|
|
20108
|
+
this.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: objt } });
|
|
20109
|
+
const shapeSettings = objt['shapeSettingsObj'];
|
|
19992
20110
|
const object = { currObj: {} };
|
|
19993
20111
|
this.notify('filter', { prop: 'getCurrentObj', onPropertyChange: false, value: { object: object } });
|
|
19994
20112
|
const prevObj = object['currObj'];
|
|
@@ -20037,6 +20155,10 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
20037
20155
|
currentText: null, previousFilter: null, isCircleCrop: null } });
|
|
20038
20156
|
this.notify('selection', { prop: 'redrawShape', value: { obj: this.objColl[this.objColl.length - 1] } });
|
|
20039
20157
|
}
|
|
20158
|
+
const shapeChangedArgs = { action: 'font-family', previousShapeSettings: extend({}, shapeSettings, {}, true),
|
|
20159
|
+
currentShapeSettings: extend({}, shapeSettings, {}, true) };
|
|
20160
|
+
shapeChangedArgs.currentShapeSettings.fontFamily = this.textArea.style.fontFamily;
|
|
20161
|
+
this.triggerShapeChanged(shapeChangedArgs);
|
|
20040
20162
|
}
|
|
20041
20163
|
/**
|
|
20042
20164
|
* Apply Font size for text.
|
|
@@ -20050,6 +20172,9 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
20050
20172
|
this.notify('selection', { prop: 'setInitialTextEdit', value: { bool: false } });
|
|
20051
20173
|
this.notify('shape', { prop: 'pushActItemIntoObj' });
|
|
20052
20174
|
const prevCropObj = extend({}, this.cropObj, {}, true);
|
|
20175
|
+
const objt = { shapeSettingsObj: {} };
|
|
20176
|
+
this.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: objt } });
|
|
20177
|
+
const shapeSettings = objt['shapeSettingsObj'];
|
|
20053
20178
|
const object = { currObj: {} };
|
|
20054
20179
|
this.notify('filter', { prop: 'getCurrentObj', onPropertyChange: false, value: { object: object } });
|
|
20055
20180
|
const prevObj = object['currObj'];
|
|
@@ -20129,6 +20254,10 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
20129
20254
|
currentText: null, previousFilter: null, isCircleCrop: null } });
|
|
20130
20255
|
this.notify('selection', { prop: 'redrawShape', value: { obj: this.objColl[this.objColl.length - 1] } });
|
|
20131
20256
|
}
|
|
20257
|
+
const shapeChangedArgs = { action: 'font-size', previousShapeSettings: extend({}, shapeSettings, {}, true),
|
|
20258
|
+
currentShapeSettings: extend({}, shapeSettings, {}, true) };
|
|
20259
|
+
shapeChangedArgs.currentShapeSettings.fontSize = this.activeObj.textSettings.fontSize;
|
|
20260
|
+
this.triggerShapeChanged(shapeChangedArgs);
|
|
20132
20261
|
}
|
|
20133
20262
|
/**
|
|
20134
20263
|
* Apply Font color for text.
|
|
@@ -20141,6 +20270,9 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
20141
20270
|
this.notify('selection', { prop: 'setInitialTextEdit', value: { bool: false } });
|
|
20142
20271
|
this.notify('shape', { prop: 'pushActItemIntoObj' });
|
|
20143
20272
|
const prevCropObj = extend({}, this.cropObj, {}, true);
|
|
20273
|
+
const objt = { shapeSettingsObj: {} };
|
|
20274
|
+
this.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: objt } });
|
|
20275
|
+
const shapeSettings = objt['shapeSettingsObj'];
|
|
20144
20276
|
const object = { currObj: {} };
|
|
20145
20277
|
this.notify('filter', { prop: 'getCurrentObj', onPropertyChange: false, value: { object: object } });
|
|
20146
20278
|
const prevObj = object['currObj'];
|
|
@@ -20188,6 +20320,10 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
20188
20320
|
currentText: null, previousFilter: null, isCircleCrop: null } });
|
|
20189
20321
|
this.notify('selection', { prop: 'redrawShape', value: { obj: this.objColl[this.objColl.length - 1] } });
|
|
20190
20322
|
}
|
|
20323
|
+
const shapeChangedArgs = { action: 'font-color', previousShapeSettings: extend({}, shapeSettings, {}, true),
|
|
20324
|
+
currentShapeSettings: extend({}, shapeSettings, {}, true) };
|
|
20325
|
+
shapeChangedArgs.currentShapeSettings.fillColor = value;
|
|
20326
|
+
this.triggerShapeChanged(shapeChangedArgs);
|
|
20191
20327
|
}
|
|
20192
20328
|
/**
|
|
20193
20329
|
* Apply Pen stroke width.
|
|
@@ -20201,6 +20337,9 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
20201
20337
|
const temp = extend([], this.pointColl, [], true);
|
|
20202
20338
|
this.updateFreehandDrawColorChange();
|
|
20203
20339
|
const prevCropObj = extend({}, this.cropObj, {}, true);
|
|
20340
|
+
const objt = { shapeSettingsObj: {} };
|
|
20341
|
+
this.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: objt } });
|
|
20342
|
+
let shapeSettings = objt['shapeSettingsObj'];
|
|
20204
20343
|
const object = { currObj: {} };
|
|
20205
20344
|
this.notify('filter', { prop: 'getCurrentObj', onPropertyChange: false, value: { object: object } });
|
|
20206
20345
|
const prevObj = object['currObj'];
|
|
@@ -20231,6 +20370,11 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
20231
20370
|
previousCropObj: prevCropObj, previousText: null,
|
|
20232
20371
|
currentText: null, previousFilter: null, isCircleCrop: null } });
|
|
20233
20372
|
}
|
|
20373
|
+
shapeSettings.type = ShapeType.FreehandDraw;
|
|
20374
|
+
const shapeChangedArgs = { action: 'stroke-width', previousShapeSettings: extend({}, shapeSettings, {}, true),
|
|
20375
|
+
currentShapeSettings: extend({}, shapeSettings, {}, true) };
|
|
20376
|
+
shapeChangedArgs.currentShapeSettings.strokeWidth = this.activeObj.strokeSettings.strokeWidth;
|
|
20377
|
+
this.triggerShapeChanged(shapeChangedArgs);
|
|
20234
20378
|
}
|
|
20235
20379
|
/**
|
|
20236
20380
|
* Apply Pen stroke color.
|
|
@@ -20244,6 +20388,9 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
20244
20388
|
const temp = extend([], this.pointColl, [], true);
|
|
20245
20389
|
this.updateFreehandDrawColorChange();
|
|
20246
20390
|
const prevCropObj = extend({}, this.cropObj, {}, true);
|
|
20391
|
+
const objt = { shapeSettingsObj: {} };
|
|
20392
|
+
this.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: objt } });
|
|
20393
|
+
const shapeSettings = objt['shapeSettingsObj'];
|
|
20247
20394
|
const object = { currObj: {} };
|
|
20248
20395
|
this.notify('filter', { prop: 'getCurrentObj', onPropertyChange: false, value: { object: object } });
|
|
20249
20396
|
const prevObj = object['currObj'];
|
|
@@ -20275,6 +20422,11 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
20275
20422
|
else if (!this.togglePen) {
|
|
20276
20423
|
this.notify('selection', { prop: 'redrawShape', value: { obj: this.activeObj } });
|
|
20277
20424
|
}
|
|
20425
|
+
shapeSettings.type = ShapeType.FreehandDraw;
|
|
20426
|
+
const shapeChangedArgs = { action: 'stroke-color', previousShapeSettings: extend({}, shapeSettings, {}, true),
|
|
20427
|
+
currentShapeSettings: extend({}, shapeSettings, {}, true) };
|
|
20428
|
+
shapeChangedArgs.currentShapeSettings.strokeColor = value;
|
|
20429
|
+
this.triggerShapeChanged(shapeChangedArgs);
|
|
20278
20430
|
}
|
|
20279
20431
|
/**
|
|
20280
20432
|
* Apply Shape stroke width.
|
|
@@ -20286,6 +20438,9 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
20286
20438
|
updateStrokeWidth(id) {
|
|
20287
20439
|
if (this.activeObj.shape && (this.activeObj.shape !== 'path' || (this.activeObj.shape === 'path' &&
|
|
20288
20440
|
this.activeObj.pointColl.length > 0))) {
|
|
20441
|
+
const obj = { shapeSettingsObj: {} };
|
|
20442
|
+
this.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: obj } });
|
|
20443
|
+
const shapeSettings = obj['shapeSettingsObj'];
|
|
20289
20444
|
this.notify('shape', { prop: 'pushActItemIntoObj' });
|
|
20290
20445
|
const prevCropObj = extend({}, this.cropObj, {}, true);
|
|
20291
20446
|
const object = { currObj: {} };
|
|
@@ -20310,6 +20465,10 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
20310
20465
|
previousCropObj: prevCropObj, previousText: null,
|
|
20311
20466
|
currentText: null, previousFilter: null, isCircleCrop: null } });
|
|
20312
20467
|
this.notify('selection', { prop: 'redrawShape', value: { obj: this.objColl[this.objColl.length - 1] } });
|
|
20468
|
+
const shapeChangedArgs = { action: 'stroke-width', previousShapeSettings: extend({}, shapeSettings, {}, true),
|
|
20469
|
+
currentShapeSettings: extend({}, shapeSettings, {}, true) };
|
|
20470
|
+
shapeChangedArgs.currentShapeSettings.strokeWidth = this.activeObj.strokeSettings.strokeWidth;
|
|
20471
|
+
this.triggerShapeChanged(shapeChangedArgs);
|
|
20313
20472
|
}
|
|
20314
20473
|
else if (this.activeObj.shape && (this.activeObj.shape === 'path' &&
|
|
20315
20474
|
this.activeObj.pointColl.length === 0)) {
|
|
@@ -20327,6 +20486,9 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
20327
20486
|
* @returns {void}.
|
|
20328
20487
|
*/
|
|
20329
20488
|
updateStrokeColor(value) {
|
|
20489
|
+
const objt = { shapeSettingsObj: {} };
|
|
20490
|
+
this.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: objt } });
|
|
20491
|
+
const shapeSettings = objt['shapeSettingsObj'];
|
|
20330
20492
|
if (this.activeObj.shape && (this.activeObj.shape !== 'path' || (this.activeObj.shape === 'path' &&
|
|
20331
20493
|
this.activeObj.pointColl.length > 0))) {
|
|
20332
20494
|
this.notify('shape', { prop: 'pushActItemIntoObj' });
|
|
@@ -20359,6 +20521,10 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
20359
20521
|
this.activeObj.strokeSettings.strokeColor = value;
|
|
20360
20522
|
this.notify('shape', { prop: 'setStrokeSettings', value: { strokeSettings: null, strokeColor: this.activeObj.strokeSettings.strokeColor, fillColor: null, strokeWidth: null } });
|
|
20361
20523
|
}
|
|
20524
|
+
const shapeChangedArgs = { action: 'stroke-color', previousShapeSettings: extend({}, shapeSettings, {}, true),
|
|
20525
|
+
currentShapeSettings: extend({}, shapeSettings, {}, true) };
|
|
20526
|
+
shapeChangedArgs.currentShapeSettings.strokeColor = value;
|
|
20527
|
+
this.triggerShapeChanged(shapeChangedArgs);
|
|
20362
20528
|
}
|
|
20363
20529
|
/**
|
|
20364
20530
|
* Apply Shape fill color.
|
|
@@ -20368,6 +20534,9 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
20368
20534
|
* @returns {void}.
|
|
20369
20535
|
*/
|
|
20370
20536
|
updateFillColor(value) {
|
|
20537
|
+
const obj = { shapeSettingsObj: {} };
|
|
20538
|
+
this.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: obj } });
|
|
20539
|
+
const shapeSettings = obj['shapeSettingsObj'];
|
|
20371
20540
|
this.notify('shape', { prop: 'pushActItemIntoObj' });
|
|
20372
20541
|
const prevCropObj = extend({}, this.cropObj, {}, true);
|
|
20373
20542
|
const object = { currObj: {} };
|
|
@@ -20392,6 +20561,10 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
20392
20561
|
previousCropObj: prevCropObj, previousText: null,
|
|
20393
20562
|
currentText: null, previousFilter: null, isCircleCrop: null } });
|
|
20394
20563
|
this.notify('selection', { prop: 'redrawShape', value: { obj: this.objColl[this.objColl.length - 1] } });
|
|
20564
|
+
const shapeChangedArgs = { action: 'fill-color', previousShapeSettings: extend({}, shapeSettings, {}, true),
|
|
20565
|
+
currentShapeSettings: extend({}, shapeSettings, {}, true) };
|
|
20566
|
+
shapeChangedArgs.currentShapeSettings.fillColor = value;
|
|
20567
|
+
this.triggerShapeChanged(shapeChangedArgs);
|
|
20395
20568
|
}
|
|
20396
20569
|
/**
|
|
20397
20570
|
* Apply horizontal flip.
|
|
@@ -20588,6 +20761,10 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
20588
20761
|
if (isBlazor() && this.element.querySelector('.place-holder')) {
|
|
20589
20762
|
this.element.querySelector('.place-holder').remove();
|
|
20590
20763
|
}
|
|
20764
|
+
if (this.element.offsetWidth > 359 && this.element.querySelector('.e-ie-min-drop-content') && this.element.querySelector('.e-ie-drop-content')) {
|
|
20765
|
+
this.element.querySelector('.e-ie-min-drop-content').style.display = 'none';
|
|
20766
|
+
this.element.querySelector('.e-ie-drop-content').style.display = 'block';
|
|
20767
|
+
}
|
|
20591
20768
|
if (isBlazor() && this.element.querySelector('.e-ie-drop-area')) {
|
|
20592
20769
|
this.element.querySelector('.e-ie-drop-area').style.display = 'block';
|
|
20593
20770
|
}
|
|
@@ -20692,6 +20869,19 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
20692
20869
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function
|
|
20693
20870
|
updateToolbar(element, type, value) {
|
|
20694
20871
|
}
|
|
20872
|
+
/**
|
|
20873
|
+
* Trigger the shapeChanging event for after the shape applied.
|
|
20874
|
+
*
|
|
20875
|
+
* @param { ShapeChangeEventArgs } shapeChangedArgs - Specifies the shapeChaning event args.
|
|
20876
|
+
* @hidden
|
|
20877
|
+
* @returns {void}.
|
|
20878
|
+
*/
|
|
20879
|
+
triggerShapeChanged(shapeChangedArgs) {
|
|
20880
|
+
if (isBlazor() && this.events && this.events.shapeChanged.hasDelegate === true) {
|
|
20881
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
20882
|
+
this.dotNetRef.invokeMethodAsync('ShapeEventAsync', 'ShapeChanged', shapeChangedArgs);
|
|
20883
|
+
}
|
|
20884
|
+
}
|
|
20695
20885
|
};
|
|
20696
20886
|
__decorate([
|
|
20697
20887
|
Property('')
|
|
@@ -20942,6 +21132,33 @@ var ImageEditorCommand;
|
|
|
20942
21132
|
ImageEditorCommand["RotateRight"] = "RotateRight";
|
|
20943
21133
|
ImageEditorCommand["FlipHorizontal"] = "FlipHorizontal";
|
|
20944
21134
|
ImageEditorCommand["FlipVertical"] = "FlipVertical";
|
|
21135
|
+
ImageEditorCommand["Undo"] = "Undo";
|
|
21136
|
+
ImageEditorCommand["Redo"] = "Redo";
|
|
21137
|
+
ImageEditorCommand["None"] = "None";
|
|
21138
|
+
ImageEditorCommand["Mat"] = "Mat";
|
|
21139
|
+
ImageEditorCommand["Bevel"] = "Bevel";
|
|
21140
|
+
ImageEditorCommand["Inset"] = "Inset";
|
|
21141
|
+
ImageEditorCommand["Hook"] = "Hook";
|
|
21142
|
+
ImageEditorCommand["Finetune"] = "Finetune";
|
|
21143
|
+
ImageEditorCommand["Filter"] = "Filter";
|
|
21144
|
+
ImageEditorCommand["Frame"] = "Frame";
|
|
21145
|
+
ImageEditorCommand["Resize"] = "Resize";
|
|
21146
|
+
ImageEditorCommand["HorizontalFlip"] = "HorizontalFlip";
|
|
21147
|
+
ImageEditorCommand["VerticalFlip"] = "VerticalFlip";
|
|
21148
|
+
ImageEditorCommand["Brightness"] = "Brightness";
|
|
21149
|
+
ImageEditorCommand["Contrast"] = "Contrast";
|
|
21150
|
+
ImageEditorCommand["Hue"] = "Hue";
|
|
21151
|
+
ImageEditorCommand["Saturation"] = "Saturation";
|
|
21152
|
+
ImageEditorCommand["Opacity"] = "Opacity";
|
|
21153
|
+
ImageEditorCommand["Blur"] = "Blur";
|
|
21154
|
+
ImageEditorCommand["Exposure"] = "Exposure";
|
|
21155
|
+
ImageEditorCommand["Default"] = "Default";
|
|
21156
|
+
ImageEditorCommand["Chrome"] = "Chrome";
|
|
21157
|
+
ImageEditorCommand["Cold"] = "Cold";
|
|
21158
|
+
ImageEditorCommand["Warm"] = "Warm";
|
|
21159
|
+
ImageEditorCommand["Grayscale"] = "Grayscale";
|
|
21160
|
+
ImageEditorCommand["Sepia"] = "Sepia";
|
|
21161
|
+
ImageEditorCommand["Invert"] = "Invert";
|
|
20945
21162
|
})(ImageEditorCommand || (ImageEditorCommand = {}));
|
|
20946
21163
|
/**
|
|
20947
21164
|
* An enumeration of available image filter options.
|
|
@@ -21164,6 +21381,7 @@ class ToolbarModule {
|
|
|
21164
21381
|
W: 'W',
|
|
21165
21382
|
H: 'H',
|
|
21166
21383
|
DragText: 'Drag and drop your image here or',
|
|
21384
|
+
DropText: 'Drop your image here or',
|
|
21167
21385
|
BrowseText: 'Browse here...',
|
|
21168
21386
|
SupportText: 'Supports:',
|
|
21169
21387
|
Frame: 'Frame',
|