@syncfusion/ej2-image-editor 25.2.4 → 26.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/.eslintrc.json +3 -2
- 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 +2691 -830
- package/dist/es6/ej2-image-editor.es2015.js.map +1 -1
- package/dist/es6/ej2-image-editor.es5.js +2788 -887
- 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 +13 -12
- package/src/image-editor/action/crop.d.ts +0 -1
- package/src/image-editor/action/crop.js +35 -77
- package/src/image-editor/action/draw.d.ts +3 -0
- package/src/image-editor/action/draw.js +198 -83
- package/src/image-editor/action/export.d.ts +3 -0
- package/src/image-editor/action/export.js +99 -41
- package/src/image-editor/action/filter.d.ts +0 -1
- package/src/image-editor/action/filter.js +4 -24
- package/src/image-editor/action/freehand-draw.js +30 -8
- package/src/image-editor/action/selection.d.ts +10 -0
- package/src/image-editor/action/selection.js +444 -99
- package/src/image-editor/action/shape.d.ts +11 -1
- package/src/image-editor/action/shape.js +520 -127
- package/src/image-editor/action/transform.d.ts +0 -1
- package/src/image-editor/action/transform.js +53 -69
- package/src/image-editor/action/undo-redo.d.ts +2 -0
- package/src/image-editor/action/undo-redo.js +114 -29
- package/src/image-editor/base/enum.d.ts +5 -1
- package/src/image-editor/base/enum.js +4 -0
- package/src/image-editor/base/image-editor-model.d.ts +8 -6
- package/src/image-editor/base/image-editor.d.ts +116 -7
- package/src/image-editor/base/image-editor.js +385 -53
- package/src/image-editor/base/interface.d.ts +17 -0
- package/src/image-editor/base/interface.js +0 -1
- package/src/image-editor/renderer/toolbar.d.ts +14 -1
- package/src/image-editor/renderer/toolbar.js +831 -191
- package/styles/bootstrap-dark.css +279 -97
- package/styles/bootstrap-dark.scss +13 -1
- package/styles/bootstrap.css +282 -98
- package/styles/bootstrap.scss +13 -1
- package/styles/bootstrap4.css +280 -97
- package/styles/bootstrap4.scss +13 -1
- package/styles/bootstrap5-dark.css +280 -101
- package/styles/bootstrap5-dark.scss +13 -1
- package/styles/bootstrap5.css +280 -101
- package/styles/bootstrap5.scss +13 -1
- package/styles/fabric-dark.css +281 -97
- package/styles/fabric-dark.scss +13 -1
- package/styles/fabric.css +284 -97
- package/styles/fabric.scss +13 -1
- package/styles/fluent-dark.css +287 -101
- package/styles/fluent-dark.scss +13 -1
- package/styles/fluent.css +287 -101
- package/styles/fluent.scss +13 -1
- package/styles/fluent2.css +1852 -0
- package/styles/fluent2.scss +13 -0
- package/styles/highcontrast-light.css +279 -97
- package/styles/highcontrast-light.scss +13 -1
- package/styles/highcontrast.css +284 -97
- package/styles/highcontrast.scss +13 -1
- package/styles/image-editor/_bds-definition.scss +5 -0
- package/styles/image-editor/_bootstrap-dark-definition.scss +5 -0
- package/styles/image-editor/_bootstrap-definition.scss +5 -0
- package/styles/image-editor/_bootstrap4-definition.scss +5 -0
- package/styles/image-editor/_bootstrap5-definition.scss +5 -0
- package/styles/image-editor/_bootstrap5.3-definition.scss +26 -0
- package/styles/image-editor/_fabric-dark-definition.scss +5 -0
- package/styles/image-editor/_fabric-definition.scss +5 -0
- package/styles/image-editor/_fluent-definition.scss +5 -0
- package/styles/image-editor/_fluent2-definition.scss +26 -0
- package/styles/image-editor/_fusionnew-definition.scss +5 -0
- package/styles/image-editor/_highcontrast-definition.scss +5 -0
- package/styles/image-editor/_highcontrast-light-definition.scss +5 -0
- package/styles/image-editor/_layout.scss +355 -13
- package/styles/image-editor/_material-dark-definition.scss +5 -0
- package/styles/image-editor/_material-definition.scss +5 -0
- package/styles/image-editor/_material3-definition.scss +5 -0
- package/styles/image-editor/_tailwind-definition.scss +5 -0
- package/styles/image-editor/bootstrap-dark.css +279 -97
- package/styles/image-editor/bootstrap.css +282 -98
- package/styles/image-editor/bootstrap4.css +280 -97
- package/styles/image-editor/bootstrap5-dark.css +280 -101
- package/styles/image-editor/bootstrap5.css +280 -101
- package/styles/image-editor/fabric-dark.css +281 -97
- package/styles/image-editor/fabric.css +284 -97
- package/styles/image-editor/fluent-dark.css +287 -101
- package/styles/image-editor/fluent.css +287 -101
- package/styles/image-editor/fluent2.css +1852 -0
- package/styles/image-editor/fluent2.scss +13 -0
- package/styles/image-editor/highcontrast-light.css +279 -97
- package/styles/image-editor/highcontrast.css +284 -97
- package/styles/image-editor/icons/_bds.scss +1 -162
- package/styles/image-editor/icons/_bootstrap-dark.scss +1 -162
- package/styles/image-editor/icons/_bootstrap.scss +1 -162
- package/styles/image-editor/icons/_bootstrap4.scss +1 -162
- package/styles/image-editor/icons/_bootstrap5.3.scss +250 -0
- package/styles/image-editor/icons/_bootstrap5.scss +1 -168
- package/styles/image-editor/icons/_fabric-dark.scss +1 -162
- package/styles/image-editor/icons/_fabric.scss +1 -162
- package/styles/image-editor/icons/_fluent.scss +1 -168
- package/styles/image-editor/icons/_fluent2.scss +256 -0
- package/styles/image-editor/icons/_fusionnew.scss +1 -138
- package/styles/image-editor/icons/_highcontrast-light.scss +1 -162
- package/styles/image-editor/icons/_highcontrast.scss +1 -162
- package/styles/image-editor/icons/_material-dark.scss +2 -163
- package/styles/image-editor/icons/_material.scss +1 -162
- package/styles/image-editor/icons/_material3.scss +2 -169
- package/styles/image-editor/icons/_tailwind.scss +1 -162
- package/styles/image-editor/material-dark.css +299 -100
- package/styles/image-editor/material.css +302 -100
- package/styles/image-editor/material3-dark.css +314 -103
- package/styles/image-editor/material3.css +314 -103
- package/styles/image-editor/tailwind-dark.css +284 -97
- package/styles/image-editor/tailwind.css +284 -97
- package/styles/material-dark.css +299 -100
- package/styles/material-dark.scss +13 -1
- package/styles/material.css +302 -100
- package/styles/material.scss +13 -1
- package/styles/material3-dark.css +314 -103
- package/styles/material3-dark.scss +13 -1
- package/styles/material3.css +314 -103
- package/styles/material3.scss +13 -1
- package/styles/tailwind-dark.css +284 -97
- package/styles/tailwind-dark.scss +13 -1
- package/styles/tailwind.css +284 -97
- package/styles/tailwind.scss +13 -1
- package/CHANGELOG.md +0 -289
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version :
|
|
3
|
+
* version : 26.1.38
|
|
4
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
|
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@26.1.35",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-ZrvlSqlzKEEK3dXjmDd8+2ysoTgvz6nkD37nza3lk71r9ALdvzahT1dr9Dsw4n2TPqUAxotVpLUAFRA1PTi4lA==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-image-editor",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -23,21 +23,22 @@
|
|
|
23
23
|
"/@syncfusion/ej2-react-image-editor",
|
|
24
24
|
"/@syncfusion/ej2-vue-image-editor"
|
|
25
25
|
],
|
|
26
|
-
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-image-editor/-/ej2-image-editor-
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-image-editor/-/ej2-image-editor-26.1.35.tgz",
|
|
27
|
+
"_shasum": "7b9d27aee5bea4b6cb963cc26a61d0a97baf62ac",
|
|
28
28
|
"_spec": "@syncfusion/ej2-image-editor@*",
|
|
29
|
-
"_where": "/jenkins/workspace/elease-
|
|
29
|
+
"_where": "/jenkins/workspace/elease-automation_release_26.1.1/packages/included",
|
|
30
30
|
"author": {
|
|
31
31
|
"name": "Syncfusion Inc."
|
|
32
32
|
},
|
|
33
33
|
"bundleDependencies": false,
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@syncfusion/ej2-base": "~
|
|
36
|
-
"@syncfusion/ej2-buttons": "~
|
|
37
|
-
"@syncfusion/ej2-
|
|
38
|
-
"@syncfusion/ej2-
|
|
39
|
-
"@syncfusion/ej2-
|
|
40
|
-
"@syncfusion/ej2-
|
|
35
|
+
"@syncfusion/ej2-base": "~26.1.37",
|
|
36
|
+
"@syncfusion/ej2-buttons": "~26.1.35",
|
|
37
|
+
"@syncfusion/ej2-dropdowns": "~26.1.38",
|
|
38
|
+
"@syncfusion/ej2-inputs": "~26.1.38",
|
|
39
|
+
"@syncfusion/ej2-navigations": "~26.1.38",
|
|
40
|
+
"@syncfusion/ej2-popups": "~26.1.38",
|
|
41
|
+
"@syncfusion/ej2-splitbuttons": "~26.1.35"
|
|
41
42
|
},
|
|
42
43
|
"deprecated": false,
|
|
43
44
|
"description": "Essential JS 2 ImageEditor",
|
|
@@ -67,7 +68,7 @@
|
|
|
67
68
|
"url": "https://github.com/syncfusion/ej2-javascript-ui-controls/tree/master/controls/imageeditor"
|
|
68
69
|
},
|
|
69
70
|
"typings": "index.d.ts",
|
|
70
|
-
"version": "
|
|
71
|
+
"version": "26.1.38",
|
|
71
72
|
"sideEffects": false,
|
|
72
73
|
"homepage": "https://www.syncfusion.com/javascript-ui-controls"
|
|
73
74
|
}
|
|
@@ -27,9 +27,6 @@ var Crop = /** @class */ (function () {
|
|
|
27
27
|
Crop.prototype.cropping = function (args) {
|
|
28
28
|
this.updateCropPvtVar();
|
|
29
29
|
switch (args.prop) {
|
|
30
|
-
case 'cropImg':
|
|
31
|
-
this.cropImg(args.value['isRotateCrop']);
|
|
32
|
-
break;
|
|
33
30
|
case 'cropCircle':
|
|
34
31
|
this.cropCircle(args.value['context'], args.value['isSave'], args.value['isFlip']);
|
|
35
32
|
break;
|
|
@@ -173,18 +170,12 @@ var Crop = /** @class */ (function () {
|
|
|
173
170
|
var activeObj = extend({}, parent.activeObj, {}, true);
|
|
174
171
|
this.cropObjColl();
|
|
175
172
|
parent.transform.straighten = 0;
|
|
176
|
-
parent.notify('shape', { prop: 'zoomObjColl', onPropertyChange: false, value: { isPreventApply: null } });
|
|
177
|
-
var objColl = extend([], parent.objColl, [], true);
|
|
178
|
-
for (var i = 0, len = objColl.length; i < len; i++) {
|
|
179
|
-
if (this.isObjInImage(objColl[i])) {
|
|
180
|
-
parent.notify('shape', { prop: 'apply', onPropertyChange: false,
|
|
181
|
-
value: { shape: objColl[i].shape, obj: objColl[i], canvas: null } });
|
|
182
|
-
parent.notify('shape', { prop: 'refreshActiveObj', onPropertyChange: false });
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
173
|
parent.activeObj = activeObj;
|
|
186
174
|
this.cropFreehandDrawColl();
|
|
187
|
-
parent.
|
|
175
|
+
parent.shapeColl = [];
|
|
176
|
+
parent.notify('shape', { prop: 'updateShapeColl', onPropertyChange: false });
|
|
177
|
+
parent.notify('shape', { prop: 'drawAnnotations', onPropertyChange: false,
|
|
178
|
+
value: { ctx: this.lowerContext, shape: 'zoom', pen: 'zoom', isPreventApply: null } });
|
|
188
179
|
parent.notify('draw', { prop: 'clearOuterCanvas', onPropertyChange: false, value: { context: this.lowerContext } });
|
|
189
180
|
parent.notify('draw', { prop: 'clearOuterCanvas', onPropertyChange: false, value: { context: this.upperContext } });
|
|
190
181
|
if (parent.currSelectionPoint && parent.currSelectionPoint.shape === 'crop-circle') {
|
|
@@ -262,8 +253,9 @@ var Crop = /** @class */ (function () {
|
|
|
262
253
|
if (straighten !== 0) {
|
|
263
254
|
parent.transform.straighten = 0;
|
|
264
255
|
parent.straightenBaseImageCanvas();
|
|
265
|
-
parent.notify('shape', { prop: '
|
|
266
|
-
|
|
256
|
+
parent.notify('shape', { prop: 'drawAnnotations', onPropertyChange: false,
|
|
257
|
+
value: { ctx: this.lowerContext, shape: 'zoom', pen: 'zoom', isPreventApply: null } });
|
|
258
|
+
parent.notify('shape', { prop: 'refreshActiveObj', onPropertyChange: false });
|
|
267
259
|
parent.notify('draw', { prop: 'render-image', value: { isMouseWheel: false } });
|
|
268
260
|
}
|
|
269
261
|
this.resetZoom();
|
|
@@ -273,11 +265,11 @@ var Crop = /** @class */ (function () {
|
|
|
273
265
|
if (straighten !== 0) {
|
|
274
266
|
parent.transform.straighten = (flipState === 'horizontal' || flipState === 'vertical') ? -straighten : straighten;
|
|
275
267
|
parent.straightenBaseImageCanvas();
|
|
276
|
-
parent.notify('shape', { prop: '
|
|
277
|
-
|
|
268
|
+
parent.notify('shape', { prop: 'drawAnnotations', onPropertyChange: false,
|
|
269
|
+
value: { ctx: this.lowerContext, shape: 'zoom', pen: 'zoom', isPreventApply: null } });
|
|
278
270
|
parent.notify('draw', { prop: 'render-image', value: { isMouseWheel: false } });
|
|
279
|
-
parent.notify('shape', { prop: '
|
|
280
|
-
|
|
271
|
+
parent.notify('shape', { prop: 'drawAnnotations', onPropertyChange: false,
|
|
272
|
+
value: { ctx: this.lowerContext, shape: 'zoom', pen: 'zoom', isPreventApply: null } });
|
|
281
273
|
}
|
|
282
274
|
activeObj = extend({}, parent.objColl[parent.objColl.length - 1], {}, true);
|
|
283
275
|
this.upperContext.clearRect(0, 0, parent.upperCanvas.width, parent.upperCanvas.height);
|
|
@@ -435,8 +427,8 @@ var Crop = /** @class */ (function () {
|
|
|
435
427
|
parent.notify('shape', { prop: 'redrawObj', onPropertyChange: false, value: { degree: this.getCurrFlipState() } });
|
|
436
428
|
parent.notify('freehand-draw', { prop: 'flipFHDColl', onPropertyChange: false,
|
|
437
429
|
value: { value: this.getCurrFlipState() } });
|
|
438
|
-
parent.notify('shape', { prop: '
|
|
439
|
-
|
|
430
|
+
parent.notify('shape', { prop: 'drawAnnotations', onPropertyChange: false,
|
|
431
|
+
value: { ctx: this.lowerContext, shape: 'zoom', pen: 'zoom', isPreventApply: null } });
|
|
440
432
|
this.lowerContext.filter = temp;
|
|
441
433
|
if ((parent.currSelectionPoint && parent.currSelectionPoint.shape === 'crop-circle') || parent.isCircleCrop) {
|
|
442
434
|
this.cropCircle(this.lowerContext);
|
|
@@ -507,6 +499,7 @@ var Crop = /** @class */ (function () {
|
|
|
507
499
|
width = destWidth;
|
|
508
500
|
height = destHeight;
|
|
509
501
|
}
|
|
502
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
510
503
|
var pointColl = parent.objColl[i].pointColl;
|
|
511
504
|
for (var n = 0, len = pointColl.length; n < len; n++) {
|
|
512
505
|
pointColl[n].ratioX = (pointColl[n].x - x) / width;
|
|
@@ -593,8 +586,8 @@ var Crop = /** @class */ (function () {
|
|
|
593
586
|
img.destWidth = width;
|
|
594
587
|
img.destHeight = height;
|
|
595
588
|
}
|
|
596
|
-
parent.notify('shape', { prop: '
|
|
597
|
-
|
|
589
|
+
parent.notify('shape', { prop: 'drawAnnotations', onPropertyChange: false,
|
|
590
|
+
value: { ctx: this.lowerContext, shape: 'zoom', pen: 'zoom', isPreventApply: null } });
|
|
598
591
|
img.destLeft = destPoints.startX;
|
|
599
592
|
img.destTop = destPoints.startY;
|
|
600
593
|
img.destWidth = destPoints.width;
|
|
@@ -633,13 +626,12 @@ var Crop = /** @class */ (function () {
|
|
|
633
626
|
}
|
|
634
627
|
parent.notify('freehand-draw', { prop: 'setSelPointColl', onPropertyChange: false,
|
|
635
628
|
value: { obj: { selPointColl: cropSelPointColl } } });
|
|
636
|
-
parent.notify('shape', { prop: '
|
|
637
|
-
|
|
638
|
-
value: { context: this.lowerContext, points: null } });
|
|
629
|
+
parent.notify('shape', { prop: 'drawAnnotations', onPropertyChange: false,
|
|
630
|
+
value: { ctx: this.lowerContext, shape: 'iterate', pen: 'iterate', isPreventApply: null } });
|
|
639
631
|
this.adjustStraightenForShapes('reverse', false);
|
|
640
632
|
parent.notify('freehand-draw', { prop: 'updateFHDColl', onPropertyChange: false, value: { isPreventApply: true } });
|
|
641
|
-
parent.notify('shape', { prop: '
|
|
642
|
-
|
|
633
|
+
parent.notify('shape', { prop: 'drawAnnotations', onPropertyChange: false,
|
|
634
|
+
value: { ctx: this.lowerContext, shape: 'zoom', pen: 'zoom', isPreventApply: null } });
|
|
643
635
|
if (parent.transform.degree === 0) {
|
|
644
636
|
parent.notify('transform', { prop: 'drawPannImage', onPropertyChange: false,
|
|
645
637
|
value: { point: { x: 0, y: 0 } } });
|
|
@@ -674,9 +666,8 @@ var Crop = /** @class */ (function () {
|
|
|
674
666
|
parent.notify('freehand-draw', { prop: 'updateFHDColl', onPropertyChange: false, value: { isPreventApply: true } });
|
|
675
667
|
var temp = this.lowerContext.filter;
|
|
676
668
|
this.lowerContext.filter = 'none';
|
|
677
|
-
parent.notify('shape', { prop: '
|
|
678
|
-
|
|
679
|
-
value: { context: this.lowerContext, points: null } });
|
|
669
|
+
parent.notify('shape', { prop: 'drawAnnotations', onPropertyChange: false,
|
|
670
|
+
value: { ctx: this.lowerContext, shape: 'iterate', pen: 'iterate', isPreventApply: null } });
|
|
680
671
|
this.lowerContext.filter = temp;
|
|
681
672
|
parent.currSelectionPoint = null;
|
|
682
673
|
}
|
|
@@ -721,49 +712,18 @@ var Crop = /** @class */ (function () {
|
|
|
721
712
|
value: { context: context, value: parent.transform.currFlipState, isReverse: null } });
|
|
722
713
|
}
|
|
723
714
|
};
|
|
724
|
-
Crop.prototype.getCurrCropState = function (
|
|
715
|
+
Crop.prototype.getCurrCropState = function () {
|
|
725
716
|
var parent = this.parent;
|
|
726
717
|
var flipState = '';
|
|
727
|
-
var state = [];
|
|
728
718
|
var obj = { flipColl: null };
|
|
729
719
|
parent.notify('transform', { prop: 'getFlipColl', onPropertyChange: false, value: { obj: obj } });
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
else {
|
|
735
|
-
for (var i = 0, len = parent.rotateFlipColl.length; i < len; i++) {
|
|
736
|
-
if (typeof (parent.rotateFlipColl[i]) === 'number') {
|
|
737
|
-
state.push('number');
|
|
738
|
-
}
|
|
739
|
-
else if (typeof (parent.rotateFlipColl[i]) === 'string') {
|
|
740
|
-
state.push('string');
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
if (state.length > 1 && state[state.length - 1] === 'string' && state[state.length - 2] === 'number') {
|
|
744
|
-
if (parent.transform.currFlipState === 'horizontal') {
|
|
745
|
-
flipState = 'vertical';
|
|
746
|
-
}
|
|
747
|
-
else if (parent.transform.currFlipState === 'vertical') {
|
|
748
|
-
flipState = 'horizontal';
|
|
749
|
-
}
|
|
750
|
-
}
|
|
751
|
-
else if (state.length > 1 && state[state.length - 1] === 'number' && state[state.length - 2] === 'string') {
|
|
752
|
-
flipState = obj['flipColl'].length > 1 ? this.getCurrFlipState() : parent.transform.currFlipState;
|
|
753
|
-
}
|
|
720
|
+
flipState = this.getCurrFlipState();
|
|
721
|
+
if (parent.transform.degree === -90 || parent.transform.degree === -270) {
|
|
722
|
+
if (flipState === 'horizontal') {
|
|
723
|
+
flipState = 'vertical';
|
|
754
724
|
}
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
flipState = this.getCurrFlipState();
|
|
758
|
-
if (isAllowInvert || !this.isInitialRotate()) {
|
|
759
|
-
if (parent.transform.degree === -90 || parent.transform.degree === -270) {
|
|
760
|
-
if (flipState === 'horizontal') {
|
|
761
|
-
flipState = 'vertical';
|
|
762
|
-
}
|
|
763
|
-
else if (flipState === 'vertical') {
|
|
764
|
-
flipState = 'horizontal';
|
|
765
|
-
}
|
|
766
|
-
}
|
|
725
|
+
else if (flipState === 'vertical') {
|
|
726
|
+
flipState = 'horizontal';
|
|
767
727
|
}
|
|
768
728
|
}
|
|
769
729
|
if (flipState === '') {
|
|
@@ -771,13 +731,6 @@ var Crop = /** @class */ (function () {
|
|
|
771
731
|
}
|
|
772
732
|
return flipState;
|
|
773
733
|
};
|
|
774
|
-
Crop.prototype.isInitialRotate = function () {
|
|
775
|
-
var isRotate = false;
|
|
776
|
-
if (this.parent.rotateFlipColl.length > 0 && typeof (this.parent.rotateFlipColl[0]) === 'number') {
|
|
777
|
-
isRotate = true;
|
|
778
|
-
}
|
|
779
|
-
return isRotate;
|
|
780
|
-
};
|
|
781
734
|
Crop.prototype.updateRotatePan = function () {
|
|
782
735
|
var parent = this.parent;
|
|
783
736
|
if (isNullOrUndefined(parent.panPoint.currentPannedPoint)) {
|
|
@@ -788,7 +741,7 @@ var Crop = /** @class */ (function () {
|
|
|
788
741
|
var _a = parent.panPoint.currentPannedPoint, x = _a.x, y = _a.y;
|
|
789
742
|
if (parent.rotateFlipColl.length > 0 && typeof (parent.rotateFlipColl[0]) === 'number'
|
|
790
743
|
&& degree < 0) {
|
|
791
|
-
panRegion = this.getCurrCropState(
|
|
744
|
+
panRegion = this.getCurrCropState();
|
|
792
745
|
}
|
|
793
746
|
else {
|
|
794
747
|
panRegion = this.getCurrFlipState();
|
|
@@ -878,6 +831,10 @@ var Crop = /** @class */ (function () {
|
|
|
878
831
|
this.isPreventScaling = false;
|
|
879
832
|
}
|
|
880
833
|
this.cropImg();
|
|
834
|
+
if (this.isPreventScaling) {
|
|
835
|
+
parent.aspectWidth = parent.img.destWidth;
|
|
836
|
+
parent.aspectHeight = parent.img.destHeight;
|
|
837
|
+
}
|
|
881
838
|
parent.notify('freehand-draw', { prop: 'resetStraightenPoint' });
|
|
882
839
|
parent.isCropTab = false;
|
|
883
840
|
parent.transform.zoomFactor = 0;
|
|
@@ -919,6 +876,7 @@ var Crop = /** @class */ (function () {
|
|
|
919
876
|
Crop.prototype.resizeWrapper = function () {
|
|
920
877
|
var parent = this.parent;
|
|
921
878
|
if (Browser.isDevice) {
|
|
879
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
922
880
|
var elem = parent.element;
|
|
923
881
|
var ctxToolbar = elem.querySelector('#' + elem.id + '_contextualToolbarArea');
|
|
924
882
|
if (ctxToolbar && ctxToolbar.style.position === '' && !this.isTransformCrop) {
|
|
@@ -50,6 +50,8 @@ export declare class Draw {
|
|
|
50
50
|
private isDownScale;
|
|
51
51
|
private tempStraightenDestPoints;
|
|
52
52
|
private preventStraightening;
|
|
53
|
+
private tempObjColl;
|
|
54
|
+
private tempPointColl;
|
|
53
55
|
constructor(parent: ImageEditor);
|
|
54
56
|
destroy(): void;
|
|
55
57
|
private addEventListener;
|
|
@@ -134,6 +136,7 @@ export declare class Draw {
|
|
|
134
136
|
private panToSel;
|
|
135
137
|
private drawZoomPanImage;
|
|
136
138
|
private openNewImage;
|
|
139
|
+
private getImageSizeFromURL;
|
|
137
140
|
private dlgBtnClick;
|
|
138
141
|
private dlgCloseBtnClick;
|
|
139
142
|
private applyDialogOption;
|