@syncfusion/ej2-image-editor 23.1.36 → 23.1.38
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 +3 -3
- package/dist/ej2-image-editor.umd.min.js.map +1 -1
- package/dist/es6/ej2-image-editor.es2015.js +216 -30
- package/dist/es6/ej2-image-editor.es2015.js.map +1 -1
- package/dist/es6/ej2-image-editor.es5.js +233 -47
- 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 +8 -8
- package/src/image-editor/action/freehand-draw.d.ts +1 -0
- package/src/image-editor/action/freehand-draw.js +52 -26
- package/src/image-editor/action/selection.js +38 -3
- package/src/image-editor/action/shape.js +33 -16
- 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
package/dist/global/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 23.1.
|
|
4
|
-
* Copyright Syncfusion Inc. 2001 -
|
|
3
|
+
* version : 23.1.38
|
|
4
|
+
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
|
7
7
|
* licensing@syncfusion.com. Any infringement will be prosecuted under
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-image-editor@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-image-editor@
|
|
3
|
+
"_id": "@syncfusion/ej2-image-editor@23.1.36",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-A6bph2XTzzn8GAjli/kAtAz4JPSrDYTzAQF6UOa0I+RqOKB3/w2/7CBmLNKlQVFd3I5nyY45z1M26X0ua0+48w==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-image-editor",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"/@syncfusion/ej2-react-image-editor",
|
|
24
24
|
"/@syncfusion/ej2-vue-image-editor"
|
|
25
25
|
],
|
|
26
|
-
"_resolved": "https://nexus.syncfusion.com/repository/ej2-
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-image-editor/-/ej2-image-editor-23.1.36.tgz",
|
|
27
|
+
"_shasum": "b13260748329c7b0412240bdd9714f2bbeb97281",
|
|
28
28
|
"_spec": "@syncfusion/ej2-image-editor@*",
|
|
29
29
|
"_where": "/jenkins/workspace/elease-automation_release_23.1.1/packages/included",
|
|
30
30
|
"author": {
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
},
|
|
33
33
|
"bundleDependencies": false,
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@syncfusion/ej2-base": "~23.1.
|
|
35
|
+
"@syncfusion/ej2-base": "~23.1.38",
|
|
36
36
|
"@syncfusion/ej2-buttons": "~23.1.36",
|
|
37
|
-
"@syncfusion/ej2-inputs": "~23.1.
|
|
37
|
+
"@syncfusion/ej2-inputs": "~23.1.38",
|
|
38
38
|
"@syncfusion/ej2-navigations": "~23.1.36",
|
|
39
|
-
"@syncfusion/ej2-popups": "~23.1.
|
|
39
|
+
"@syncfusion/ej2-popups": "~23.1.38",
|
|
40
40
|
"@syncfusion/ej2-splitbuttons": "~23.1.36"
|
|
41
41
|
},
|
|
42
42
|
"deprecated": false,
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"url": "https://github.com/syncfusion/ej2-javascript-ui-controls/tree/master/controls/imageeditor"
|
|
68
68
|
},
|
|
69
69
|
"typings": "index.d.ts",
|
|
70
|
-
"version": "23.1.
|
|
70
|
+
"version": "23.1.38",
|
|
71
71
|
"sideEffects": false,
|
|
72
72
|
"homepage": "https://www.syncfusion.com/javascript-ui-controls"
|
|
73
73
|
}
|
|
@@ -251,6 +251,13 @@ var FreehandDrawing = /** @class */ (function () {
|
|
|
251
251
|
}
|
|
252
252
|
this.isFreehandPointMoved = false;
|
|
253
253
|
EventHandler.add(canvas, 'mousemove touchmove', this.freehandMoveHandler, this);
|
|
254
|
+
var shapeSettings = { id: 'pen_' + (this.currFHDIdx + 1), type: ShapeType.FreehandDraw,
|
|
255
|
+
startX: this.freehandDownPoint.x, startY: this.freehandDownPoint.y,
|
|
256
|
+
strokeColor: this.parent.activeObj.strokeSettings.strokeColor, strokeWidth: this.parent.activeObj.strokeSettings.strokeWidth,
|
|
257
|
+
points: null };
|
|
258
|
+
var shapeChangingArgs = { action: 'draw-start', previousShapeSettings: shapeSettings,
|
|
259
|
+
currentShapeSettings: shapeSettings };
|
|
260
|
+
this.triggerShapeChanging(shapeChangingArgs);
|
|
254
261
|
};
|
|
255
262
|
FreehandDrawing.prototype.freehandUpHandler = function (e, canvas, context) {
|
|
256
263
|
var rect = canvas.getBoundingClientRect();
|
|
@@ -295,13 +302,20 @@ var FreehandDrawing = /** @class */ (function () {
|
|
|
295
302
|
this.selPoints = [];
|
|
296
303
|
this.pointCounter = 0;
|
|
297
304
|
parent.freehandCounter++;
|
|
298
|
-
this.currFHDIdx++;
|
|
299
305
|
this.isFreehandDrawing = false;
|
|
300
306
|
parent.notify('undo-redo', { prop: 'updateUndoRedoColl', onPropertyChange: false,
|
|
301
307
|
value: { operation: 'freehand-draw', previousObj: prevObj, previousObjColl: prevObj.objColl,
|
|
302
308
|
previousPointColl: prevObj.pointColl, previousSelPointColl: prevObj.selPointColl,
|
|
303
309
|
previousCropObj: prevCropObj, previousText: null,
|
|
304
310
|
currentText: null, previousFilter: null, isCircleCrop: null } });
|
|
311
|
+
var shapeSettings = { id: 'pen_' + (this.currFHDIdx + 1), type: ShapeType.FreehandDraw,
|
|
312
|
+
startX: this.freehandDownPoint.x, startY: this.freehandDownPoint.y,
|
|
313
|
+
strokeColor: this.parent.activeObj.strokeSettings.strokeColor, strokeWidth: this.parent.activeObj.strokeSettings.strokeWidth,
|
|
314
|
+
points: this.parent.pointColl[this.currFHDIdx].points };
|
|
315
|
+
var shapeChangingArgs = { action: 'draw-end', previousShapeSettings: shapeSettings,
|
|
316
|
+
currentShapeSettings: shapeSettings };
|
|
317
|
+
this.triggerShapeChanging(shapeChangingArgs);
|
|
318
|
+
this.currFHDIdx++;
|
|
305
319
|
};
|
|
306
320
|
FreehandDrawing.prototype.freehandMoveHandler = function (e) {
|
|
307
321
|
this.isFreehandPointMoved = true;
|
|
@@ -637,7 +651,6 @@ var FreehandDrawing = /** @class */ (function () {
|
|
|
637
651
|
}
|
|
638
652
|
};
|
|
639
653
|
FreehandDrawing.prototype.selectFhd = function (index) {
|
|
640
|
-
var _this = this;
|
|
641
654
|
var parent = this.parent;
|
|
642
655
|
parent.notify('selection', { prop: 'setFreehandDrawEditing', onPropertyChange: false, value: { bool: true } });
|
|
643
656
|
if (index || index === 0) {
|
|
@@ -668,30 +681,7 @@ var FreehandDrawing = /** @class */ (function () {
|
|
|
668
681
|
points: parent.pointColl[this.fhdSelIdx].points };
|
|
669
682
|
var shapeChangingArgs = { action: 'select', previousShapeSettings: shapeSettings,
|
|
670
683
|
currentShapeSettings: shapeSettings };
|
|
671
|
-
|
|
672
|
-
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
673
|
-
parent.dotNetRef.invokeMethodAsync('ShapeEventAsync', 'OnShape', shapeChangingArgs).then(function (shapeChangingArgs) {
|
|
674
|
-
parent.activeObj.strokeSettings.strokeColor = parent.pointColl[_this.fhdSelIdx].strokeColor =
|
|
675
|
-
shapeChangingArgs.currentShapeSettings.strokeColor;
|
|
676
|
-
parent.activeObj.strokeSettings.strokeWidth = parent.pointColl[_this.fhdSelIdx].strokeWidth =
|
|
677
|
-
shapeChangingArgs.currentShapeSettings.strokeWidth;
|
|
678
|
-
parent.pointColl[_this.fhdSelIdx].points = shapeChangingArgs.currentShapeSettings.points;
|
|
679
|
-
_this.freehandRedraw(_this.upperContext);
|
|
680
|
-
parent.updateToolbar(parent.element, 'imageLoaded');
|
|
681
|
-
parent.updateToolbar(parent.element, 'pen');
|
|
682
|
-
});
|
|
683
|
-
}
|
|
684
|
-
else {
|
|
685
|
-
parent.trigger('shapeChanging', shapeChangingArgs);
|
|
686
|
-
parent.activeObj.strokeSettings.strokeColor = parent.pointColl[this.fhdSelIdx].strokeColor =
|
|
687
|
-
shapeChangingArgs.currentShapeSettings.strokeColor;
|
|
688
|
-
parent.activeObj.strokeSettings.strokeWidth = parent.pointColl[this.fhdSelIdx].strokeWidth =
|
|
689
|
-
shapeChangingArgs.currentShapeSettings.strokeWidth;
|
|
690
|
-
parent.pointColl[this.fhdSelIdx].points = shapeChangingArgs.currentShapeSettings.points;
|
|
691
|
-
this.freehandRedraw(this.upperContext);
|
|
692
|
-
parent.notify('toolbar', { prop: 'refresh-toolbar', onPropertyChange: false, value: { type: 'pen',
|
|
693
|
-
isApplyBtn: null, isCropping: null, isZooming: null, cType: null } });
|
|
694
|
-
}
|
|
684
|
+
this.triggerShapeChanging(shapeChangingArgs);
|
|
695
685
|
}
|
|
696
686
|
else {
|
|
697
687
|
parent.okBtn();
|
|
@@ -1071,6 +1061,42 @@ var FreehandDrawing = /** @class */ (function () {
|
|
|
1071
1061
|
}
|
|
1072
1062
|
}
|
|
1073
1063
|
};
|
|
1064
|
+
FreehandDrawing.prototype.triggerShapeChanging = function (shapeChangingArgs) {
|
|
1065
|
+
var _this = this;
|
|
1066
|
+
var parent = this.parent;
|
|
1067
|
+
if (isBlazor() && parent.events && parent.events.shapeChanging.hasDelegate === true) {
|
|
1068
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
1069
|
+
parent.dotNetRef.invokeMethodAsync('ShapeEventAsync', 'OnShape', shapeChangingArgs).then(function (shapeChangingArgs) {
|
|
1070
|
+
parent.activeObj.strokeSettings.strokeColor = shapeChangingArgs.currentShapeSettings.strokeColor;
|
|
1071
|
+
parent.activeObj.strokeSettings.strokeWidth = shapeChangingArgs.currentShapeSettings.strokeWidth;
|
|
1072
|
+
if (_this.fhdSelID) {
|
|
1073
|
+
parent.pointColl[_this.fhdSelIdx].strokeColor = shapeChangingArgs.currentShapeSettings.strokeColor;
|
|
1074
|
+
parent.pointColl[_this.fhdSelIdx].strokeWidth = shapeChangingArgs.currentShapeSettings.strokeWidth;
|
|
1075
|
+
parent.pointColl[_this.fhdSelIdx].points = shapeChangingArgs.currentShapeSettings.points;
|
|
1076
|
+
}
|
|
1077
|
+
if (shapeChangingArgs.action === 'select') {
|
|
1078
|
+
_this.freehandRedraw(_this.upperContext);
|
|
1079
|
+
parent.updateToolbar(parent.element, 'imageLoaded');
|
|
1080
|
+
parent.updateToolbar(parent.element, 'pen');
|
|
1081
|
+
}
|
|
1082
|
+
});
|
|
1083
|
+
}
|
|
1084
|
+
else {
|
|
1085
|
+
parent.trigger('shapeChanging', shapeChangingArgs);
|
|
1086
|
+
parent.activeObj.strokeSettings.strokeColor = shapeChangingArgs.currentShapeSettings.strokeColor;
|
|
1087
|
+
parent.activeObj.strokeSettings.strokeWidth = shapeChangingArgs.currentShapeSettings.strokeWidth;
|
|
1088
|
+
if (this.fhdSelID) {
|
|
1089
|
+
parent.pointColl[this.fhdSelIdx].strokeColor = shapeChangingArgs.currentShapeSettings.strokeColor;
|
|
1090
|
+
parent.pointColl[this.fhdSelIdx].strokeWidth = shapeChangingArgs.currentShapeSettings.strokeWidth;
|
|
1091
|
+
parent.pointColl[this.fhdSelIdx].points = shapeChangingArgs.currentShapeSettings.points;
|
|
1092
|
+
}
|
|
1093
|
+
if (shapeChangingArgs.action === 'select') {
|
|
1094
|
+
this.freehandRedraw(this.upperContext);
|
|
1095
|
+
parent.notify('toolbar', { prop: 'refresh-toolbar', onPropertyChange: false, value: { type: 'pen',
|
|
1096
|
+
isApplyBtn: null, isCropping: null, isZooming: null, cType: null } });
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
};
|
|
1074
1100
|
return FreehandDrawing;
|
|
1075
1101
|
}());
|
|
1076
1102
|
export { FreehandDrawing };
|
|
@@ -256,6 +256,9 @@ var Selection = /** @class */ (function () {
|
|
|
256
256
|
case 'upgradeImageQuality':
|
|
257
257
|
this.upgradeImageQuality();
|
|
258
258
|
break;
|
|
259
|
+
case 'triggerShapeChange':
|
|
260
|
+
this.triggerShapeChange(args.value['shapeResizingArgs'], args.value['shapeMovingArgs'], args.value['type']);
|
|
261
|
+
break;
|
|
259
262
|
}
|
|
260
263
|
};
|
|
261
264
|
Selection.prototype.getModuleName = function () {
|
|
@@ -1078,8 +1081,14 @@ var Selection = /** @class */ (function () {
|
|
|
1078
1081
|
parent.activeObj.activePoint.width = parent.activeObj.activePoint.endX - parent.activeObj.activePoint.startX;
|
|
1079
1082
|
parent.activeObj.activePoint.height = parent.activeObj.activePoint.endY - parent.activeObj.activePoint.startY;
|
|
1080
1083
|
var currentShapeSettings = this.updatePrevShapeSettings();
|
|
1081
|
-
shapeResizingArgs
|
|
1082
|
-
|
|
1084
|
+
if (!isNullOrUndefined(this.shapeResizingArgs) && !isNullOrUndefined(this.shapeMovingArgs)) {
|
|
1085
|
+
shapeResizingArgs.currentShapeSettings = this.shapeResizingArgs.currentShapeSettings = currentShapeSettings;
|
|
1086
|
+
shapeMovingArgs.currentShapeSettings = this.shapeMovingArgs.currentShapeSettings = currentShapeSettings;
|
|
1087
|
+
}
|
|
1088
|
+
else {
|
|
1089
|
+
shapeResizingArgs.currentShapeSettings = currentShapeSettings;
|
|
1090
|
+
shapeMovingArgs.currentShapeSettings = currentShapeSettings;
|
|
1091
|
+
}
|
|
1083
1092
|
if (type === 'resize') {
|
|
1084
1093
|
this.isCropSelection = false;
|
|
1085
1094
|
var splitWords = void 0;
|
|
@@ -1134,6 +1143,20 @@ var Selection = /** @class */ (function () {
|
|
|
1134
1143
|
}
|
|
1135
1144
|
}
|
|
1136
1145
|
}
|
|
1146
|
+
else if (type === 'mouse-down' || type === 'mouse-up') {
|
|
1147
|
+
if (isBlazor() && parent.events && parent.events.shapeChanging.hasDelegate === true) {
|
|
1148
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
1149
|
+
parent.dotNetRef.invokeMethodAsync('ShapeEventAsync', 'OnShape', shapeResizingArgs).then(function (shapeResizingArgs) {
|
|
1150
|
+
parent.notify('shape', { prop: 'updateShapeChangeEventArgs', onPropertyChange: false,
|
|
1151
|
+
value: { shapeSettings: shapeResizingArgs.currentShapeSettings } });
|
|
1152
|
+
});
|
|
1153
|
+
}
|
|
1154
|
+
else {
|
|
1155
|
+
parent.trigger('shapeChanging', shapeResizingArgs);
|
|
1156
|
+
parent.notify('shape', { prop: 'updateShapeChangeEventArgs', onPropertyChange: false,
|
|
1157
|
+
value: { shapeSettings: shapeResizingArgs.currentShapeSettings } });
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1137
1160
|
else {
|
|
1138
1161
|
if (isBlazor() && isNullOrUndefined(this.parent.eventType) && parent.events &&
|
|
1139
1162
|
parent.events.onShapeDragStart.hasDelegate === true) {
|
|
@@ -2845,6 +2868,12 @@ var Selection = /** @class */ (function () {
|
|
|
2845
2868
|
parent.activeObj.activePoint.endX = parent.activeObj.activePoint.startX;
|
|
2846
2869
|
parent.activeObj.activePoint.endY = parent.activeObj.activePoint.startY;
|
|
2847
2870
|
parent.currObjType.isDragging = true;
|
|
2871
|
+
var previousShapeSettings = this.updatePrevShapeSettings();
|
|
2872
|
+
var shapeResizingArgs = { action: 'draw-start', previousShapeSettings: previousShapeSettings };
|
|
2873
|
+
var shapeMovingArgs = { action: 'move', previousShapeSettings: previousShapeSettings };
|
|
2874
|
+
this.shapeResizingArgs = shapeResizingArgs;
|
|
2875
|
+
this.shapeMovingArgs = shapeMovingArgs;
|
|
2876
|
+
this.triggerShapeChange(shapeResizingArgs, shapeMovingArgs, 'mouse-down');
|
|
2848
2877
|
return;
|
|
2849
2878
|
}
|
|
2850
2879
|
parent.notify('draw', { prop: 'resetFrameZoom', onPropertyChange: false });
|
|
@@ -3249,7 +3278,7 @@ var Selection = /** @class */ (function () {
|
|
|
3249
3278
|
}
|
|
3250
3279
|
if (this.currentDrawingShape === 'path') {
|
|
3251
3280
|
var elem = e.srcElement;
|
|
3252
|
-
if (e.currentTarget !== parent.upperCanvas && e.currentTarget !== parent.lowerCanvas &&
|
|
3281
|
+
if (e.currentTarget !== parent.upperCanvas && e.currentTarget !== parent.lowerCanvas && parent.activeObj.pointColl.length > 0 &&
|
|
3253
3282
|
(elem.classList.contains('e-upload-icon') || elem.parentElement.id === parent.element.id + '_zoomIn' ||
|
|
3254
3283
|
elem.parentElement.id === parent.element.id + '_zoomOut' || elem.parentElement.id === parent.element.id + '_annotationBtn' ||
|
|
3255
3284
|
elem.parentElement.id === parent.element.id + '_borderColorBtn' || elem.parentElement.id === parent.element.id + '_borderWidthBtn' ||
|
|
@@ -3280,6 +3309,12 @@ var Selection = /** @class */ (function () {
|
|
|
3280
3309
|
if (parent.activeObj.activePoint.width === 0 && parent.activeObj.activePoint.height === 0) {
|
|
3281
3310
|
parent.notify('draw', { prop: 'performCancel', value: { isContextualToolbar: null } });
|
|
3282
3311
|
}
|
|
3312
|
+
var previousShapeSettings = this.updatePrevShapeSettings();
|
|
3313
|
+
var shapeResizingArgs = { action: 'draw-end', previousShapeSettings: previousShapeSettings };
|
|
3314
|
+
var shapeMovingArgs = { action: 'move', previousShapeSettings: previousShapeSettings };
|
|
3315
|
+
this.shapeResizingArgs = shapeResizingArgs;
|
|
3316
|
+
this.shapeMovingArgs = shapeMovingArgs;
|
|
3317
|
+
this.triggerShapeChange(shapeResizingArgs, shapeMovingArgs, 'mouse-up');
|
|
3283
3318
|
}
|
|
3284
3319
|
this.adjustActObjForLineArrow();
|
|
3285
3320
|
this.updPtCollForShpRot();
|
|
@@ -752,6 +752,9 @@ var Shape = /** @class */ (function () {
|
|
|
752
752
|
parent.activeObj.activePoint.endY = parent.activeObj.activePoint.startY + parent.activeObj.activePoint.height;
|
|
753
753
|
parent.activeObj.strokeSettings.strokeColor = shapeSettings.strokeColor;
|
|
754
754
|
parent.activeObj.strokeSettings.fillColor = shapeSettings.fillColor;
|
|
755
|
+
if (isNullOrUndefined(shapeSettings.degree)) {
|
|
756
|
+
shapeSettings.degree = 0;
|
|
757
|
+
}
|
|
755
758
|
switch (parent.activeObj.shape) {
|
|
756
759
|
case 'ellipse':
|
|
757
760
|
parent.activeObj.activePoint.width = shapeSettings.radius * 2;
|
|
@@ -1582,6 +1585,13 @@ var Shape = /** @class */ (function () {
|
|
|
1582
1585
|
else {
|
|
1583
1586
|
parent.updateToolbar(parent.element, 'quickAccessToolbar', parent.activeObj.shape);
|
|
1584
1587
|
}
|
|
1588
|
+
var obj_1 = { shapeSettingsObj: {} };
|
|
1589
|
+
parent.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: obj_1 } });
|
|
1590
|
+
var shapeSettings = obj_1['shapeSettingsObj'];
|
|
1591
|
+
var shapeResizingArgs = { action: 'draw-end', previousShapeSettings: shapeSettings };
|
|
1592
|
+
var shapeMovingArgs = { action: 'move', previousShapeSettings: shapeSettings };
|
|
1593
|
+
parent.notify('selection', { prop: 'triggerShapeChange', onPropertyChange: false,
|
|
1594
|
+
value: { shapeResizingArgs: shapeResizingArgs, shapeMovingArgs: shapeMovingArgs, type: 'mouse-up' } });
|
|
1585
1595
|
}
|
|
1586
1596
|
}
|
|
1587
1597
|
};
|
|
@@ -1751,10 +1761,10 @@ var Shape = /** @class */ (function () {
|
|
|
1751
1761
|
value: { width: this.shapeImg.width, height: this.shapeImg.height, obj: dimObj, isImgShape: null } });
|
|
1752
1762
|
if (width && height) {
|
|
1753
1763
|
if (isAspectRatio) {
|
|
1754
|
-
var
|
|
1764
|
+
var obj_2 = { ratio: null };
|
|
1755
1765
|
parent.notify('selection', { prop: 'findImageRatio', onPropertyChange: false,
|
|
1756
|
-
value: { width: this.shapeImg.width, height: this.shapeImg.height, obj:
|
|
1757
|
-
dimObj = this.resizeImage(width,
|
|
1766
|
+
value: { width: this.shapeImg.width, height: this.shapeImg.height, obj: obj_2 } });
|
|
1767
|
+
dimObj = this.resizeImage(width, obj_2['ratio']);
|
|
1758
1768
|
}
|
|
1759
1769
|
else {
|
|
1760
1770
|
dimObj = { width: width, height: height };
|
|
@@ -1767,10 +1777,10 @@ var Shape = /** @class */ (function () {
|
|
|
1767
1777
|
value: { width: this.shapeImg.width, height: this.shapeImg.height, obj: dimObj, isImgShape: true } });
|
|
1768
1778
|
if (width && height) {
|
|
1769
1779
|
if (isAspectRatio) {
|
|
1770
|
-
var
|
|
1780
|
+
var obj_3 = { ratio: null };
|
|
1771
1781
|
parent.notify('selection', { prop: 'findImageRatio', onPropertyChange: false,
|
|
1772
|
-
value: { width: this.shapeImg.width, height: this.shapeImg.height, obj:
|
|
1773
|
-
dimObj = this.resizeImage(width,
|
|
1782
|
+
value: { width: this.shapeImg.width, height: this.shapeImg.height, obj: obj_3 } });
|
|
1783
|
+
dimObj = this.resizeImage(width, obj_3['ratio']);
|
|
1774
1784
|
}
|
|
1775
1785
|
else {
|
|
1776
1786
|
dimObj = { width: width, height: height };
|
|
@@ -2078,6 +2088,9 @@ var Shape = /** @class */ (function () {
|
|
|
2078
2088
|
};
|
|
2079
2089
|
Shape.prototype.applyFontStyle = function (item) {
|
|
2080
2090
|
var parent = this.parent;
|
|
2091
|
+
var obj = { shapeSettingsObj: {} };
|
|
2092
|
+
parent.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: obj } });
|
|
2093
|
+
var shapeSettings = obj['shapeSettingsObj'];
|
|
2081
2094
|
this.pushActItemIntoObj();
|
|
2082
2095
|
var objColl = extend([], parent.objColl, [], true);
|
|
2083
2096
|
parent.objColl.pop();
|
|
@@ -2101,6 +2114,10 @@ var Shape = /** @class */ (function () {
|
|
|
2101
2114
|
this.updateFontStyle(item, objColl, 'bold', 'italic');
|
|
2102
2115
|
break;
|
|
2103
2116
|
}
|
|
2117
|
+
var shapeChangedArgs = { action: 'font-style', previousShapeSettings: extend({}, shapeSettings, {}, true),
|
|
2118
|
+
currentShapeSettings: extend({}, shapeSettings, {}, true) };
|
|
2119
|
+
shapeChangedArgs.currentShapeSettings.fontStyle = [item];
|
|
2120
|
+
parent.triggerShapeChanged(shapeChangedArgs);
|
|
2104
2121
|
};
|
|
2105
2122
|
Shape.prototype.updateFontStyle = function (item, objColl, fontWeight, fontStyle) {
|
|
2106
2123
|
var parent = this.parent;
|
|
@@ -2464,14 +2481,14 @@ var Shape = /** @class */ (function () {
|
|
|
2464
2481
|
if (!parent.disabled && parent.isImageLoaded) {
|
|
2465
2482
|
this.applyActObj();
|
|
2466
2483
|
if (id.split('_')[0] === 'shape') {
|
|
2467
|
-
var
|
|
2484
|
+
var obj_4;
|
|
2468
2485
|
for (var i = 0, len = parent.objColl.length; i < len; i++) {
|
|
2469
2486
|
if (parent.objColl[i].currIndex === id) {
|
|
2470
|
-
|
|
2487
|
+
obj_4 = extend({}, parent.objColl[i], {}, true);
|
|
2471
2488
|
break;
|
|
2472
2489
|
}
|
|
2473
2490
|
}
|
|
2474
|
-
shapeDetails = this.getObjDetails(
|
|
2491
|
+
shapeDetails = this.getObjDetails(obj_4);
|
|
2475
2492
|
}
|
|
2476
2493
|
else if (id.split('_')[0] === 'pen') {
|
|
2477
2494
|
shapeDetails = this.getFreehandDrawDetails(parseInt(id.split('_')[1], 10) - 1);
|
|
@@ -2623,19 +2640,19 @@ var Shape = /** @class */ (function () {
|
|
|
2623
2640
|
if (!parent.disabled && parent.isImageLoaded) {
|
|
2624
2641
|
this.applyActObj();
|
|
2625
2642
|
if (id.split('_')[0] === 'shape') {
|
|
2626
|
-
var
|
|
2643
|
+
var obj_5;
|
|
2627
2644
|
for (var i = 0, len = parent.objColl.length; i < len; i++) {
|
|
2628
2645
|
if (parent.objColl[i].currIndex === id) {
|
|
2629
|
-
|
|
2646
|
+
obj_5 = extend({}, parent.objColl[i], {}, true);
|
|
2630
2647
|
break;
|
|
2631
2648
|
}
|
|
2632
2649
|
}
|
|
2633
|
-
if (isNullOrUndefined(
|
|
2650
|
+
if (isNullOrUndefined(obj_5)) {
|
|
2634
2651
|
isSelected = false;
|
|
2635
2652
|
}
|
|
2636
2653
|
else {
|
|
2637
2654
|
isSelected = true;
|
|
2638
|
-
parent.activeObj =
|
|
2655
|
+
parent.activeObj = obj_5;
|
|
2639
2656
|
var object = { canvasFilter: null };
|
|
2640
2657
|
parent.notify('toolbar', { prop: 'getCanvasFilter', onPropertyChange: false, value: { obj: object } });
|
|
2641
2658
|
this.lowerContext.filter = object['canvasFilter'];
|
|
@@ -2674,9 +2691,9 @@ var Shape = /** @class */ (function () {
|
|
|
2674
2691
|
if (object['bool']) {
|
|
2675
2692
|
parent.okBtn();
|
|
2676
2693
|
}
|
|
2677
|
-
var
|
|
2678
|
-
parent.notify('freehand-draw', { prop: 'isFHDIdx', value: { index: parseInt(id.split('_')[1], 10) - 1, obj:
|
|
2679
|
-
if (
|
|
2694
|
+
var obj_6 = { isIndex: false };
|
|
2695
|
+
parent.notify('freehand-draw', { prop: 'isFHDIdx', value: { index: parseInt(id.split('_')[1], 10) - 1, obj: obj_6 } });
|
|
2696
|
+
if (obj_6['isIndex']) {
|
|
2680
2697
|
isSelected = true;
|
|
2681
2698
|
parent.notify('freehand-draw', { prop: 'selectFhd', value: { id: id } });
|
|
2682
2699
|
if (!isBlazor()) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, NotifyPropertyChanges, INotifyPropertyChanged, Property, addClass, removeClass, ModuleDeclaration, extend, isBlazor, BlazorDotnetObject } from '@syncfusion/ej2-base';
|
|
1
|
+
import { Component, NotifyPropertyChanges, INotifyPropertyChanged, Property, addClass, removeClass, ModuleDeclaration, extend, isBlazor, BlazorDotnetObject } from '@syncfusion/ej2-base';
|
|
2
2
|
import {ComponentModel} from '@syncfusion/ej2-base';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -1424,4 +1424,12 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
|
|
|
1424
1424
|
* @returns {void}.
|
|
1425
1425
|
*/
|
|
1426
1426
|
updateToolbar(element: HTMLDivElement, type: string, value?: string): void;
|
|
1427
|
+
/**
|
|
1428
|
+
* Trigger the shapeChanging event for after the shape applied.
|
|
1429
|
+
*
|
|
1430
|
+
* @param { ShapeChangeEventArgs } shapeChangedArgs - Specifies the shapeChaning event args.
|
|
1431
|
+
* @hidden
|
|
1432
|
+
* @returns {void}.
|
|
1433
|
+
*/
|
|
1434
|
+
triggerShapeChanged(shapeChangedArgs: ShapeChangeEventArgs): void;
|
|
1427
1435
|
}
|