@syncfusion/ej2-image-editor 28.1.41 → 29.1.33
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/README.md +1 -1
- 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 +220 -63
- package/dist/es6/ej2-image-editor.es2015.js.map +1 -1
- package/dist/es6/ej2-image-editor.es5.js +229 -72
- 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 -13
- package/src/image-editor/action/draw.js +1 -1
- package/src/image-editor/action/filter.js +0 -15
- package/src/image-editor/action/selection.js +46 -3
- package/src/image-editor/action/transform.js +4 -1
- package/src/image-editor/base/image-editor.d.ts +3 -1
- package/src/image-editor/base/image-editor.js +110 -35
- package/src/image-editor/renderer/toolbar.js +68 -17
- package/styles/bds-lite.css +11 -0
- package/styles/bds.css +11 -0
- package/styles/bootstrap-dark-lite.css +11 -0
- package/styles/bootstrap-dark.css +11 -0
- package/styles/bootstrap-lite.css +11 -0
- package/styles/bootstrap.css +11 -0
- package/styles/bootstrap4-lite.css +17 -6
- package/styles/bootstrap4.css +17 -6
- package/styles/bootstrap5-dark-lite.css +23 -12
- package/styles/bootstrap5-dark.css +23 -12
- package/styles/bootstrap5-lite.css +20 -9
- package/styles/bootstrap5.3-lite.css +11 -0
- package/styles/bootstrap5.3.css +11 -0
- package/styles/bootstrap5.css +20 -9
- package/styles/fabric-dark-lite.css +11 -0
- package/styles/fabric-dark.css +11 -0
- package/styles/fabric-lite.css +11 -0
- package/styles/fabric.css +11 -0
- package/styles/fluent-dark-lite.css +11 -0
- package/styles/fluent-dark.css +11 -0
- package/styles/fluent-lite.css +11 -0
- package/styles/fluent.css +11 -0
- package/styles/fluent2-lite.css +11 -0
- package/styles/fluent2.css +11 -0
- package/styles/highcontrast-light-lite.css +11 -0
- package/styles/highcontrast-light.css +11 -0
- package/styles/highcontrast-lite.css +11 -0
- package/styles/highcontrast.css +11 -0
- package/styles/image-editor/_layout.scss +11 -0
- package/styles/image-editor/_material-dark-definition.scss +3 -1
- package/styles/image-editor/_theme.scss +4 -2
- package/styles/image-editor/bds.css +11 -0
- package/styles/image-editor/bootstrap-dark.css +11 -0
- package/styles/image-editor/bootstrap.css +11 -0
- package/styles/image-editor/bootstrap4.css +17 -6
- package/styles/image-editor/bootstrap5-dark.css +23 -12
- package/styles/image-editor/bootstrap5.3.css +11 -0
- package/styles/image-editor/bootstrap5.css +20 -9
- package/styles/image-editor/fabric-dark.css +11 -0
- package/styles/image-editor/fabric.css +11 -0
- package/styles/image-editor/fluent-dark.css +11 -0
- package/styles/image-editor/fluent.css +11 -0
- package/styles/image-editor/fluent2.css +11 -0
- package/styles/image-editor/highcontrast-light.css +11 -0
- package/styles/image-editor/highcontrast.css +11 -0
- package/styles/image-editor/material-dark.css +16 -5
- package/styles/image-editor/material.css +14 -3
- package/styles/image-editor/material3-dark.css +11 -0
- package/styles/image-editor/material3.css +11 -0
- package/styles/image-editor/tailwind-dark.css +11 -0
- package/styles/image-editor/tailwind.css +11 -0
- package/styles/image-editor/tailwind3.css +11 -0
- package/styles/material-dark-lite.css +16 -5
- package/styles/material-dark.css +16 -5
- package/styles/material-lite.css +14 -3
- package/styles/material.css +14 -3
- package/styles/material3-dark-lite.css +11 -0
- package/styles/material3-dark.css +11 -0
- package/styles/material3-lite.css +11 -0
- package/styles/material3.css +11 -0
- package/styles/tailwind-dark-lite.css +11 -0
- package/styles/tailwind-dark.css +11 -0
- package/styles/tailwind-lite.css +11 -0
- package/styles/tailwind.css +11 -0
- package/styles/tailwind3-lite.css +11 -0
- package/styles/tailwind3.css +11 -0
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version :
|
|
3
|
+
* version : 29.1.33
|
|
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,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-image-editor@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-image-editor@28.1.
|
|
3
|
+
"_id": "@syncfusion/ej2-image-editor@28.1.33",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-IhibAvVcTb8/93MUyRUIv6ypSuzHIng/332tVEMgiqV2roeiiEPCLiGaBJPXuHUP6sH73x/mMUf1Q0S4KG/5Hg==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-image-editor",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -23,22 +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-
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-release/@syncfusion/ej2-image-editor/-/ej2-image-editor-28.1.33.tgz",
|
|
27
|
+
"_shasum": "d7cf3fcc02b854ee8fe345328507a49dd1a8cda2",
|
|
28
28
|
"_spec": "@syncfusion/ej2-image-editor@*",
|
|
29
|
-
"_where": "/jenkins/workspace/elease-
|
|
29
|
+
"_where": "/jenkins/workspace/elease-automation_release_29.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-dropdowns": "~
|
|
38
|
-
"@syncfusion/ej2-inputs": "~
|
|
39
|
-
"@syncfusion/ej2-navigations": "~
|
|
40
|
-
"@syncfusion/ej2-popups": "~
|
|
41
|
-
"@syncfusion/ej2-splitbuttons": "~
|
|
35
|
+
"@syncfusion/ej2-base": "~29.1.33",
|
|
36
|
+
"@syncfusion/ej2-buttons": "~29.1.33",
|
|
37
|
+
"@syncfusion/ej2-dropdowns": "~29.1.33",
|
|
38
|
+
"@syncfusion/ej2-inputs": "~29.1.33",
|
|
39
|
+
"@syncfusion/ej2-navigations": "~29.1.33",
|
|
40
|
+
"@syncfusion/ej2-popups": "~29.1.33",
|
|
41
|
+
"@syncfusion/ej2-splitbuttons": "~29.1.33"
|
|
42
42
|
},
|
|
43
43
|
"deprecated": false,
|
|
44
44
|
"description": "Essential JS 2 ImageEditor",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"url": "https://github.com/syncfusion/ej2-javascript-ui-controls/tree/master/controls/imageeditor"
|
|
69
69
|
},
|
|
70
70
|
"typings": "index.d.ts",
|
|
71
|
-
"version": "
|
|
71
|
+
"version": "29.1.33",
|
|
72
72
|
"sideEffects": false,
|
|
73
73
|
"homepage": "https://www.syncfusion.com/javascript-ui-controls"
|
|
74
74
|
}
|
|
@@ -76,9 +76,6 @@ var Filter = /** @class */ (function () {
|
|
|
76
76
|
case 'setAdjustmentValue':
|
|
77
77
|
this.adjustmentValue = args.value['adjustmentValue'];
|
|
78
78
|
break;
|
|
79
|
-
case 'getBrightnessAdjusted':
|
|
80
|
-
args.value['obj']['isBrightnessAdjusted'] = this.isBrightnessAdjusted;
|
|
81
|
-
break;
|
|
82
79
|
case 'setBrightnessAdjusted':
|
|
83
80
|
this.isBrightnessAdjusted = args.value['isBrightnessAdjusted'];
|
|
84
81
|
if (this.parent.currentFilter.split('_') && this.parent.currentFilter.split('_')[1] === 'cold') {
|
|
@@ -156,18 +153,6 @@ var Filter = /** @class */ (function () {
|
|
|
156
153
|
var splitWords = this.lowerContext.filter.split(' ');
|
|
157
154
|
var values = [];
|
|
158
155
|
var brightness = this.getFilterValue(this.adjustmentLevel.brightness);
|
|
159
|
-
var excludedTypes = ['brightness', 'contrast', 'hue', 'saturation', 'exposure', 'opacity', 'blur'];
|
|
160
|
-
if (excludedTypes.indexOf(type) === -1) {
|
|
161
|
-
if (isNullOrUndefined(isPreview) && (this.adjustmentLevel.sharpen || this.adjustmentLevel.bw)) {
|
|
162
|
-
parent.isUndoRedo = true;
|
|
163
|
-
var temp = this.lowerContext.filter;
|
|
164
|
-
this.lowerContext.filter = 'none';
|
|
165
|
-
parent.notify('shape', { prop: 'drawAnnotations', onPropertyChange: false,
|
|
166
|
-
value: { ctx: this.lowerContext, shape: 'iterate', pen: 'iterate', isPreventApply: null } });
|
|
167
|
-
this.lowerContext.filter = temp;
|
|
168
|
-
parent.isUndoRedo = false;
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
156
|
var saturate;
|
|
172
157
|
var bright;
|
|
173
158
|
var saturatePercent;
|
|
@@ -332,6 +332,48 @@ var Selection = /** @class */ (function () {
|
|
|
332
332
|
case 'setTransformedShape':
|
|
333
333
|
this.isTransformedShape = args.value['bool'];
|
|
334
334
|
break;
|
|
335
|
+
case 'rgbToHex':
|
|
336
|
+
this.rgbToHex(args.value['r'], args.value['g'], args.value['b'], args.value['a']);
|
|
337
|
+
break;
|
|
338
|
+
case 'padLeft':
|
|
339
|
+
this.padLeft(args.value['value'], args.value['length'], args.value['padChar']);
|
|
340
|
+
break;
|
|
341
|
+
case 'setTimer':
|
|
342
|
+
this.setTimer(args.value['e']);
|
|
343
|
+
break;
|
|
344
|
+
case 'targetTouches':
|
|
345
|
+
args.value['output'] = this.targetTouches(args.value['touches']);
|
|
346
|
+
break;
|
|
347
|
+
case 'calculateScale':
|
|
348
|
+
args.value['output'] = this.calculateScale(args.value['startTouches'], args.value['endTouches']);
|
|
349
|
+
break;
|
|
350
|
+
case 'beforeSaveEvent':
|
|
351
|
+
this.beforeSaveEvent(args.value['args'], args.value['e']);
|
|
352
|
+
break;
|
|
353
|
+
case 'isKeyBoardCrop':
|
|
354
|
+
args.value['output'] = this.isKeyBoardCrop(args.value['e']);
|
|
355
|
+
break;
|
|
356
|
+
case 'focusRatioBtn':
|
|
357
|
+
this.focusRatioBtn();
|
|
358
|
+
break;
|
|
359
|
+
case 'performEnterAction':
|
|
360
|
+
this.performEnterAction(args.value['e']);
|
|
361
|
+
break;
|
|
362
|
+
case 'getImagePoints':
|
|
363
|
+
args.value['output'] = this.getImagePoints(args.value['x'], args.value['y']);
|
|
364
|
+
break;
|
|
365
|
+
case 'revertPoints':
|
|
366
|
+
this.revertPoints(args.value['actPoint'], args.value['tempActiveObj']);
|
|
367
|
+
break;
|
|
368
|
+
case 'performNWResize':
|
|
369
|
+
this.performNWResize(args.value['x'], args.value['y'], args.value['tempActiveObj'], args.value['actPoint']);
|
|
370
|
+
break;
|
|
371
|
+
case 'performSEResize':
|
|
372
|
+
this.performSEResize(args.value['x'], args.value['y'], args.value['tempActiveObj'], args.value['actPoint']);
|
|
373
|
+
break;
|
|
374
|
+
case 'isMouseOutsideImg':
|
|
375
|
+
args.value['output'] = this.isMouseOutsideImg(args.value['x'], args.value['y']);
|
|
376
|
+
break;
|
|
335
377
|
}
|
|
336
378
|
};
|
|
337
379
|
Selection.prototype.getModuleName = function () {
|
|
@@ -3222,7 +3264,7 @@ var Selection = /** @class */ (function () {
|
|
|
3222
3264
|
parent.cursor : 'default';
|
|
3223
3265
|
var tempCursor = parent.upperCanvas.style.cursor;
|
|
3224
3266
|
if (parent.isResize) {
|
|
3225
|
-
this.performEnterAction();
|
|
3267
|
+
this.performEnterAction(e);
|
|
3226
3268
|
parent.upperCanvas.style.cursor = 'default';
|
|
3227
3269
|
return;
|
|
3228
3270
|
}
|
|
@@ -3860,9 +3902,10 @@ var Selection = /** @class */ (function () {
|
|
|
3860
3902
|
}
|
|
3861
3903
|
parent.notify('toolbar', { prop: 'update-toolbar-items', onPropertyChange: false });
|
|
3862
3904
|
if (!this.isFhdEditing) {
|
|
3905
|
+
var width = Math.floor(parent.activeObj.activePoint.width);
|
|
3863
3906
|
if (parent.activeObj.shape && parent.activeObj.shape === 'text' &&
|
|
3864
|
-
parent.activeObj.textSettings.fontSize === 11 && Math.floor(parent.activeObj.activePoint.
|
|
3865
|
-
|
|
3907
|
+
parent.activeObj.textSettings.fontSize === 11 && Math.floor(parent.activeObj.activePoint.height) === 11 &&
|
|
3908
|
+
(width === 55 || (parent.activeObj.textSettings.bold && width === 58))) {
|
|
3866
3909
|
parent.notify('shape', { prop: 'refreshActiveObj', onPropertyChange: false });
|
|
3867
3910
|
if (parent.drawingShape === 'text' && !parent.activeObj.keyHistory) {
|
|
3868
3911
|
parent.activeObj.keyHistory = 'Enter Text';
|
|
@@ -2198,13 +2198,16 @@ var Transform = /** @class */ (function () {
|
|
|
2198
2198
|
};
|
|
2199
2199
|
Transform.prototype.straightenImage = function (degree) {
|
|
2200
2200
|
var parent = this.parent;
|
|
2201
|
+
var isSelection = parent.activeObj.shape && parent.activeObj.shape.indexOf('crop-') > -1;
|
|
2201
2202
|
if (parent.toolbar && parent.toolbar.length === 0) {
|
|
2202
2203
|
parent.notify('draw', { prop: 'select', onPropertyChange: false,
|
|
2203
2204
|
value: { type: 'custom', startX: null, startY: null, width: null, height: null } });
|
|
2204
2205
|
}
|
|
2205
2206
|
parent.notify('toolbar', { prop: 'performCropTransformClick', value: { shape: null } });
|
|
2206
2207
|
parent.setStraighten(degree);
|
|
2207
|
-
|
|
2208
|
+
if (!isSelection) {
|
|
2209
|
+
parent.okBtn();
|
|
2210
|
+
}
|
|
2208
2211
|
};
|
|
2209
2212
|
return Transform;
|
|
2210
2213
|
}());
|
|
@@ -998,6 +998,7 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
|
|
|
998
998
|
private windowResizeHandler;
|
|
999
999
|
private notifyResetForAllModules;
|
|
1000
1000
|
private allowShape;
|
|
1001
|
+
private manageActiveAction;
|
|
1001
1002
|
/**
|
|
1002
1003
|
* Clears the current selection performed in the image editor.
|
|
1003
1004
|
*
|
|
@@ -1627,10 +1628,11 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
|
|
|
1627
1628
|
*
|
|
1628
1629
|
* @param { boolean } isMouseDown - Specifies whether it is a mouse down.
|
|
1629
1630
|
* @param { boolean } isFinalApply - Specifies whether it is a final apply.
|
|
1631
|
+
* @param { boolean } isResize - Specifies whether it is called from resize public method.
|
|
1630
1632
|
* @hidden
|
|
1631
1633
|
* @returns {void}.
|
|
1632
1634
|
*/
|
|
1633
|
-
okBtn(isMouseDown?: boolean, isFinalApply?: boolean): void;
|
|
1635
|
+
okBtn(isMouseDown?: boolean, isFinalApply?: boolean, isResize?: boolean): void;
|
|
1634
1636
|
triggerEditCompleteEvent(args: EditCompleteEventArgs): void;
|
|
1635
1637
|
/**
|
|
1636
1638
|
* Handles the OK button operation
|
|
@@ -808,6 +808,9 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
808
808
|
if (i === extension.length - 1 && extension.length > 1 &&
|
|
809
809
|
!((extension[i] === 'jpeg' || extension[i] === 'jpg') &&
|
|
810
810
|
(words.indexOf('JPG') > -1))) {
|
|
811
|
+
if (extension.length === 2 || (extension.length === 3 && extension.indexOf('jpeg') !== -1 && extension.indexOf('jpg') !== -1)) {
|
|
812
|
+
words = words.replace(/,\s*$/, '');
|
|
813
|
+
}
|
|
811
814
|
words += ' ' + andObj['value'];
|
|
812
815
|
}
|
|
813
816
|
switch (extension[i]) {
|
|
@@ -896,22 +899,24 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
896
899
|
}
|
|
897
900
|
this.element.style.width = this.width;
|
|
898
901
|
this.element.style.height = this.height;
|
|
899
|
-
var
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
+ 'px; position: relative; overflow: hidden; margin: 0 auto;' }
|
|
903
|
-
}));
|
|
902
|
+
var canvasWrapperElement = this.createElement('div', { id: this.element.id + '_canvasWrapper', className: 'e-canvas-wrapper' });
|
|
903
|
+
canvasWrapperElement.style.cssText = "height: " + (this.element.offsetHeight - height - 2) + "px; width: " + (this.element.offsetWidth - 2) + "px; position: relative; overflow: hidden; margin: 0 auto;";
|
|
904
|
+
var canvasWrapper = this.element.appendChild(canvasWrapperElement);
|
|
904
905
|
var dragObj = { key: 'DragText' };
|
|
905
906
|
this.notify('toolbar', { prop: 'getLocaleText', onPropertyChange: false, value: { obj: dragObj } });
|
|
906
907
|
var dropObj = { key: 'DropText' };
|
|
907
908
|
this.notify('toolbar', { prop: 'getLocaleText', onPropertyChange: false, value: { obj: dropObj } });
|
|
908
909
|
var browseObj = { key: 'BrowseText' };
|
|
909
910
|
this.notify('toolbar', { prop: 'getLocaleText', onPropertyChange: false, value: { obj: browseObj } });
|
|
910
|
-
var dropAreaElement = this.createElement('div', { id: this.element.id + '_dropArea', className: 'e-ie-drop-area'
|
|
911
|
-
|
|
912
|
-
var
|
|
911
|
+
var dropAreaElement = this.createElement('div', { id: this.element.id + '_dropArea', className: 'e-ie-drop-area' });
|
|
912
|
+
dropAreaElement.style.position = 'relative';
|
|
913
|
+
var dropIconElement = this.createElement('span', { className: 'e-ie-drop-icon e-icons e-image' });
|
|
914
|
+
dropIconElement.style.position = 'absolute';
|
|
915
|
+
var dropContentElement = this.createElement('span', { className: 'e-ie-drop-content' });
|
|
916
|
+
dropContentElement.style.cssText = 'position: absolute; display: none;';
|
|
913
917
|
dropContentElement.textContent = dragObj['value'] + ' ';
|
|
914
|
-
var minDropContentElem = this.createElement('span', { className: 'e-ie-min-drop-content'
|
|
918
|
+
var minDropContentElem = this.createElement('span', { className: 'e-ie-min-drop-content' });
|
|
919
|
+
minDropContentElem.style.position = 'absolute';
|
|
915
920
|
minDropContentElem.textContent = dropObj['value'] + ' ';
|
|
916
921
|
var dropAnchorElement = this.createElement('a', { id: this.element.id + '_dropBrowse', className: 'e-ie-drop-browse' });
|
|
917
922
|
dropAnchorElement.textContent = browseObj['value'];
|
|
@@ -1064,6 +1069,12 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
1064
1069
|
value: { x: x, y: y, obj: obj } });
|
|
1065
1070
|
return obj['inRange'];
|
|
1066
1071
|
};
|
|
1072
|
+
ImageEditor.prototype.manageActiveAction = function () {
|
|
1073
|
+
this.applyShapes();
|
|
1074
|
+
if (this.activeObj.shape && this.activeObj.shape.indexOf('crop') > -1) {
|
|
1075
|
+
this.discard();
|
|
1076
|
+
}
|
|
1077
|
+
};
|
|
1067
1078
|
/**
|
|
1068
1079
|
* Clears the current selection performed in the image editor.
|
|
1069
1080
|
*
|
|
@@ -1105,6 +1116,8 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
1105
1116
|
*
|
|
1106
1117
|
*/
|
|
1107
1118
|
ImageEditor.prototype.flip = function (direction) {
|
|
1119
|
+
this.applyShapes();
|
|
1120
|
+
this.updateImageTransformColl(direction.toLowerCase() + 'flip');
|
|
1108
1121
|
this.notify('transform', { prop: 'flip', value: { direction: direction } });
|
|
1109
1122
|
this.notify('draw', { prop: 'redrawDownScale' });
|
|
1110
1123
|
this.notify('undo-redo', { prop: 'updateCurrUrc', value: { type: 'ok' } });
|
|
@@ -1292,6 +1305,10 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
1292
1305
|
if (Browser.isDevice && straightenObj['bool']) {
|
|
1293
1306
|
this.notify('crop', { prop: 'resizeWrapper' });
|
|
1294
1307
|
}
|
|
1308
|
+
var saveDialog = this.element.querySelector('#' + this.element.id + '_saveDialog');
|
|
1309
|
+
if (saveDialog) {
|
|
1310
|
+
getComponent(saveDialog, 'dialog').close();
|
|
1311
|
+
}
|
|
1295
1312
|
var actionArgs = { action: 'reset', actionEventArgs: null };
|
|
1296
1313
|
this.triggerEditCompleteEvent(actionArgs);
|
|
1297
1314
|
}
|
|
@@ -1312,6 +1329,7 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
1312
1329
|
*/
|
|
1313
1330
|
ImageEditor.prototype.rotate = function (degree) {
|
|
1314
1331
|
var obj = { isRotate: false };
|
|
1332
|
+
this.applyShapes();
|
|
1315
1333
|
if (degree === 90 || degree === -90) {
|
|
1316
1334
|
this.updateImageTransformColl(degree === 90 ? 'rotateright' : 'rotateleft');
|
|
1317
1335
|
}
|
|
@@ -1401,7 +1419,7 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
1401
1419
|
this.discard();
|
|
1402
1420
|
return;
|
|
1403
1421
|
}
|
|
1404
|
-
this.
|
|
1422
|
+
this.manageActiveAction();
|
|
1405
1423
|
this.freeHandDraw(value);
|
|
1406
1424
|
var prevObj = { shapeSettingsObj: {} };
|
|
1407
1425
|
this.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: prevObj } });
|
|
@@ -1468,6 +1486,7 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
1468
1486
|
var isPointsInRange = this.allowShape(x, y);
|
|
1469
1487
|
if (!this.disabled && this.isImageLoaded && (isPointsInRange || (isNullOrUndefined(x) && isNullOrUndefined(y)))) {
|
|
1470
1488
|
isEllipse = true;
|
|
1489
|
+
this.manageActiveAction();
|
|
1471
1490
|
this.notify('shape', { prop: 'drawEllipse', onPropertyChange: false, value: { x: x, y: y, radiusX: radiusX, radiusY: radiusY,
|
|
1472
1491
|
strokeWidth: strokeWidth, strokeColor: strokeColor, fillColor: fillColor, degree: degree, isSelected: isSelected } });
|
|
1473
1492
|
this.editCompleted();
|
|
@@ -1491,6 +1510,7 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
1491
1510
|
var isPointsInRange = this.allowShape(startX, startY);
|
|
1492
1511
|
if (!this.disabled && this.isImageLoaded && (isPointsInRange || (isNullOrUndefined(startX) && isNullOrUndefined(startY)))) {
|
|
1493
1512
|
isLine = true;
|
|
1513
|
+
this.manageActiveAction();
|
|
1494
1514
|
this.notify('shape', { prop: 'drawLine', onPropertyChange: false, value: { startX: startX, startY: startY, endX: endX,
|
|
1495
1515
|
endY: endY, strokeWidth: strokeWidth, strokeColor: strokeColor, isSelected: isSelected } });
|
|
1496
1516
|
this.editCompleted();
|
|
@@ -1516,6 +1536,7 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
1516
1536
|
var isPointsInRange = this.allowShape(startX, startY);
|
|
1517
1537
|
if (!this.disabled && this.isImageLoaded && (isPointsInRange || (isNullOrUndefined(startX) && isNullOrUndefined(startY)))) {
|
|
1518
1538
|
isArrow = true;
|
|
1539
|
+
this.manageActiveAction();
|
|
1519
1540
|
this.notify('shape', { prop: 'drawArrow', onPropertyChange: false, value: { startX: startX, startY: startY, endX: endX,
|
|
1520
1541
|
endY: endY, strokeWidth: strokeWidth, strokeColor: strokeColor, arrowStart: arrowStart, arrowEnd: arrowEnd,
|
|
1521
1542
|
isSelected: isSelected } });
|
|
@@ -1547,7 +1568,7 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
1547
1568
|
}
|
|
1548
1569
|
if (!this.disabled && this.isImageLoaded && (obj['inRange'] || isNullOrUndefined(pointColl))) {
|
|
1549
1570
|
isPath = true;
|
|
1550
|
-
this.
|
|
1571
|
+
this.manageActiveAction();
|
|
1551
1572
|
this.notify('shape', { prop: 'drawPath', onPropertyChange: false, value: { pointColl: pointColl,
|
|
1552
1573
|
strokeWidth: strokeWidth, strokeColor: strokeColor, isSelected: isSelected } });
|
|
1553
1574
|
this.editCompleted();
|
|
@@ -1574,6 +1595,7 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
1574
1595
|
var isPointsInRange = this.allowShape(x, y);
|
|
1575
1596
|
if (!this.disabled && this.isImageLoaded && (isPointsInRange || (isNullOrUndefined(x) && isNullOrUndefined(y)))) {
|
|
1576
1597
|
isRectangle = true;
|
|
1598
|
+
this.manageActiveAction();
|
|
1577
1599
|
this.notify('shape', { prop: 'drawRectangle', onPropertyChange: false, value: { x: x, y: y, width: width, height: height,
|
|
1578
1600
|
strokeWidth: strokeWidth, strokeColor: strokeColor, fillColor: fillColor, degree: degree, isSelected: isSelected,
|
|
1579
1601
|
radius: borderRadius } });
|
|
@@ -1608,6 +1630,7 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
1608
1630
|
var isPointsInRange = this.allowShape(x, y);
|
|
1609
1631
|
if (!this.disabled && this.isImageLoaded && (isPointsInRange || (isNullOrUndefined(x) && isNullOrUndefined(y)))) {
|
|
1610
1632
|
isText = true;
|
|
1633
|
+
this.manageActiveAction();
|
|
1611
1634
|
this.notify('shape', { prop: 'drawText', onPropertyChange: false, value: { x: x, y: y, text: text, fontFamily: fontFamily,
|
|
1612
1635
|
fontSize: fontSize, bold: bold, italic: italic, color: color, isSelected: isSelected, degree: degree, fillColor: fillColor,
|
|
1613
1636
|
outlineColor: strokeColor, outlineWidth: strokeWidth, transformCollection: transformCollection } });
|
|
@@ -1635,6 +1658,7 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
1635
1658
|
var isImage = false;
|
|
1636
1659
|
var isPointsInRange = this.allowShape(x, y);
|
|
1637
1660
|
if (!this.disabled && this.isImageLoaded && (isPointsInRange || (isNullOrUndefined(x) && isNullOrUndefined(y)))) {
|
|
1661
|
+
this.manageActiveAction();
|
|
1638
1662
|
var length_1 = this.objColl.length;
|
|
1639
1663
|
this.notify('shape', { prop: 'drawImage', onPropertyChange: false, value: { x: x, y: y, width: width, height: height,
|
|
1640
1664
|
src: data, degree: degree, isAspectRatio: isAspectRatio, opacity: opacity, isSelected: isSelected } });
|
|
@@ -1682,7 +1706,7 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
1682
1706
|
this.okBtn(null, true);
|
|
1683
1707
|
isTextArea = true;
|
|
1684
1708
|
}
|
|
1685
|
-
this.notify('shape', { prop: 'selectShape', onPropertyChange: false, value: { id: setting.id, obj: obj } });
|
|
1709
|
+
this.notify('shape', { prop: 'selectShape', onPropertyChange: false, value: { id: setting.id, obj: obj, isShape: true } });
|
|
1686
1710
|
this.notify('selection', { prop: 'getFreehandDrawEditing', onPropertyChange: false, value: { obj: freehandObj } });
|
|
1687
1711
|
if (obj['isSelected']) {
|
|
1688
1712
|
var tempFontSize = this.activeObj.textSettings.fontSize;
|
|
@@ -1742,7 +1766,7 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
1742
1766
|
ImageEditor.prototype.selectShape = function (id) {
|
|
1743
1767
|
this.applyShapes();
|
|
1744
1768
|
var obj = { isSelected: false };
|
|
1745
|
-
this.notify('shape', { prop: 'selectShape', onPropertyChange: false, value: { id: id, obj: obj } });
|
|
1769
|
+
this.notify('shape', { prop: 'selectShape', onPropertyChange: false, value: { id: id, obj: obj, isShape: true } });
|
|
1746
1770
|
this.editCompleted('shape-select');
|
|
1747
1771
|
this.noRedact = false;
|
|
1748
1772
|
return obj['isSelected'];
|
|
@@ -1764,7 +1788,7 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
1764
1788
|
return;
|
|
1765
1789
|
}
|
|
1766
1790
|
this.applyShapes();
|
|
1767
|
-
this.notify('shape', { prop: 'deleteShape', onPropertyChange: false, value: { id: id } });
|
|
1791
|
+
this.notify('shape', { prop: 'deleteShape', onPropertyChange: false, value: { id: id, isShape: true } });
|
|
1768
1792
|
this.editCompleted('shape-delete');
|
|
1769
1793
|
};
|
|
1770
1794
|
/**
|
|
@@ -1823,7 +1847,7 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
1823
1847
|
ImageEditor.prototype.selectRedact = function (id) {
|
|
1824
1848
|
this.applyShapes();
|
|
1825
1849
|
var obj = { isSelected: false };
|
|
1826
|
-
this.notify('shape', { prop: 'selectShape', onPropertyChange: false, value: { id: id, obj: obj } });
|
|
1850
|
+
this.notify('shape', { prop: 'selectShape', onPropertyChange: false, value: { id: id, obj: obj, isRedact: true } });
|
|
1827
1851
|
this.editCompleted('redact-select');
|
|
1828
1852
|
this.noRedact = false;
|
|
1829
1853
|
return obj['isSelected'];
|
|
@@ -1839,7 +1863,7 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
1839
1863
|
*/
|
|
1840
1864
|
ImageEditor.prototype.deleteRedact = function (id) {
|
|
1841
1865
|
this.applyShapes();
|
|
1842
|
-
this.notify('shape', { prop: 'deleteShape', onPropertyChange: false, value: { id: id } });
|
|
1866
|
+
this.notify('shape', { prop: 'deleteShape', onPropertyChange: false, value: { id: id, isRedact: true } });
|
|
1843
1867
|
this.editCompleted('redact-delete');
|
|
1844
1868
|
};
|
|
1845
1869
|
/**
|
|
@@ -1854,7 +1878,7 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
1854
1878
|
ImageEditor.prototype.updateRedact = function (setting, isSelected) {
|
|
1855
1879
|
this.applyShapes();
|
|
1856
1880
|
var obj = { isSelected: false };
|
|
1857
|
-
this.notify('shape', { prop: 'selectShape', onPropertyChange: false, value: { id: setting.id, obj: obj } });
|
|
1881
|
+
this.notify('shape', { prop: 'selectShape', onPropertyChange: false, value: { id: setting.id, obj: obj, isRedact: true } });
|
|
1858
1882
|
if (obj['isSelected']) {
|
|
1859
1883
|
this.notify('shape', { prop: 'updateShapeChangeEventArgs', onPropertyChange: false,
|
|
1860
1884
|
value: { shapeSettings: setting } });
|
|
@@ -1904,7 +1928,7 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
1904
1928
|
*/
|
|
1905
1929
|
ImageEditor.prototype.finetuneImage = function (finetuneOption, value) {
|
|
1906
1930
|
if (!this.disabled && this.isImageLoaded) {
|
|
1907
|
-
this.
|
|
1931
|
+
this.manageActiveAction();
|
|
1908
1932
|
this.notify('filter', { prop: 'finetuneImage', value: { value: value, option: finetuneOption } });
|
|
1909
1933
|
this.editCompleteArgs = { finetune: finetuneOption, value: value };
|
|
1910
1934
|
this.editCompleted('fine-tune');
|
|
@@ -1921,7 +1945,7 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
1921
1945
|
*/
|
|
1922
1946
|
ImageEditor.prototype.applyImageFilter = function (filterOption) {
|
|
1923
1947
|
if (!this.disabled && this.isImageLoaded) {
|
|
1924
|
-
this.
|
|
1948
|
+
this.manageActiveAction();
|
|
1925
1949
|
this.notify('filter', { prop: 'applyImageFilter', value: { option: filterOption.toString() } });
|
|
1926
1950
|
this.editCompleteArgs = { filter: filterOption };
|
|
1927
1951
|
this.editCompleted('filter');
|
|
@@ -1938,7 +1962,7 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
1938
1962
|
* @returns {void}.
|
|
1939
1963
|
*/
|
|
1940
1964
|
ImageEditor.prototype.undo = function () {
|
|
1941
|
-
this.
|
|
1965
|
+
this.manageActiveAction();
|
|
1942
1966
|
this.notify('undo-redo', { prop: 'undo', onPropertyChange: false });
|
|
1943
1967
|
this.notify('draw', { prop: 'redrawDownScale' });
|
|
1944
1968
|
};
|
|
@@ -1950,7 +1974,7 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
1950
1974
|
* @returns {void}.
|
|
1951
1975
|
*/
|
|
1952
1976
|
ImageEditor.prototype.redo = function () {
|
|
1953
|
-
this.
|
|
1977
|
+
this.manageActiveAction();
|
|
1954
1978
|
this.notify('undo-redo', { prop: 'redo', onPropertyChange: false });
|
|
1955
1979
|
this.notify('draw', { prop: 'redrawDownScale' });
|
|
1956
1980
|
};
|
|
@@ -1975,8 +1999,9 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
1975
1999
|
*/
|
|
1976
2000
|
ImageEditor.prototype.resize = function (width, height, isAspectRatio) {
|
|
1977
2001
|
var isResized = false;
|
|
1978
|
-
if ((width.toString()).length <= 4 && (height.toString()).length <= 4) {
|
|
1979
|
-
this.
|
|
2002
|
+
if (((width.toString()).length <= 4 && (height.toString()).length <= 4) && (!this.isCircleCrop || isAspectRatio)) {
|
|
2003
|
+
this.manageActiveAction();
|
|
2004
|
+
this.notify('toolbar', { prop: 'resizeClick', value: { bool: false } });
|
|
1980
2005
|
var destPoints = { startX: this.img.destLeft, startY: this.img.destTop, width: this.img.destWidth,
|
|
1981
2006
|
height: this.img.destHeight };
|
|
1982
2007
|
if (isAspectRatio) {
|
|
@@ -2001,7 +2026,12 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
2001
2026
|
if (destPoints.startX !== this.img.destLeft || destPoints.startY !== this.img.destTop ||
|
|
2002
2027
|
destPoints.width !== this.img.destWidth || destPoints.height !== this.img.destHeight) {
|
|
2003
2028
|
isResized = true;
|
|
2004
|
-
this.
|
|
2029
|
+
this.aspectWidth = width;
|
|
2030
|
+
this.aspectHeight = height;
|
|
2031
|
+
if (isAspectRatio) {
|
|
2032
|
+
this.aspectHeight = null;
|
|
2033
|
+
}
|
|
2034
|
+
this.okBtn(false, false, true);
|
|
2005
2035
|
}
|
|
2006
2036
|
else {
|
|
2007
2037
|
this.notify('draw', { prop: 'performCancel', value: { isContextualToolbar: null } });
|
|
@@ -2026,7 +2056,7 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
2026
2056
|
* @returns {boolean}.
|
|
2027
2057
|
*/
|
|
2028
2058
|
ImageEditor.prototype.drawFrame = function (frameType, color, gradientColor, size, inset, offset, borderRadius, frameLineStyle, lineCount) {
|
|
2029
|
-
this.
|
|
2059
|
+
this.manageActiveAction();
|
|
2030
2060
|
var isFrame = false;
|
|
2031
2061
|
var obj = { frameChangeEventArgs: null };
|
|
2032
2062
|
color = color ? color : '#fff';
|
|
@@ -2071,6 +2101,10 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
2071
2101
|
this.tempFrameZoomLevel = null;
|
|
2072
2102
|
}
|
|
2073
2103
|
this.notify('draw', { prop: 'redrawDownScale' });
|
|
2104
|
+
var ctxTbar = this.element.querySelector('.e-contextual-toolbar-wrapper');
|
|
2105
|
+
if (ctxTbar) {
|
|
2106
|
+
ctxTbar.classList.add('e-hide');
|
|
2107
|
+
}
|
|
2074
2108
|
return isFrame;
|
|
2075
2109
|
};
|
|
2076
2110
|
/**
|
|
@@ -2900,10 +2934,11 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
2900
2934
|
*
|
|
2901
2935
|
* @param { boolean } isMouseDown - Specifies whether it is a mouse down.
|
|
2902
2936
|
* @param { boolean } isFinalApply - Specifies whether it is a final apply.
|
|
2937
|
+
* @param { boolean } isResize - Specifies whether it is called from resize public method.
|
|
2903
2938
|
* @hidden
|
|
2904
2939
|
* @returns {void}.
|
|
2905
2940
|
*/
|
|
2906
|
-
ImageEditor.prototype.okBtn = function (isMouseDown, isFinalApply) {
|
|
2941
|
+
ImageEditor.prototype.okBtn = function (isMouseDown, isFinalApply, isResize) {
|
|
2907
2942
|
if (isFinalApply) {
|
|
2908
2943
|
this.noPushUndo = false;
|
|
2909
2944
|
var tempActiveObj = { activePoint: { startX: 0, startY: 0, endX: 0, endY: 0, width: 0, height: 0 },
|
|
@@ -3002,6 +3037,45 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
3002
3037
|
}
|
|
3003
3038
|
this.isAspectRatio = false;
|
|
3004
3039
|
}
|
|
3040
|
+
else if (isResize) {
|
|
3041
|
+
var isAspectRatio = false;
|
|
3042
|
+
if (this.aspectWidth && this.aspectHeight) {
|
|
3043
|
+
this.notify('transform', { prop: 'resize', value: { width: this.aspectWidth, height: this.aspectHeight, isAspectRatio: false } });
|
|
3044
|
+
}
|
|
3045
|
+
else if (this.aspectWidth) {
|
|
3046
|
+
this.notify('transform', { prop: 'resize', value: { width: this.aspectWidth, height: null, isAspectRatio: true } });
|
|
3047
|
+
this.aspectHeight = this.aspectWidth / (this.img.destWidth / this.img.destHeight);
|
|
3048
|
+
isAspectRatio = true;
|
|
3049
|
+
}
|
|
3050
|
+
this.isResize = false;
|
|
3051
|
+
this.notify('toolbar', { prop: 'refresh-toolbar', onPropertyChange: false, value: { type: 'main',
|
|
3052
|
+
isApplyBtn: false, isCropping: false, isZooming: null, cType: null } });
|
|
3053
|
+
this.notify('transform', { prop: 'zoomAction', onPropertyChange: false,
|
|
3054
|
+
value: { zoomFactor: -this.transform.zoomFactor, zoomPoint: null, isResize: true } });
|
|
3055
|
+
this.notify('transform', { prop: 'zoomAction', onPropertyChange: false,
|
|
3056
|
+
value: { zoomFactor: this.prevObj['defaultZoom'], zoomPoint: null, isResize: true } });
|
|
3057
|
+
if (this.prevObj.zoomFactor) {
|
|
3058
|
+
this.setProperties({ zoomSettings: { zoomFactor: this.prevObj.zoomFactor } }, true);
|
|
3059
|
+
}
|
|
3060
|
+
this.notify('transform', { prop: 'setPreviousZoomValue', onPropertyChange: false,
|
|
3061
|
+
value: { previousZoomValue: this.zoomSettings.zoomFactor } });
|
|
3062
|
+
this.notify('undo-redo', { prop: 'updateUndoRedoColl', onPropertyChange: false, value: { operation: 'resize',
|
|
3063
|
+
previousObj: this.prevObj, previousObjColl: this.prevObj['objColl'],
|
|
3064
|
+
previousPointColl: this.prevObj['pointColl'], previousSelPointColl: this.prevObj['selPointColl'],
|
|
3065
|
+
previousCropObj: this.prevCropObj, previousText: null, currentText: null, previousFilter: null,
|
|
3066
|
+
isCircleCrop: null } });
|
|
3067
|
+
this.notify('undo-redo', { prop: 'updateCurrUrc', value: { type: 'ok' } });
|
|
3068
|
+
var obj_4 = this.cancelCropSelection;
|
|
3069
|
+
if ((obj_4 && isAspectRatio)) {
|
|
3070
|
+
obj_4.previousObj.aspectWidth = obj_4.currentObj.aspectWidth = this.aspectWidth;
|
|
3071
|
+
obj_4.previousObj.aspectHeight = obj_4.currentObj.aspectHeight = this.aspectHeight;
|
|
3072
|
+
obj_4.previousCropObj = extend({}, this.cropObj, {}, true);
|
|
3073
|
+
obj_4.currentCropObj = extend({}, this.cropObj, {}, true);
|
|
3074
|
+
this.notify('draw', { prop: 'updateCropSelObj' });
|
|
3075
|
+
}
|
|
3076
|
+
this.cancelCropSelection = null;
|
|
3077
|
+
this.isAspectRatio = false;
|
|
3078
|
+
}
|
|
3005
3079
|
var selElem = this.element.querySelector('.e-contextual-toolbar-wrapper .e-toolbar-item.e-selected');
|
|
3006
3080
|
var obj = { bool: false };
|
|
3007
3081
|
this.notify('selection', { prop: 'getFreehandDrawEditing', onPropertyChange: false, value: { obj: obj } });
|
|
@@ -3047,8 +3121,8 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
3047
3121
|
else if ((sliderWrap || this.currObjType.isFiltered) && !this.drawingShape && this.activeObj.shape !== 'redact') {
|
|
3048
3122
|
this.initialAdjustmentValue = this.canvasFilter = this.lowerContext.filter;
|
|
3049
3123
|
this.currObjType.isFiltered = false;
|
|
3050
|
-
var
|
|
3051
|
-
this.notify('draw', { prop: 'getTempAdjustmentValue', value: { obj:
|
|
3124
|
+
var obj_5 = { value: null };
|
|
3125
|
+
this.notify('draw', { prop: 'getTempAdjustmentValue', value: { obj: obj_5 } });
|
|
3052
3126
|
if (!sliderWrap || sliderWrap.parentElement.previousElementSibling.textContent !== 'Opacity') {
|
|
3053
3127
|
this.notify('undo-redo', { prop: 'updateCurrUrc', value: { type: 'ok' } });
|
|
3054
3128
|
}
|
|
@@ -3747,19 +3821,19 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
3747
3821
|
var obj = { bool: false };
|
|
3748
3822
|
this.notify('selection', { prop: 'getFreehandDrawEditing', onPropertyChange: false, value: { obj: obj } });
|
|
3749
3823
|
if (obj['bool']) {
|
|
3750
|
-
var
|
|
3751
|
-
this.notify('freehand-draw', { prop: 'getPenStrokeWidth', onPropertyChange: false, value: { obj:
|
|
3824
|
+
var obj_6 = { penStrokeWidth: null };
|
|
3825
|
+
this.notify('freehand-draw', { prop: 'getPenStrokeWidth', onPropertyChange: false, value: { obj: obj_6 } });
|
|
3752
3826
|
this.upperContext.clearRect(0, 0, this.upperCanvas.width, this.upperCanvas.height);
|
|
3753
3827
|
this.lowerContext.clearRect(0, 0, this.lowerCanvas.width, this.lowerCanvas.height);
|
|
3754
3828
|
this.notify('freehand-draw', { prop: 'hoverFhd', onPropertyChange: false,
|
|
3755
|
-
value: { strokeColor: null, strokeWidth:
|
|
3829
|
+
value: { strokeColor: null, strokeWidth: obj_6['penStrokeWidth'] } });
|
|
3756
3830
|
var indexObj = { freehandSelectedIndex: null };
|
|
3757
3831
|
this.notify('freehand-draw', { prop: 'getFreehandSelectedIndex', onPropertyChange: false, value: { obj: indexObj } });
|
|
3758
|
-
this.pointColl[indexObj['freehandSelectedIndex']].strokeWidth =
|
|
3832
|
+
this.pointColl[indexObj['freehandSelectedIndex']].strokeWidth = obj_6['penStrokeWidth'];
|
|
3759
3833
|
this.notify('draw', { prop: 'render-image', value: { isMouseWheel: null } });
|
|
3760
3834
|
this.notify('draw', { prop: 'redrawDownScale' });
|
|
3761
3835
|
this.notify('freehand-draw', { prop: 'hoverFhd', onPropertyChange: false,
|
|
3762
|
-
value: { strokeColor: null, strokeWidth:
|
|
3836
|
+
value: { strokeColor: null, strokeWidth: obj_6['penStrokeWidth'] } });
|
|
3763
3837
|
this.notify('undo-redo', { prop: 'updateUndoRedoColl', onPropertyChange: false,
|
|
3764
3838
|
value: { operation: 'freehanddrawCustomized', previousObj: prevObj, previousObjColl: prevObj.objColl,
|
|
3765
3839
|
previousPointColl: prevObj.pointColl, previousSelPointColl: prevObj.selPointColl,
|
|
@@ -4400,9 +4474,9 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
4400
4474
|
var ctx = this.baseImgCanvas.getContext('2d');
|
|
4401
4475
|
if (ctx.canvas.width !== this.lowerContext.canvas.width &&
|
|
4402
4476
|
ctx.canvas.height !== this.lowerContext.canvas.height) {
|
|
4403
|
-
var
|
|
4477
|
+
var obj_7 = { width: 0, height: 0 };
|
|
4404
4478
|
this.notify('crop', { prop: 'calcRatio', onPropertyChange: false,
|
|
4405
|
-
value: { obj:
|
|
4479
|
+
value: { obj: obj_7, dimension: { width: ctx.canvas.width, height: ctx.canvas.height } } });
|
|
4406
4480
|
}
|
|
4407
4481
|
var dimension = void 0;
|
|
4408
4482
|
// eslint-disable-next-line prefer-const
|
|
@@ -4571,6 +4645,7 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
4571
4645
|
var isPointsInRange = this.allowShape(x, y);
|
|
4572
4646
|
if (!this.disabled && this.isImageLoaded && (isPointsInRange || (isNullOrUndefined(x) && isNullOrUndefined(y)))) {
|
|
4573
4647
|
isRedact = true;
|
|
4648
|
+
this.manageActiveAction();
|
|
4574
4649
|
this.notify('shape', {
|
|
4575
4650
|
prop: 'drawRedact', onPropertyChange: false, value: {
|
|
4576
4651
|
x: x, y: y, width: width, height: height, type: type, value: value
|