@syncfusion/ej2-image-editor 30.2.4 → 30.2.5
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/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 +36 -4
- package/dist/es6/ej2-image-editor.es2015.js.map +1 -1
- package/dist/es6/ej2-image-editor.es5.js +36 -4
- 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 +3 -3
- package/src/image-editor/action/export.js +1 -1
- package/src/image-editor/action/freehand-draw.d.ts +1 -0
- package/src/image-editor/action/freehand-draw.js +25 -3
- package/src/image-editor/action/undo-redo.js +10 -0
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 30.2.
|
|
3
|
+
* version : 30.2.5
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2024. 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
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncfusion/ej2-image-editor",
|
|
3
|
-
"version": "30.2.
|
|
3
|
+
"version": "30.2.5",
|
|
4
4
|
"description": "Essential JS 2 ImageEditor",
|
|
5
5
|
"author": "Syncfusion Inc.",
|
|
6
6
|
"license": "SEE LICENSE IN license",
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@syncfusion/ej2-base": "~30.2.4",
|
|
12
12
|
"@syncfusion/ej2-buttons": "~30.2.4",
|
|
13
|
-
"@syncfusion/ej2-dropdowns": "~30.2.
|
|
13
|
+
"@syncfusion/ej2-dropdowns": "~30.2.5",
|
|
14
14
|
"@syncfusion/ej2-inputs": "~30.2.4",
|
|
15
|
-
"@syncfusion/ej2-navigations": "~30.2.
|
|
15
|
+
"@syncfusion/ej2-navigations": "~30.2.5",
|
|
16
16
|
"@syncfusion/ej2-popups": "~30.2.4",
|
|
17
17
|
"@syncfusion/ej2-splitbuttons": "~30.2.4"
|
|
18
18
|
},
|
|
@@ -82,7 +82,7 @@ var Export = /** @class */ (function () {
|
|
|
82
82
|
this.toSVGImg(fileName);
|
|
83
83
|
}
|
|
84
84
|
else {
|
|
85
|
-
this.toBlobFn(fileName, lowerCaseType, imgQuality);
|
|
85
|
+
this.toBlobFn(fileName, lowerCaseType, observableSaveArgs.imageQuality || imgQuality);
|
|
86
86
|
}
|
|
87
87
|
var saved = { fileName: fileName ? fileName : imageName, fileType: type };
|
|
88
88
|
parent.trigger('saved', saved);
|
|
@@ -149,6 +149,15 @@ var FreehandDrawing = /** @class */ (function () {
|
|
|
149
149
|
case 'resetFreehandDrawSelectedId':
|
|
150
150
|
this.fhdSelID = null;
|
|
151
151
|
break;
|
|
152
|
+
case 'getFHDSelected':
|
|
153
|
+
args.value['obj']['isSelected'] = (this.parent.pointColl[this.fhdSelIdx] && this.parent.pointColl[this.fhdSelIdx].isSelected) ? this.parent.pointColl[this.fhdSelIdx].isSelected : false;
|
|
154
|
+
break;
|
|
155
|
+
case 'resetFHDIdx':
|
|
156
|
+
this.fhdHovIdx = this.fhdSelID = this.fhdSelIdx = null;
|
|
157
|
+
break;
|
|
158
|
+
case 'getHighestOrder':
|
|
159
|
+
this.getHighestOrder();
|
|
160
|
+
break;
|
|
152
161
|
case 'getTempFreeHandDrawEditingStyles':
|
|
153
162
|
args.value['obj']['tempFreeHandDrawEditingStyles'] = this.tempFHDStyles;
|
|
154
163
|
break;
|
|
@@ -331,10 +340,11 @@ var FreehandDrawing = /** @class */ (function () {
|
|
|
331
340
|
parent.notify('freehand-draw', { prop: 'getSelPointColl', onPropertyChange: false, value: { obj: selPointCollObj } });
|
|
332
341
|
prevObj.selPointColl = extend([], selPointCollObj['selPointColl'], [], true);
|
|
333
342
|
var fhCnt = parent.freehandCounter;
|
|
334
|
-
var
|
|
343
|
+
var penIndex = this.getHighestOrder();
|
|
344
|
+
var order = parent.objColl.length + penIndex + 1;
|
|
335
345
|
parent.pointColl[fhCnt] = { points: extend([], parent.points), strokeColor: parent.activeObj.strokeSettings.strokeColor,
|
|
336
346
|
strokeWidth: this.penStrokeWidth, flipState: parent.transform.currFlipState,
|
|
337
|
-
id: 'pen_' + (
|
|
347
|
+
id: 'pen_' + (penIndex + 1), order: order };
|
|
338
348
|
parent.points = [];
|
|
339
349
|
this.dummyPoints = [];
|
|
340
350
|
this.selPointColl[fhCnt] = { points: extend([], this.selPoints) };
|
|
@@ -349,7 +359,7 @@ var FreehandDrawing = /** @class */ (function () {
|
|
|
349
359
|
previousCropObj: prevCropObj, previousText: null,
|
|
350
360
|
currentText: null, previousFilter: null, isCircleCrop: null } });
|
|
351
361
|
}
|
|
352
|
-
var shapeSettings = { id: 'pen_' + (
|
|
362
|
+
var shapeSettings = { id: 'pen_' + (penIndex + 1), type: ShapeType.FreehandDraw,
|
|
353
363
|
startX: this.freehandDownPoint.x, startY: this.freehandDownPoint.y,
|
|
354
364
|
strokeColor: parent.activeObj.strokeSettings.strokeColor, strokeWidth: this.penStrokeWidth,
|
|
355
365
|
points: parent.pointColl[this.currFHDIdx].points, index: order };
|
|
@@ -358,6 +368,17 @@ var FreehandDrawing = /** @class */ (function () {
|
|
|
358
368
|
this.triggerShapeChanging(shapeChangingArgs);
|
|
359
369
|
this.currFHDIdx++;
|
|
360
370
|
};
|
|
371
|
+
FreehandDrawing.prototype.getHighestOrder = function () {
|
|
372
|
+
var parent = this.parent;
|
|
373
|
+
var index = 0;
|
|
374
|
+
for (var i = 0; i < parent.pointColl.length; i++) {
|
|
375
|
+
var value = parseInt(parent.pointColl[i].id.split('_')[1], 10);
|
|
376
|
+
if (index < value) {
|
|
377
|
+
index = value;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
return index;
|
|
381
|
+
};
|
|
361
382
|
FreehandDrawing.prototype.freehandMoveHandler = function (e) {
|
|
362
383
|
this.isFreehandPointMoved = true;
|
|
363
384
|
var rect = this.parent.upperCanvas.getBoundingClientRect();
|
|
@@ -746,6 +767,7 @@ var FreehandDrawing = /** @class */ (function () {
|
|
|
746
767
|
}
|
|
747
768
|
parent.freehandCounter -= 1;
|
|
748
769
|
this.fhdHovIdx = this.fhdSelIdx = null;
|
|
770
|
+
this.currFHDIdx--;
|
|
749
771
|
parent.notify('selection', { prop: 'resetFreehandDrawVariables' });
|
|
750
772
|
parent.notify('draw', { prop: 'render-image', value: { isMouseWheel: null } });
|
|
751
773
|
parent.notify('toolbar', { prop: 'refresh-main-toolbar', onPropertyChange: false });
|
|
@@ -359,6 +359,12 @@ var UndoRedo = /** @class */ (function () {
|
|
|
359
359
|
parent.initialAdjustmentValue = this.lowerContext.filter;
|
|
360
360
|
parent.notify('filter', { prop: 'setBevelFilter', onPropertyChange: false, value: { bevelFilter: this.lowerContext.filter } });
|
|
361
361
|
var editCompleteArgs = { action: this.getUndoRedoAction(obj.operation) };
|
|
362
|
+
var isSelected = void 0;
|
|
363
|
+
if (obj.operation === 'freehanddraw' || obj.operation === 'freehand-draw') {
|
|
364
|
+
var object = { isSelected: null };
|
|
365
|
+
parent.notify('freehand-draw', { prop: 'getFHDSelected', onPropertyChange: false, value: { obj: object } });
|
|
366
|
+
isSelected = object['isSelected'];
|
|
367
|
+
}
|
|
362
368
|
switch (obj.operation) {
|
|
363
369
|
case 'shapeTransform':
|
|
364
370
|
case 'brightness':
|
|
@@ -386,6 +392,10 @@ var UndoRedo = /** @class */ (function () {
|
|
|
386
392
|
this.updateFreehandDraw(obj.previousPointColl, obj.previousSelPointColl);
|
|
387
393
|
parent.notify('freehand-draw', { prop: 'setCurrentFreehandDrawIndex',
|
|
388
394
|
value: { value: parent.pointColl.length } });
|
|
395
|
+
if (isSelected) {
|
|
396
|
+
parent.notify('freehand-draw', { prop: 'resetFHDIdx' });
|
|
397
|
+
parent.notify('selection', { prop: 'resetFreehandDrawVariables' });
|
|
398
|
+
}
|
|
389
399
|
break;
|
|
390
400
|
case 'freehanddrawCustomized':
|
|
391
401
|
this.updateFreehandDrawCustomized(obj.previousObjColl, obj.previousPointColl);
|