@syncfusion/ej2-image-editor 30.2.5 → 31.1.17
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 +7 -39
- package/dist/es6/ej2-image-editor.es2015.js.map +1 -1
- package/dist/es6/ej2-image-editor.es5.js +7 -39
- 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/dist/ts/image-editor/action/crop.d.ts +44 -0
- package/dist/ts/image-editor/action/crop.ts +867 -0
- package/dist/ts/image-editor/action/draw.d.ts +187 -0
- package/dist/ts/image-editor/action/draw.ts +4924 -0
- package/dist/ts/image-editor/action/export.d.ts +29 -0
- package/dist/ts/image-editor/action/export.ts +509 -0
- package/dist/ts/image-editor/action/filter.d.ts +48 -0
- package/dist/ts/image-editor/action/filter.ts +872 -0
- package/dist/ts/image-editor/action/freehand-draw.d.ts +68 -0
- package/dist/ts/image-editor/action/freehand-draw.ts +1135 -0
- package/dist/ts/image-editor/action/index.d.ts +9 -0
- package/dist/ts/image-editor/action/index.ts +9 -0
- package/dist/ts/image-editor/action/selection.d.ts +178 -0
- package/dist/ts/image-editor/action/selection.ts +5241 -0
- package/dist/ts/image-editor/action/shape.d.ts +130 -0
- package/dist/ts/image-editor/action/shape.ts +3917 -0
- package/dist/ts/image-editor/action/transform.d.ts +77 -0
- package/dist/ts/image-editor/action/transform.ts +2008 -0
- package/dist/ts/image-editor/action/undo-redo.d.ts +52 -0
- package/dist/ts/image-editor/action/undo-redo.ts +1169 -0
- package/dist/ts/image-editor/base/enum.d.ts +277 -0
- package/dist/ts/image-editor/base/enum.ts +288 -0
- package/dist/ts/image-editor/base/image-editor-model.d.ts +770 -0
- package/dist/ts/image-editor/base/image-editor.d.ts +1928 -0
- package/dist/ts/image-editor/base/image-editor.ts +5496 -0
- package/dist/ts/image-editor/base/index.d.ts +4 -0
- package/dist/ts/image-editor/base/index.ts +4 -0
- package/dist/ts/image-editor/base/interface.d.ts +1637 -0
- package/dist/ts/image-editor/base/interface.ts +1709 -0
- package/dist/ts/image-editor/index.d.ts +3 -0
- package/dist/ts/image-editor/index.ts +3 -0
- package/dist/ts/image-editor/renderer/index.d.ts +1 -0
- package/dist/ts/image-editor/renderer/index.ts +1 -0
- package/dist/ts/image-editor/renderer/toolbar.d.ts +171 -0
- package/dist/ts/image-editor/renderer/toolbar.ts +6356 -0
- package/dist/ts/index.d.ts +4 -0
- package/dist/ts/index.ts +4 -0
- package/package.json +47 -15
- package/src/image-editor/action/export.js +1 -1
- package/src/image-editor/action/freehand-draw.d.ts +0 -1
- package/src/image-editor/action/freehand-draw.js +3 -25
- package/src/image-editor/action/undo-redo.js +3 -13
|
@@ -6396,7 +6396,7 @@ class Export {
|
|
|
6396
6396
|
this.toSVGImg(fileName);
|
|
6397
6397
|
}
|
|
6398
6398
|
else {
|
|
6399
|
-
this.toBlobFn(fileName, lowerCaseType,
|
|
6399
|
+
this.toBlobFn(fileName, lowerCaseType, imgQuality);
|
|
6400
6400
|
}
|
|
6401
6401
|
const saved = { fileName: fileName ? fileName : imageName, fileType: type };
|
|
6402
6402
|
parent.trigger('saved', saved);
|
|
@@ -7867,15 +7867,6 @@ class FreehandDrawing {
|
|
|
7867
7867
|
case 'resetFreehandDrawSelectedId':
|
|
7868
7868
|
this.fhdSelID = null;
|
|
7869
7869
|
break;
|
|
7870
|
-
case 'getFHDSelected':
|
|
7871
|
-
args.value['obj']['isSelected'] = (this.parent.pointColl[this.fhdSelIdx] && this.parent.pointColl[this.fhdSelIdx].isSelected) ? this.parent.pointColl[this.fhdSelIdx].isSelected : false;
|
|
7872
|
-
break;
|
|
7873
|
-
case 'resetFHDIdx':
|
|
7874
|
-
this.fhdHovIdx = this.fhdSelID = this.fhdSelIdx = null;
|
|
7875
|
-
break;
|
|
7876
|
-
case 'getHighestOrder':
|
|
7877
|
-
this.getHighestOrder();
|
|
7878
|
-
break;
|
|
7879
7870
|
case 'getTempFreeHandDrawEditingStyles':
|
|
7880
7871
|
args.value['obj']['tempFreeHandDrawEditingStyles'] = this.tempFHDStyles;
|
|
7881
7872
|
break;
|
|
@@ -8058,11 +8049,10 @@ class FreehandDrawing {
|
|
|
8058
8049
|
parent.notify('freehand-draw', { prop: 'getSelPointColl', onPropertyChange: false, value: { obj: selPointCollObj } });
|
|
8059
8050
|
prevObj.selPointColl = extend([], selPointCollObj['selPointColl'], [], true);
|
|
8060
8051
|
const fhCnt = parent.freehandCounter;
|
|
8061
|
-
const
|
|
8062
|
-
const order = parent.objColl.length + penIndex + 1;
|
|
8052
|
+
const order = parent.objColl.length + parent.freehandCounter + 1;
|
|
8063
8053
|
parent.pointColl[fhCnt] = { points: extend([], parent.points), strokeColor: parent.activeObj.strokeSettings.strokeColor,
|
|
8064
8054
|
strokeWidth: this.penStrokeWidth, flipState: parent.transform.currFlipState,
|
|
8065
|
-
id: 'pen_' + (
|
|
8055
|
+
id: 'pen_' + (this.currFHDIdx + 1), order: order };
|
|
8066
8056
|
parent.points = [];
|
|
8067
8057
|
this.dummyPoints = [];
|
|
8068
8058
|
this.selPointColl[fhCnt] = { points: extend([], this.selPoints) };
|
|
@@ -8077,7 +8067,7 @@ class FreehandDrawing {
|
|
|
8077
8067
|
previousCropObj: prevCropObj, previousText: null,
|
|
8078
8068
|
currentText: null, previousFilter: null, isCircleCrop: null } });
|
|
8079
8069
|
}
|
|
8080
|
-
const shapeSettings = { id: 'pen_' + (
|
|
8070
|
+
const shapeSettings = { id: 'pen_' + (this.currFHDIdx + 1), type: ShapeType.FreehandDraw,
|
|
8081
8071
|
startX: this.freehandDownPoint.x, startY: this.freehandDownPoint.y,
|
|
8082
8072
|
strokeColor: parent.activeObj.strokeSettings.strokeColor, strokeWidth: this.penStrokeWidth,
|
|
8083
8073
|
points: parent.pointColl[this.currFHDIdx].points, index: order };
|
|
@@ -8086,17 +8076,6 @@ class FreehandDrawing {
|
|
|
8086
8076
|
this.triggerShapeChanging(shapeChangingArgs);
|
|
8087
8077
|
this.currFHDIdx++;
|
|
8088
8078
|
}
|
|
8089
|
-
getHighestOrder() {
|
|
8090
|
-
const parent = this.parent;
|
|
8091
|
-
let index = 0;
|
|
8092
|
-
for (let i = 0; i < parent.pointColl.length; i++) {
|
|
8093
|
-
const value = parseInt(parent.pointColl[i].id.split('_')[1], 10);
|
|
8094
|
-
if (index < value) {
|
|
8095
|
-
index = value;
|
|
8096
|
-
}
|
|
8097
|
-
}
|
|
8098
|
-
return index;
|
|
8099
|
-
}
|
|
8100
8079
|
freehandMoveHandler(e) {
|
|
8101
8080
|
this.isFreehandPointMoved = true;
|
|
8102
8081
|
const rect = this.parent.upperCanvas.getBoundingClientRect();
|
|
@@ -8485,7 +8464,6 @@ class FreehandDrawing {
|
|
|
8485
8464
|
}
|
|
8486
8465
|
parent.freehandCounter -= 1;
|
|
8487
8466
|
this.fhdHovIdx = this.fhdSelIdx = null;
|
|
8488
|
-
this.currFHDIdx--;
|
|
8489
8467
|
parent.notify('selection', { prop: 'resetFreehandDrawVariables' });
|
|
8490
8468
|
parent.notify('draw', { prop: 'render-image', value: { isMouseWheel: null } });
|
|
8491
8469
|
parent.notify('toolbar', { prop: 'refresh-main-toolbar', onPropertyChange: false });
|
|
@@ -21207,15 +21185,15 @@ class UndoRedo {
|
|
|
21207
21185
|
this.updateUndoRedoStack();
|
|
21208
21186
|
}
|
|
21209
21187
|
break;
|
|
21210
|
-
case 'reset':
|
|
21211
|
-
this.reset();
|
|
21212
|
-
break;
|
|
21213
21188
|
case 'preventEditComplete':
|
|
21214
21189
|
args.value['obj']['bool'] = this.preventEditComplete;
|
|
21215
21190
|
break;
|
|
21216
21191
|
case 'preventApplyEditComplete':
|
|
21217
21192
|
this.preventApplyEditComplete = args.value['bool'];
|
|
21218
21193
|
break;
|
|
21194
|
+
case 'reset':
|
|
21195
|
+
this.reset();
|
|
21196
|
+
break;
|
|
21219
21197
|
}
|
|
21220
21198
|
}
|
|
21221
21199
|
getModuleName() {
|
|
@@ -21479,12 +21457,6 @@ class UndoRedo {
|
|
|
21479
21457
|
parent.initialAdjustmentValue = this.lowerContext.filter;
|
|
21480
21458
|
parent.notify('filter', { prop: 'setBevelFilter', onPropertyChange: false, value: { bevelFilter: this.lowerContext.filter } });
|
|
21481
21459
|
const editCompleteArgs = { action: this.getUndoRedoAction(obj.operation) };
|
|
21482
|
-
let isSelected;
|
|
21483
|
-
if (obj.operation === 'freehanddraw' || obj.operation === 'freehand-draw') {
|
|
21484
|
-
const object = { isSelected: null };
|
|
21485
|
-
parent.notify('freehand-draw', { prop: 'getFHDSelected', onPropertyChange: false, value: { obj: object } });
|
|
21486
|
-
isSelected = object['isSelected'];
|
|
21487
|
-
}
|
|
21488
21460
|
switch (obj.operation) {
|
|
21489
21461
|
case 'shapeTransform':
|
|
21490
21462
|
case 'brightness':
|
|
@@ -21512,10 +21484,6 @@ class UndoRedo {
|
|
|
21512
21484
|
this.updateFreehandDraw(obj.previousPointColl, obj.previousSelPointColl);
|
|
21513
21485
|
parent.notify('freehand-draw', { prop: 'setCurrentFreehandDrawIndex',
|
|
21514
21486
|
value: { value: parent.pointColl.length } });
|
|
21515
|
-
if (isSelected) {
|
|
21516
|
-
parent.notify('freehand-draw', { prop: 'resetFHDIdx' });
|
|
21517
|
-
parent.notify('selection', { prop: 'resetFreehandDrawVariables' });
|
|
21518
|
-
}
|
|
21519
21487
|
break;
|
|
21520
21488
|
case 'freehanddrawCustomized':
|
|
21521
21489
|
this.updateFreehandDrawCustomized(obj.previousObjColl, obj.previousPointColl);
|