@syncfusion/ej2-image-editor 23.1.38 → 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 +9 -0
- package/dist/ej2-image-editor.umd.min.js +2 -2
- package/dist/ej2-image-editor.umd.min.js.map +1 -1
- package/dist/es6/ej2-image-editor.es2015.js +37 -5
- package/dist/es6/ej2-image-editor.es2015.js.map +1 -1
- package/dist/es6/ej2-image-editor.es5.js +37 -5
- package/dist/es6/ej2-image-editor.es5.js.map +1 -1
- package/dist/global/ej2-image-editor.min.js +2 -2
- package/dist/global/ej2-image-editor.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +7 -7
- package/src/image-editor/action/draw.js +5 -1
- package/src/image-editor/action/freehand-draw.js +5 -4
- package/src/image-editor/base/enum.d.ts +28 -1
- package/src/image-editor/base/enum.js +27 -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;
|
|
@@ -6257,7 +6261,7 @@ class FreehandDrawing {
|
|
|
6257
6261
|
EventHandler.add(canvas, 'mousemove touchmove', this.freehandMoveHandler, this);
|
|
6258
6262
|
const shapeSettings = { id: 'pen_' + (this.currFHDIdx + 1), type: ShapeType.FreehandDraw,
|
|
6259
6263
|
startX: this.freehandDownPoint.x, startY: this.freehandDownPoint.y,
|
|
6260
|
-
strokeColor: this.parent.activeObj.strokeSettings.strokeColor, strokeWidth: this.
|
|
6264
|
+
strokeColor: this.parent.activeObj.strokeSettings.strokeColor, strokeWidth: this.penStrokeWidth,
|
|
6261
6265
|
points: null };
|
|
6262
6266
|
const shapeChangingArgs = { action: 'draw-start', previousShapeSettings: shapeSettings,
|
|
6263
6267
|
currentShapeSettings: shapeSettings };
|
|
@@ -6314,7 +6318,7 @@ class FreehandDrawing {
|
|
|
6314
6318
|
currentText: null, previousFilter: null, isCircleCrop: null } });
|
|
6315
6319
|
const shapeSettings = { id: 'pen_' + (this.currFHDIdx + 1), type: ShapeType.FreehandDraw,
|
|
6316
6320
|
startX: this.freehandDownPoint.x, startY: this.freehandDownPoint.y,
|
|
6317
|
-
strokeColor: this.parent.activeObj.strokeSettings.strokeColor, strokeWidth: this.
|
|
6321
|
+
strokeColor: this.parent.activeObj.strokeSettings.strokeColor, strokeWidth: this.penStrokeWidth,
|
|
6318
6322
|
points: this.parent.pointColl[this.currFHDIdx].points };
|
|
6319
6323
|
const shapeChangingArgs = { action: 'draw-end', previousShapeSettings: shapeSettings,
|
|
6320
6324
|
currentShapeSettings: shapeSettings };
|
|
@@ -6335,6 +6339,7 @@ class FreehandDrawing {
|
|
|
6335
6339
|
y = e.touches[0].clientY - rect.top;
|
|
6336
6340
|
}
|
|
6337
6341
|
if (this.isFreehandDrawing) {
|
|
6342
|
+
this.upperContext.fillStyle = this.parent.activeObj.strokeSettings.strokeColor;
|
|
6338
6343
|
this.processPoint(x, y, false, this.upperContext);
|
|
6339
6344
|
}
|
|
6340
6345
|
}
|
|
@@ -7071,7 +7076,7 @@ class FreehandDrawing {
|
|
|
7071
7076
|
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
7072
7077
|
parent.dotNetRef.invokeMethodAsync('ShapeEventAsync', 'OnShape', shapeChangingArgs).then((shapeChangingArgs) => {
|
|
7073
7078
|
parent.activeObj.strokeSettings.strokeColor = shapeChangingArgs.currentShapeSettings.strokeColor;
|
|
7074
|
-
|
|
7079
|
+
this.penStrokeWidth = shapeChangingArgs.currentShapeSettings.strokeWidth;
|
|
7075
7080
|
if (this.fhdSelID) {
|
|
7076
7081
|
parent.pointColl[this.fhdSelIdx].strokeColor = shapeChangingArgs.currentShapeSettings.strokeColor;
|
|
7077
7082
|
parent.pointColl[this.fhdSelIdx].strokeWidth = shapeChangingArgs.currentShapeSettings.strokeWidth;
|
|
@@ -7087,7 +7092,7 @@ class FreehandDrawing {
|
|
|
7087
7092
|
else {
|
|
7088
7093
|
parent.trigger('shapeChanging', shapeChangingArgs);
|
|
7089
7094
|
parent.activeObj.strokeSettings.strokeColor = shapeChangingArgs.currentShapeSettings.strokeColor;
|
|
7090
|
-
|
|
7095
|
+
this.penStrokeWidth = shapeChangingArgs.currentShapeSettings.strokeWidth;
|
|
7091
7096
|
if (this.fhdSelID) {
|
|
7092
7097
|
parent.pointColl[this.fhdSelIdx].strokeColor = shapeChangingArgs.currentShapeSettings.strokeColor;
|
|
7093
7098
|
parent.pointColl[this.fhdSelIdx].strokeWidth = shapeChangingArgs.currentShapeSettings.strokeWidth;
|
|
@@ -21127,6 +21132,33 @@ var ImageEditorCommand;
|
|
|
21127
21132
|
ImageEditorCommand["RotateRight"] = "RotateRight";
|
|
21128
21133
|
ImageEditorCommand["FlipHorizontal"] = "FlipHorizontal";
|
|
21129
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";
|
|
21130
21162
|
})(ImageEditorCommand || (ImageEditorCommand = {}));
|
|
21131
21163
|
/**
|
|
21132
21164
|
* An enumeration of available image filter options.
|