@syncfusion/ej2-image-editor 21.2.5 → 21.2.10
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 +22 -0
- 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 +58 -14
- package/dist/es6/ej2-image-editor.es2015.js.map +1 -1
- package/dist/es6/ej2-image-editor.es5.js +58 -14
- 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 +10 -10
- package/src/image-editor/image-editor.js +58 -14
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 21.2.
|
|
3
|
+
* version : 21.2.10
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. 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@21.2.
|
|
3
|
+
"_id": "@syncfusion/ej2-image-editor@21.2.6",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-3TNFotEXJWfF7aUHzI7X78bwG5gd4tKDZzd4alwDasNlYNuETzRHzjfPTkGdtj0NU6FzkcgxbJCVKJR4r36OXw==",
|
|
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-hotfix-new/@syncfusion/ej2-image-editor/-/ej2-image-editor-21.2.
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-image-editor/-/ej2-image-editor-21.2.6.tgz",
|
|
27
|
+
"_shasum": "da47fbe9ff898d3a7d63c0e9061675697f1c9055",
|
|
28
28
|
"_spec": "@syncfusion/ej2-image-editor@*",
|
|
29
29
|
"_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
|
|
30
30
|
"author": {
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
},
|
|
33
33
|
"bundleDependencies": false,
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@syncfusion/ej2-base": "~21.2.
|
|
36
|
-
"@syncfusion/ej2-buttons": "~21.2.
|
|
37
|
-
"@syncfusion/ej2-inputs": "~21.2.
|
|
38
|
-
"@syncfusion/ej2-navigations": "~21.2.
|
|
39
|
-
"@syncfusion/ej2-popups": "~21.2.
|
|
35
|
+
"@syncfusion/ej2-base": "~21.2.9",
|
|
36
|
+
"@syncfusion/ej2-buttons": "~21.2.10",
|
|
37
|
+
"@syncfusion/ej2-inputs": "~21.2.9",
|
|
38
|
+
"@syncfusion/ej2-navigations": "~21.2.9",
|
|
39
|
+
"@syncfusion/ej2-popups": "~21.2.10",
|
|
40
40
|
"@syncfusion/ej2-splitbuttons": "~21.2.5"
|
|
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": "21.2.
|
|
70
|
+
"version": "21.2.10",
|
|
71
71
|
"sideEffects": false,
|
|
72
72
|
"homepage": "https://www.syncfusion.com/javascript-ui-controls"
|
|
73
73
|
}
|
|
@@ -3402,6 +3402,7 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
3402
3402
|
this.pointColl = [];
|
|
3403
3403
|
this.freehandCounter = 0;
|
|
3404
3404
|
this.objColl.push(this.currSelectionPoint);
|
|
3405
|
+
this.currSelectionPoint = null;
|
|
3405
3406
|
this.zoomAction(this.cropObj.cropZoom);
|
|
3406
3407
|
this.currSelectionPoint = extend({}, this.objColl[0], null, true);
|
|
3407
3408
|
this.objColl = cropObjColl_1;
|
|
@@ -6258,7 +6259,9 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
6258
6259
|
if (this.disabled) {
|
|
6259
6260
|
this.element.setAttribute('class', 'e-disabled');
|
|
6260
6261
|
}
|
|
6261
|
-
this.
|
|
6262
|
+
if (this.isImageLoaded && this.element.style.opacity !== '0.5') {
|
|
6263
|
+
this.trigger('fileOpened', fileOpened);
|
|
6264
|
+
}
|
|
6262
6265
|
if (this.zoomSettings.zoomFactor !== 1 || !isNullOrUndefined(this.zoomSettings.zoomPoint)) {
|
|
6263
6266
|
this.zoom(this.zoomSettings.zoomFactor, this.zoomSettings.zoomPoint);
|
|
6264
6267
|
}
|
|
@@ -6503,10 +6506,33 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
6503
6506
|
};
|
|
6504
6507
|
ImageEditor.prototype.fileSelect = function (inputElement, args) {
|
|
6505
6508
|
if (!this.disabled) {
|
|
6506
|
-
showSpinner(this.element);
|
|
6507
|
-
this.element.style.opacity = '0.5';
|
|
6508
6509
|
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
6509
6510
|
var filesData = args.target.files[0];
|
|
6511
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
6512
|
+
var fileData = filesData;
|
|
6513
|
+
if (!isNullOrUndefined(fileData.name.split('.')) &&
|
|
6514
|
+
!isNullOrUndefined(fileData.name.split('.')[1]) &&
|
|
6515
|
+
fileData.name.split('.')[1].toLowerCase() !== 'jpg' &&
|
|
6516
|
+
fileData.name.split('.')[1].toLowerCase() !== 'jpeg' &&
|
|
6517
|
+
fileData.name.split('.')[1].toLowerCase() !== 'png' &&
|
|
6518
|
+
fileData.name.split('.')[1].toLowerCase() !== 'svg') {
|
|
6519
|
+
return;
|
|
6520
|
+
}
|
|
6521
|
+
showSpinner(this.element);
|
|
6522
|
+
this.element.style.opacity = '0.5';
|
|
6523
|
+
if (!isNullOrUndefined(fileData.name.split('.')) &&
|
|
6524
|
+
!isNullOrUndefined(fileData.name.split('.')[1])) {
|
|
6525
|
+
var fileType = this.toPascalCase(fileData.name.split('.')[1]);
|
|
6526
|
+
if (fileType === 'JPG' || fileType === 'Jpg') {
|
|
6527
|
+
this.fileType = 'Jpeg';
|
|
6528
|
+
}
|
|
6529
|
+
else {
|
|
6530
|
+
this.fileType = fileType;
|
|
6531
|
+
}
|
|
6532
|
+
}
|
|
6533
|
+
else {
|
|
6534
|
+
this.fileType = null;
|
|
6535
|
+
}
|
|
6510
6536
|
if (this.isImageLoaded) {
|
|
6511
6537
|
this.isImageLoaded = false;
|
|
6512
6538
|
this.reset();
|
|
@@ -8137,17 +8163,19 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
8137
8163
|
if (this.degree === 0 || this.degree === 180) {
|
|
8138
8164
|
if (!isNullOrUndefined(this.activeObj.shape)) {
|
|
8139
8165
|
this.setZoomDimension(-0.1, this.activeObj);
|
|
8140
|
-
if (
|
|
8141
|
-
this.destLeft
|
|
8142
|
-
|
|
8143
|
-
|
|
8144
|
-
|
|
8145
|
-
|
|
8146
|
-
|
|
8147
|
-
|
|
8148
|
-
|
|
8149
|
-
|
|
8150
|
-
|
|
8166
|
+
if (!isNullOrUndefined(zoomOut)) {
|
|
8167
|
+
if (this.destLeft > this.activeObj.activePoint.startX || this.destTop > this.activeObj.activePoint.startY ||
|
|
8168
|
+
this.destLeft + this.destWidth < this.activeObj.activePoint.endX || this.destTop + this.destHeight <
|
|
8169
|
+
this.activeObj.activePoint.endY) {
|
|
8170
|
+
zoomOut.classList.add('e-disabled');
|
|
8171
|
+
zoomOut.parentElement.classList.add('e-overlay');
|
|
8172
|
+
isDisabled = true;
|
|
8173
|
+
}
|
|
8174
|
+
else {
|
|
8175
|
+
zoomOut.classList.remove('e-disabled');
|
|
8176
|
+
zoomOut.parentElement.classList.remove('e-overlay');
|
|
8177
|
+
isDisabled = false;
|
|
8178
|
+
}
|
|
8151
8179
|
}
|
|
8152
8180
|
}
|
|
8153
8181
|
else {
|
|
@@ -13330,10 +13358,24 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
13330
13358
|
else {
|
|
13331
13359
|
this.fileName = 'ImageEditor';
|
|
13332
13360
|
}
|
|
13361
|
+
if (!isNullOrUndefined(data.split('.')) &&
|
|
13362
|
+
!isNullOrUndefined(data.split('.')[2])) {
|
|
13363
|
+
var fileType = this.toPascalCase(data.split('.')[2]);
|
|
13364
|
+
if (fileType === 'JPG' || fileType === 'Jpg') {
|
|
13365
|
+
this.fileType = 'Jpeg';
|
|
13366
|
+
}
|
|
13367
|
+
else {
|
|
13368
|
+
this.fileType = fileType;
|
|
13369
|
+
}
|
|
13370
|
+
}
|
|
13371
|
+
else {
|
|
13372
|
+
this.fileType = null;
|
|
13373
|
+
}
|
|
13333
13374
|
this.imageOnLoad(data);
|
|
13334
13375
|
}
|
|
13335
13376
|
else {
|
|
13336
13377
|
this.fileName = 'ImageEditor';
|
|
13378
|
+
this.fileType = null;
|
|
13337
13379
|
this.lowerCanvas = document.querySelector('#' + this.element.id + '_lowerCanvas');
|
|
13338
13380
|
this.upperCanvas = document.querySelector('#' + this.element.id + '_upperCanvas');
|
|
13339
13381
|
this.lowerContext = this.lowerCanvas.getContext('2d');
|
|
@@ -13483,7 +13525,9 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
13483
13525
|
if (!isNullOrUndefined(document.getElementById(this.element.id + '_quickAccessToolbarArea'))) {
|
|
13484
13526
|
document.getElementById(this.element.id + '_quickAccessToolbarArea').style.display = 'none';
|
|
13485
13527
|
}
|
|
13528
|
+
this.isImageLoaded = false;
|
|
13486
13529
|
this.updateCanvas();
|
|
13530
|
+
this.isImageLoaded = true;
|
|
13487
13531
|
this.refreshDropDownBtn(false);
|
|
13488
13532
|
this.enableDisableToolbarBtn();
|
|
13489
13533
|
}
|