@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
package/dist/ts/index.ts
ADDED
package/package.json
CHANGED
|
@@ -1,22 +1,49 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
2
|
+
"_from": "@syncfusion/ej2-image-editor@*",
|
|
3
|
+
"_id": "@syncfusion/ej2-image-editor@28.2.0",
|
|
4
|
+
"_inBundle": false,
|
|
5
|
+
"_integrity": "sha512-ZRXJy4ABn0/rhrAz6BSWecD3KqFtdXN6HpMbzT1Nwd+EpL4R8sKC7vJF4xo/km1ZTWgDjgFdImviKKV0Ze/GOQ==",
|
|
6
|
+
"_location": "/@syncfusion/ej2-image-editor",
|
|
7
|
+
"_phantomChildren": {},
|
|
8
|
+
"_requested": {
|
|
9
|
+
"type": "range",
|
|
10
|
+
"registry": true,
|
|
11
|
+
"raw": "@syncfusion/ej2-image-editor@*",
|
|
12
|
+
"name": "@syncfusion/ej2-image-editor",
|
|
13
|
+
"escapedName": "@syncfusion%2fej2-image-editor",
|
|
14
|
+
"scope": "@syncfusion",
|
|
15
|
+
"rawSpec": "*",
|
|
16
|
+
"saveSpec": null,
|
|
17
|
+
"fetchSpec": "*"
|
|
18
|
+
},
|
|
19
|
+
"_requiredBy": [
|
|
20
|
+
"/",
|
|
21
|
+
"/@syncfusion/ej2",
|
|
22
|
+
"/@syncfusion/ej2-angular-image-editor",
|
|
23
|
+
"/@syncfusion/ej2-react-image-editor",
|
|
24
|
+
"/@syncfusion/ej2-vue-image-editor"
|
|
25
|
+
],
|
|
26
|
+
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-development/@syncfusion/ej2-image-editor/-/ej2-image-editor-28.2.0.tgz",
|
|
27
|
+
"_shasum": "db58ce2ba449bdc03efaac0d29a3129ed74204ec",
|
|
28
|
+
"_spec": "@syncfusion/ej2-image-editor@*",
|
|
29
|
+
"_where": "D:\\SF3992\\WFH\\Nexus\\release",
|
|
30
|
+
"author": {
|
|
31
|
+
"name": "Syncfusion Inc."
|
|
32
|
+
},
|
|
33
|
+
"bundleDependencies": false,
|
|
10
34
|
"dependencies": {
|
|
11
|
-
"@syncfusion/ej2-base": "~
|
|
12
|
-
"@syncfusion/ej2-buttons": "~
|
|
13
|
-
"@syncfusion/ej2-dropdowns": "~
|
|
14
|
-
"@syncfusion/ej2-inputs": "~
|
|
15
|
-
"@syncfusion/ej2-navigations": "~
|
|
16
|
-
"@syncfusion/ej2-popups": "~
|
|
17
|
-
"@syncfusion/ej2-splitbuttons": "~
|
|
35
|
+
"@syncfusion/ej2-base": "~31.1.17",
|
|
36
|
+
"@syncfusion/ej2-buttons": "~31.1.17",
|
|
37
|
+
"@syncfusion/ej2-dropdowns": "~31.1.17",
|
|
38
|
+
"@syncfusion/ej2-inputs": "~31.1.17",
|
|
39
|
+
"@syncfusion/ej2-navigations": "~31.1.17",
|
|
40
|
+
"@syncfusion/ej2-popups": "~31.1.17",
|
|
41
|
+
"@syncfusion/ej2-splitbuttons": "~31.1.17"
|
|
18
42
|
},
|
|
43
|
+
"deprecated": false,
|
|
44
|
+
"description": "Essential JS 2 ImageEditor",
|
|
19
45
|
"devDependencies": {},
|
|
46
|
+
"es2015": "./dist/es6/ej2-image-editor.es5.js",
|
|
20
47
|
"keywords": [
|
|
21
48
|
"ej2",
|
|
22
49
|
"syncfusion",
|
|
@@ -32,11 +59,16 @@
|
|
|
32
59
|
"web image editor",
|
|
33
60
|
"image editing software"
|
|
34
61
|
],
|
|
62
|
+
"license": "SEE LICENSE IN license",
|
|
63
|
+
"main": "./dist/ej2-image-editor.umd.min.js",
|
|
64
|
+
"module": "./index.js",
|
|
65
|
+
"name": "@syncfusion/ej2-image-editor",
|
|
35
66
|
"repository": {
|
|
36
67
|
"type": "git",
|
|
37
68
|
"url": "https://github.com/syncfusion/ej2-javascript-ui-controls/tree/master/controls/imageeditor"
|
|
38
69
|
},
|
|
39
70
|
"typings": "index.d.ts",
|
|
71
|
+
"version": "31.1.17",
|
|
40
72
|
"sideEffects": false,
|
|
41
73
|
"homepage": "https://www.syncfusion.com/javascript-ui-controls"
|
|
42
74
|
}
|
|
@@ -82,7 +82,7 @@ var Export = /** @class */ (function () {
|
|
|
82
82
|
this.toSVGImg(fileName);
|
|
83
83
|
}
|
|
84
84
|
else {
|
|
85
|
-
this.toBlobFn(fileName, lowerCaseType,
|
|
85
|
+
this.toBlobFn(fileName, lowerCaseType, imgQuality);
|
|
86
86
|
}
|
|
87
87
|
var saved = { fileName: fileName ? fileName : imageName, fileType: type };
|
|
88
88
|
parent.trigger('saved', saved);
|
|
@@ -149,15 +149,6 @@ 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;
|
|
161
152
|
case 'getTempFreeHandDrawEditingStyles':
|
|
162
153
|
args.value['obj']['tempFreeHandDrawEditingStyles'] = this.tempFHDStyles;
|
|
163
154
|
break;
|
|
@@ -340,11 +331,10 @@ var FreehandDrawing = /** @class */ (function () {
|
|
|
340
331
|
parent.notify('freehand-draw', { prop: 'getSelPointColl', onPropertyChange: false, value: { obj: selPointCollObj } });
|
|
341
332
|
prevObj.selPointColl = extend([], selPointCollObj['selPointColl'], [], true);
|
|
342
333
|
var fhCnt = parent.freehandCounter;
|
|
343
|
-
var
|
|
344
|
-
var order = parent.objColl.length + penIndex + 1;
|
|
334
|
+
var order = parent.objColl.length + parent.freehandCounter + 1;
|
|
345
335
|
parent.pointColl[fhCnt] = { points: extend([], parent.points), strokeColor: parent.activeObj.strokeSettings.strokeColor,
|
|
346
336
|
strokeWidth: this.penStrokeWidth, flipState: parent.transform.currFlipState,
|
|
347
|
-
id: 'pen_' + (
|
|
337
|
+
id: 'pen_' + (this.currFHDIdx + 1), order: order };
|
|
348
338
|
parent.points = [];
|
|
349
339
|
this.dummyPoints = [];
|
|
350
340
|
this.selPointColl[fhCnt] = { points: extend([], this.selPoints) };
|
|
@@ -359,7 +349,7 @@ var FreehandDrawing = /** @class */ (function () {
|
|
|
359
349
|
previousCropObj: prevCropObj, previousText: null,
|
|
360
350
|
currentText: null, previousFilter: null, isCircleCrop: null } });
|
|
361
351
|
}
|
|
362
|
-
var shapeSettings = { id: 'pen_' + (
|
|
352
|
+
var shapeSettings = { id: 'pen_' + (this.currFHDIdx + 1), type: ShapeType.FreehandDraw,
|
|
363
353
|
startX: this.freehandDownPoint.x, startY: this.freehandDownPoint.y,
|
|
364
354
|
strokeColor: parent.activeObj.strokeSettings.strokeColor, strokeWidth: this.penStrokeWidth,
|
|
365
355
|
points: parent.pointColl[this.currFHDIdx].points, index: order };
|
|
@@ -368,17 +358,6 @@ var FreehandDrawing = /** @class */ (function () {
|
|
|
368
358
|
this.triggerShapeChanging(shapeChangingArgs);
|
|
369
359
|
this.currFHDIdx++;
|
|
370
360
|
};
|
|
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
|
-
};
|
|
382
361
|
FreehandDrawing.prototype.freehandMoveHandler = function (e) {
|
|
383
362
|
this.isFreehandPointMoved = true;
|
|
384
363
|
var rect = this.parent.upperCanvas.getBoundingClientRect();
|
|
@@ -767,7 +746,6 @@ var FreehandDrawing = /** @class */ (function () {
|
|
|
767
746
|
}
|
|
768
747
|
parent.freehandCounter -= 1;
|
|
769
748
|
this.fhdHovIdx = this.fhdSelIdx = null;
|
|
770
|
-
this.currFHDIdx--;
|
|
771
749
|
parent.notify('selection', { prop: 'resetFreehandDrawVariables' });
|
|
772
750
|
parent.notify('draw', { prop: 'render-image', value: { isMouseWheel: null } });
|
|
773
751
|
parent.notify('toolbar', { prop: 'refresh-main-toolbar', onPropertyChange: false });
|
|
@@ -87,15 +87,15 @@ var UndoRedo = /** @class */ (function () {
|
|
|
87
87
|
this.updateUndoRedoStack();
|
|
88
88
|
}
|
|
89
89
|
break;
|
|
90
|
-
case 'reset':
|
|
91
|
-
this.reset();
|
|
92
|
-
break;
|
|
93
90
|
case 'preventEditComplete':
|
|
94
91
|
args.value['obj']['bool'] = this.preventEditComplete;
|
|
95
92
|
break;
|
|
96
93
|
case 'preventApplyEditComplete':
|
|
97
94
|
this.preventApplyEditComplete = args.value['bool'];
|
|
98
95
|
break;
|
|
96
|
+
case 'reset':
|
|
97
|
+
this.reset();
|
|
98
|
+
break;
|
|
99
99
|
}
|
|
100
100
|
};
|
|
101
101
|
UndoRedo.prototype.getModuleName = function () {
|
|
@@ -359,12 +359,6 @@ 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
|
-
}
|
|
368
362
|
switch (obj.operation) {
|
|
369
363
|
case 'shapeTransform':
|
|
370
364
|
case 'brightness':
|
|
@@ -392,10 +386,6 @@ var UndoRedo = /** @class */ (function () {
|
|
|
392
386
|
this.updateFreehandDraw(obj.previousPointColl, obj.previousSelPointColl);
|
|
393
387
|
parent.notify('freehand-draw', { prop: 'setCurrentFreehandDrawIndex',
|
|
394
388
|
value: { value: parent.pointColl.length } });
|
|
395
|
-
if (isSelected) {
|
|
396
|
-
parent.notify('freehand-draw', { prop: 'resetFHDIdx' });
|
|
397
|
-
parent.notify('selection', { prop: 'resetFreehandDrawVariables' });
|
|
398
|
-
}
|
|
399
389
|
break;
|
|
400
390
|
case 'freehanddrawCustomized':
|
|
401
391
|
this.updateFreehandDrawCustomized(obj.previousObjColl, obj.previousPointColl);
|