@syncfusion/ej2-image-editor 28.2.3 → 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
|
@@ -2959,7 +2959,7 @@ var Draw = /** @__PURE__ @class */ (function () {
|
|
|
2959
2959
|
}
|
|
2960
2960
|
}
|
|
2961
2961
|
else {
|
|
2962
|
-
canvasDraw.lineWidth =
|
|
2962
|
+
canvasDraw.lineWidth = 1;
|
|
2963
2963
|
}
|
|
2964
2964
|
var textStyle = '';
|
|
2965
2965
|
if (bold) {
|
|
@@ -6876,9 +6876,6 @@ var Filter = /** @__PURE__ @class */ (function () {
|
|
|
6876
6876
|
case 'setAdjustmentValue':
|
|
6877
6877
|
this.adjustmentValue = args.value['adjustmentValue'];
|
|
6878
6878
|
break;
|
|
6879
|
-
case 'getBrightnessAdjusted':
|
|
6880
|
-
args.value['obj']['isBrightnessAdjusted'] = this.isBrightnessAdjusted;
|
|
6881
|
-
break;
|
|
6882
6879
|
case 'setBrightnessAdjusted':
|
|
6883
6880
|
this.isBrightnessAdjusted = args.value['isBrightnessAdjusted'];
|
|
6884
6881
|
if (this.parent.currentFilter.split('_') && this.parent.currentFilter.split('_')[1] === 'cold') {
|
|
@@ -6956,18 +6953,6 @@ var Filter = /** @__PURE__ @class */ (function () {
|
|
|
6956
6953
|
var splitWords = this.lowerContext.filter.split(' ');
|
|
6957
6954
|
var values = [];
|
|
6958
6955
|
var brightness = this.getFilterValue(this.adjustmentLevel.brightness);
|
|
6959
|
-
var excludedTypes = ['brightness', 'contrast', 'hue', 'saturation', 'exposure', 'opacity', 'blur'];
|
|
6960
|
-
if (excludedTypes.indexOf(type) === -1) {
|
|
6961
|
-
if (isNullOrUndefined(isPreview) && (this.adjustmentLevel.sharpen || this.adjustmentLevel.bw)) {
|
|
6962
|
-
parent.isUndoRedo = true;
|
|
6963
|
-
var temp = this.lowerContext.filter;
|
|
6964
|
-
this.lowerContext.filter = 'none';
|
|
6965
|
-
parent.notify('shape', { prop: 'drawAnnotations', onPropertyChange: false,
|
|
6966
|
-
value: { ctx: this.lowerContext, shape: 'iterate', pen: 'iterate', isPreventApply: null } });
|
|
6967
|
-
this.lowerContext.filter = temp;
|
|
6968
|
-
parent.isUndoRedo = false;
|
|
6969
|
-
}
|
|
6970
|
-
}
|
|
6971
6956
|
var saturate;
|
|
6972
6957
|
var bright;
|
|
6973
6958
|
var saturatePercent;
|
|
@@ -9243,6 +9228,48 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
9243
9228
|
case 'setTransformedShape':
|
|
9244
9229
|
this.isTransformedShape = args.value['bool'];
|
|
9245
9230
|
break;
|
|
9231
|
+
case 'rgbToHex':
|
|
9232
|
+
this.rgbToHex(args.value['r'], args.value['g'], args.value['b'], args.value['a']);
|
|
9233
|
+
break;
|
|
9234
|
+
case 'padLeft':
|
|
9235
|
+
this.padLeft(args.value['value'], args.value['length'], args.value['padChar']);
|
|
9236
|
+
break;
|
|
9237
|
+
case 'setTimer':
|
|
9238
|
+
this.setTimer(args.value['e']);
|
|
9239
|
+
break;
|
|
9240
|
+
case 'targetTouches':
|
|
9241
|
+
args.value['output'] = this.targetTouches(args.value['touches']);
|
|
9242
|
+
break;
|
|
9243
|
+
case 'calculateScale':
|
|
9244
|
+
args.value['output'] = this.calculateScale(args.value['startTouches'], args.value['endTouches']);
|
|
9245
|
+
break;
|
|
9246
|
+
case 'beforeSaveEvent':
|
|
9247
|
+
this.beforeSaveEvent(args.value['args'], args.value['e']);
|
|
9248
|
+
break;
|
|
9249
|
+
case 'isKeyBoardCrop':
|
|
9250
|
+
args.value['output'] = this.isKeyBoardCrop(args.value['e']);
|
|
9251
|
+
break;
|
|
9252
|
+
case 'focusRatioBtn':
|
|
9253
|
+
this.focusRatioBtn();
|
|
9254
|
+
break;
|
|
9255
|
+
case 'performEnterAction':
|
|
9256
|
+
this.performEnterAction(args.value['e']);
|
|
9257
|
+
break;
|
|
9258
|
+
case 'getImagePoints':
|
|
9259
|
+
args.value['output'] = this.getImagePoints(args.value['x'], args.value['y']);
|
|
9260
|
+
break;
|
|
9261
|
+
case 'revertPoints':
|
|
9262
|
+
this.revertPoints(args.value['actPoint'], args.value['tempActiveObj']);
|
|
9263
|
+
break;
|
|
9264
|
+
case 'performNWResize':
|
|
9265
|
+
this.performNWResize(args.value['x'], args.value['y'], args.value['tempActiveObj'], args.value['actPoint']);
|
|
9266
|
+
break;
|
|
9267
|
+
case 'performSEResize':
|
|
9268
|
+
this.performSEResize(args.value['x'], args.value['y'], args.value['tempActiveObj'], args.value['actPoint']);
|
|
9269
|
+
break;
|
|
9270
|
+
case 'isMouseOutsideImg':
|
|
9271
|
+
args.value['output'] = this.isMouseOutsideImg(args.value['x'], args.value['y']);
|
|
9272
|
+
break;
|
|
9246
9273
|
}
|
|
9247
9274
|
};
|
|
9248
9275
|
Selection.prototype.getModuleName = function () {
|
|
@@ -12133,7 +12160,7 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
12133
12160
|
parent.cursor : 'default';
|
|
12134
12161
|
var tempCursor = parent.upperCanvas.style.cursor;
|
|
12135
12162
|
if (parent.isResize) {
|
|
12136
|
-
this.performEnterAction();
|
|
12163
|
+
this.performEnterAction(e);
|
|
12137
12164
|
parent.upperCanvas.style.cursor = 'default';
|
|
12138
12165
|
return;
|
|
12139
12166
|
}
|
|
@@ -12771,9 +12798,10 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
12771
12798
|
}
|
|
12772
12799
|
parent.notify('toolbar', { prop: 'update-toolbar-items', onPropertyChange: false });
|
|
12773
12800
|
if (!this.isFhdEditing) {
|
|
12801
|
+
var width = Math.floor(parent.activeObj.activePoint.width);
|
|
12774
12802
|
if (parent.activeObj.shape && parent.activeObj.shape === 'text' &&
|
|
12775
|
-
parent.activeObj.textSettings.fontSize === 11 && Math.floor(parent.activeObj.activePoint.
|
|
12776
|
-
|
|
12803
|
+
parent.activeObj.textSettings.fontSize === 11 && Math.floor(parent.activeObj.activePoint.height) === 11 &&
|
|
12804
|
+
(width === 55 || (parent.activeObj.textSettings.bold && width === 58))) {
|
|
12777
12805
|
parent.notify('shape', { prop: 'refreshActiveObj', onPropertyChange: false });
|
|
12778
12806
|
if (parent.drawingShape === 'text' && !parent.activeObj.keyHistory) {
|
|
12779
12807
|
parent.activeObj.keyHistory = 'Enter Text';
|
|
@@ -20696,13 +20724,16 @@ var Transform = /** @__PURE__ @class */ (function () {
|
|
|
20696
20724
|
};
|
|
20697
20725
|
Transform.prototype.straightenImage = function (degree) {
|
|
20698
20726
|
var parent = this.parent;
|
|
20727
|
+
var isSelection = parent.activeObj.shape && parent.activeObj.shape.indexOf('crop-') > -1;
|
|
20699
20728
|
if (parent.toolbar && parent.toolbar.length === 0) {
|
|
20700
20729
|
parent.notify('draw', { prop: 'select', onPropertyChange: false,
|
|
20701
20730
|
value: { type: 'custom', startX: null, startY: null, width: null, height: null } });
|
|
20702
20731
|
}
|
|
20703
20732
|
parent.notify('toolbar', { prop: 'performCropTransformClick', value: { shape: null } });
|
|
20704
20733
|
parent.setStraighten(degree);
|
|
20705
|
-
|
|
20734
|
+
if (!isSelection) {
|
|
20735
|
+
parent.okBtn();
|
|
20736
|
+
}
|
|
20706
20737
|
};
|
|
20707
20738
|
return Transform;
|
|
20708
20739
|
}());
|
|
@@ -22685,6 +22716,9 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
22685
22716
|
if (i === extension.length - 1 && extension.length > 1 &&
|
|
22686
22717
|
!((extension[i] === 'jpeg' || extension[i] === 'jpg') &&
|
|
22687
22718
|
(words.indexOf('JPG') > -1))) {
|
|
22719
|
+
if (extension.length === 2 || (extension.length === 3 && extension.indexOf('jpeg') !== -1 && extension.indexOf('jpg') !== -1)) {
|
|
22720
|
+
words = words.replace(/,\s*$/, '');
|
|
22721
|
+
}
|
|
22688
22722
|
words += ' ' + andObj['value'];
|
|
22689
22723
|
}
|
|
22690
22724
|
switch (extension[i]) {
|
|
@@ -22773,22 +22807,24 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
22773
22807
|
}
|
|
22774
22808
|
this.element.style.width = this.width;
|
|
22775
22809
|
this.element.style.height = this.height;
|
|
22776
|
-
var
|
|
22777
|
-
|
|
22778
|
-
|
|
22779
|
-
+ 'px; position: relative; overflow: hidden; margin: 0 auto;' }
|
|
22780
|
-
}));
|
|
22810
|
+
var canvasWrapperElement = this.createElement('div', { id: this.element.id + '_canvasWrapper', className: 'e-canvas-wrapper' });
|
|
22811
|
+
canvasWrapperElement.style.cssText = "height: " + (this.element.offsetHeight - height - 2) + "px; width: " + (this.element.offsetWidth - 2) + "px; position: relative; overflow: hidden; margin: 0 auto;";
|
|
22812
|
+
var canvasWrapper = this.element.appendChild(canvasWrapperElement);
|
|
22781
22813
|
var dragObj = { key: 'DragText' };
|
|
22782
22814
|
this.notify('toolbar', { prop: 'getLocaleText', onPropertyChange: false, value: { obj: dragObj } });
|
|
22783
22815
|
var dropObj = { key: 'DropText' };
|
|
22784
22816
|
this.notify('toolbar', { prop: 'getLocaleText', onPropertyChange: false, value: { obj: dropObj } });
|
|
22785
22817
|
var browseObj = { key: 'BrowseText' };
|
|
22786
22818
|
this.notify('toolbar', { prop: 'getLocaleText', onPropertyChange: false, value: { obj: browseObj } });
|
|
22787
|
-
var dropAreaElement = this.createElement('div', { id: this.element.id + '_dropArea', className: 'e-ie-drop-area'
|
|
22788
|
-
|
|
22789
|
-
var
|
|
22819
|
+
var dropAreaElement = this.createElement('div', { id: this.element.id + '_dropArea', className: 'e-ie-drop-area' });
|
|
22820
|
+
dropAreaElement.style.position = 'relative';
|
|
22821
|
+
var dropIconElement = this.createElement('span', { className: 'e-ie-drop-icon e-icons e-image' });
|
|
22822
|
+
dropIconElement.style.position = 'absolute';
|
|
22823
|
+
var dropContentElement = this.createElement('span', { className: 'e-ie-drop-content' });
|
|
22824
|
+
dropContentElement.style.cssText = 'position: absolute; display: none;';
|
|
22790
22825
|
dropContentElement.textContent = dragObj['value'] + ' ';
|
|
22791
|
-
var minDropContentElem = this.createElement('span', { className: 'e-ie-min-drop-content'
|
|
22826
|
+
var minDropContentElem = this.createElement('span', { className: 'e-ie-min-drop-content' });
|
|
22827
|
+
minDropContentElem.style.position = 'absolute';
|
|
22792
22828
|
minDropContentElem.textContent = dropObj['value'] + ' ';
|
|
22793
22829
|
var dropAnchorElement = this.createElement('a', { id: this.element.id + '_dropBrowse', className: 'e-ie-drop-browse' });
|
|
22794
22830
|
dropAnchorElement.textContent = browseObj['value'];
|
|
@@ -22941,6 +22977,12 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
22941
22977
|
value: { x: x, y: y, obj: obj } });
|
|
22942
22978
|
return obj['inRange'];
|
|
22943
22979
|
};
|
|
22980
|
+
ImageEditor.prototype.manageActiveAction = function () {
|
|
22981
|
+
this.applyShapes();
|
|
22982
|
+
if (this.activeObj.shape && this.activeObj.shape.indexOf('crop') > -1) {
|
|
22983
|
+
this.discard();
|
|
22984
|
+
}
|
|
22985
|
+
};
|
|
22944
22986
|
/**
|
|
22945
22987
|
* Clears the current selection performed in the image editor.
|
|
22946
22988
|
*
|
|
@@ -22982,6 +23024,8 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
22982
23024
|
*
|
|
22983
23025
|
*/
|
|
22984
23026
|
ImageEditor.prototype.flip = function (direction) {
|
|
23027
|
+
this.applyShapes();
|
|
23028
|
+
this.updateImageTransformColl(direction.toLowerCase() + 'flip');
|
|
22985
23029
|
this.notify('transform', { prop: 'flip', value: { direction: direction } });
|
|
22986
23030
|
this.notify('draw', { prop: 'redrawDownScale' });
|
|
22987
23031
|
this.notify('undo-redo', { prop: 'updateCurrUrc', value: { type: 'ok' } });
|
|
@@ -23169,6 +23213,10 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23169
23213
|
if (Browser.isDevice && straightenObj['bool']) {
|
|
23170
23214
|
this.notify('crop', { prop: 'resizeWrapper' });
|
|
23171
23215
|
}
|
|
23216
|
+
var saveDialog = this.element.querySelector('#' + this.element.id + '_saveDialog');
|
|
23217
|
+
if (saveDialog) {
|
|
23218
|
+
getComponent(saveDialog, 'dialog').close();
|
|
23219
|
+
}
|
|
23172
23220
|
var actionArgs = { action: 'reset', actionEventArgs: null };
|
|
23173
23221
|
this.triggerEditCompleteEvent(actionArgs);
|
|
23174
23222
|
}
|
|
@@ -23189,6 +23237,7 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23189
23237
|
*/
|
|
23190
23238
|
ImageEditor.prototype.rotate = function (degree) {
|
|
23191
23239
|
var obj = { isRotate: false };
|
|
23240
|
+
this.applyShapes();
|
|
23192
23241
|
if (degree === 90 || degree === -90) {
|
|
23193
23242
|
this.updateImageTransformColl(degree === 90 ? 'rotateright' : 'rotateleft');
|
|
23194
23243
|
}
|
|
@@ -23278,7 +23327,7 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23278
23327
|
this.discard();
|
|
23279
23328
|
return;
|
|
23280
23329
|
}
|
|
23281
|
-
this.
|
|
23330
|
+
this.manageActiveAction();
|
|
23282
23331
|
this.freeHandDraw(value);
|
|
23283
23332
|
var prevObj = { shapeSettingsObj: {} };
|
|
23284
23333
|
this.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: prevObj } });
|
|
@@ -23345,6 +23394,7 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23345
23394
|
var isPointsInRange = this.allowShape(x, y);
|
|
23346
23395
|
if (!this.disabled && this.isImageLoaded && (isPointsInRange || (isNullOrUndefined(x) && isNullOrUndefined(y)))) {
|
|
23347
23396
|
isEllipse = true;
|
|
23397
|
+
this.manageActiveAction();
|
|
23348
23398
|
this.notify('shape', { prop: 'drawEllipse', onPropertyChange: false, value: { x: x, y: y, radiusX: radiusX, radiusY: radiusY,
|
|
23349
23399
|
strokeWidth: strokeWidth, strokeColor: strokeColor, fillColor: fillColor, degree: degree, isSelected: isSelected } });
|
|
23350
23400
|
this.editCompleted();
|
|
@@ -23368,6 +23418,7 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23368
23418
|
var isPointsInRange = this.allowShape(startX, startY);
|
|
23369
23419
|
if (!this.disabled && this.isImageLoaded && (isPointsInRange || (isNullOrUndefined(startX) && isNullOrUndefined(startY)))) {
|
|
23370
23420
|
isLine = true;
|
|
23421
|
+
this.manageActiveAction();
|
|
23371
23422
|
this.notify('shape', { prop: 'drawLine', onPropertyChange: false, value: { startX: startX, startY: startY, endX: endX,
|
|
23372
23423
|
endY: endY, strokeWidth: strokeWidth, strokeColor: strokeColor, isSelected: isSelected } });
|
|
23373
23424
|
this.editCompleted();
|
|
@@ -23393,6 +23444,7 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23393
23444
|
var isPointsInRange = this.allowShape(startX, startY);
|
|
23394
23445
|
if (!this.disabled && this.isImageLoaded && (isPointsInRange || (isNullOrUndefined(startX) && isNullOrUndefined(startY)))) {
|
|
23395
23446
|
isArrow = true;
|
|
23447
|
+
this.manageActiveAction();
|
|
23396
23448
|
this.notify('shape', { prop: 'drawArrow', onPropertyChange: false, value: { startX: startX, startY: startY, endX: endX,
|
|
23397
23449
|
endY: endY, strokeWidth: strokeWidth, strokeColor: strokeColor, arrowStart: arrowStart, arrowEnd: arrowEnd,
|
|
23398
23450
|
isSelected: isSelected } });
|
|
@@ -23424,7 +23476,7 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23424
23476
|
}
|
|
23425
23477
|
if (!this.disabled && this.isImageLoaded && (obj['inRange'] || isNullOrUndefined(pointColl))) {
|
|
23426
23478
|
isPath = true;
|
|
23427
|
-
this.
|
|
23479
|
+
this.manageActiveAction();
|
|
23428
23480
|
this.notify('shape', { prop: 'drawPath', onPropertyChange: false, value: { pointColl: pointColl,
|
|
23429
23481
|
strokeWidth: strokeWidth, strokeColor: strokeColor, isSelected: isSelected } });
|
|
23430
23482
|
this.editCompleted();
|
|
@@ -23451,6 +23503,7 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23451
23503
|
var isPointsInRange = this.allowShape(x, y);
|
|
23452
23504
|
if (!this.disabled && this.isImageLoaded && (isPointsInRange || (isNullOrUndefined(x) && isNullOrUndefined(y)))) {
|
|
23453
23505
|
isRectangle = true;
|
|
23506
|
+
this.manageActiveAction();
|
|
23454
23507
|
this.notify('shape', { prop: 'drawRectangle', onPropertyChange: false, value: { x: x, y: y, width: width, height: height,
|
|
23455
23508
|
strokeWidth: strokeWidth, strokeColor: strokeColor, fillColor: fillColor, degree: degree, isSelected: isSelected,
|
|
23456
23509
|
radius: borderRadius } });
|
|
@@ -23485,6 +23538,7 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23485
23538
|
var isPointsInRange = this.allowShape(x, y);
|
|
23486
23539
|
if (!this.disabled && this.isImageLoaded && (isPointsInRange || (isNullOrUndefined(x) && isNullOrUndefined(y)))) {
|
|
23487
23540
|
isText = true;
|
|
23541
|
+
this.manageActiveAction();
|
|
23488
23542
|
this.notify('shape', { prop: 'drawText', onPropertyChange: false, value: { x: x, y: y, text: text, fontFamily: fontFamily,
|
|
23489
23543
|
fontSize: fontSize, bold: bold, italic: italic, color: color, isSelected: isSelected, degree: degree, fillColor: fillColor,
|
|
23490
23544
|
outlineColor: strokeColor, outlineWidth: strokeWidth, transformCollection: transformCollection } });
|
|
@@ -23512,6 +23566,7 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23512
23566
|
var isImage = false;
|
|
23513
23567
|
var isPointsInRange = this.allowShape(x, y);
|
|
23514
23568
|
if (!this.disabled && this.isImageLoaded && (isPointsInRange || (isNullOrUndefined(x) && isNullOrUndefined(y)))) {
|
|
23569
|
+
this.manageActiveAction();
|
|
23515
23570
|
var length_1 = this.objColl.length;
|
|
23516
23571
|
this.notify('shape', { prop: 'drawImage', onPropertyChange: false, value: { x: x, y: y, width: width, height: height,
|
|
23517
23572
|
src: data, degree: degree, isAspectRatio: isAspectRatio, opacity: opacity, isSelected: isSelected } });
|
|
@@ -23559,7 +23614,7 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23559
23614
|
this.okBtn(null, true);
|
|
23560
23615
|
isTextArea = true;
|
|
23561
23616
|
}
|
|
23562
|
-
this.notify('shape', { prop: 'selectShape', onPropertyChange: false, value: { id: setting.id, obj: obj } });
|
|
23617
|
+
this.notify('shape', { prop: 'selectShape', onPropertyChange: false, value: { id: setting.id, obj: obj, isShape: true } });
|
|
23563
23618
|
this.notify('selection', { prop: 'getFreehandDrawEditing', onPropertyChange: false, value: { obj: freehandObj } });
|
|
23564
23619
|
if (obj['isSelected']) {
|
|
23565
23620
|
var tempFontSize = this.activeObj.textSettings.fontSize;
|
|
@@ -23619,7 +23674,7 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23619
23674
|
ImageEditor.prototype.selectShape = function (id) {
|
|
23620
23675
|
this.applyShapes();
|
|
23621
23676
|
var obj = { isSelected: false };
|
|
23622
|
-
this.notify('shape', { prop: 'selectShape', onPropertyChange: false, value: { id: id, obj: obj } });
|
|
23677
|
+
this.notify('shape', { prop: 'selectShape', onPropertyChange: false, value: { id: id, obj: obj, isShape: true } });
|
|
23623
23678
|
this.editCompleted('shape-select');
|
|
23624
23679
|
this.noRedact = false;
|
|
23625
23680
|
return obj['isSelected'];
|
|
@@ -23641,7 +23696,7 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23641
23696
|
return;
|
|
23642
23697
|
}
|
|
23643
23698
|
this.applyShapes();
|
|
23644
|
-
this.notify('shape', { prop: 'deleteShape', onPropertyChange: false, value: { id: id } });
|
|
23699
|
+
this.notify('shape', { prop: 'deleteShape', onPropertyChange: false, value: { id: id, isShape: true } });
|
|
23645
23700
|
this.editCompleted('shape-delete');
|
|
23646
23701
|
};
|
|
23647
23702
|
/**
|
|
@@ -23700,7 +23755,7 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23700
23755
|
ImageEditor.prototype.selectRedact = function (id) {
|
|
23701
23756
|
this.applyShapes();
|
|
23702
23757
|
var obj = { isSelected: false };
|
|
23703
|
-
this.notify('shape', { prop: 'selectShape', onPropertyChange: false, value: { id: id, obj: obj } });
|
|
23758
|
+
this.notify('shape', { prop: 'selectShape', onPropertyChange: false, value: { id: id, obj: obj, isRedact: true } });
|
|
23704
23759
|
this.editCompleted('redact-select');
|
|
23705
23760
|
this.noRedact = false;
|
|
23706
23761
|
return obj['isSelected'];
|
|
@@ -23716,7 +23771,7 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23716
23771
|
*/
|
|
23717
23772
|
ImageEditor.prototype.deleteRedact = function (id) {
|
|
23718
23773
|
this.applyShapes();
|
|
23719
|
-
this.notify('shape', { prop: 'deleteShape', onPropertyChange: false, value: { id: id } });
|
|
23774
|
+
this.notify('shape', { prop: 'deleteShape', onPropertyChange: false, value: { id: id, isRedact: true } });
|
|
23720
23775
|
this.editCompleted('redact-delete');
|
|
23721
23776
|
};
|
|
23722
23777
|
/**
|
|
@@ -23731,7 +23786,7 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23731
23786
|
ImageEditor.prototype.updateRedact = function (setting, isSelected) {
|
|
23732
23787
|
this.applyShapes();
|
|
23733
23788
|
var obj = { isSelected: false };
|
|
23734
|
-
this.notify('shape', { prop: 'selectShape', onPropertyChange: false, value: { id: setting.id, obj: obj } });
|
|
23789
|
+
this.notify('shape', { prop: 'selectShape', onPropertyChange: false, value: { id: setting.id, obj: obj, isRedact: true } });
|
|
23735
23790
|
if (obj['isSelected']) {
|
|
23736
23791
|
this.notify('shape', { prop: 'updateShapeChangeEventArgs', onPropertyChange: false,
|
|
23737
23792
|
value: { shapeSettings: setting } });
|
|
@@ -23781,7 +23836,7 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23781
23836
|
*/
|
|
23782
23837
|
ImageEditor.prototype.finetuneImage = function (finetuneOption, value) {
|
|
23783
23838
|
if (!this.disabled && this.isImageLoaded) {
|
|
23784
|
-
this.
|
|
23839
|
+
this.manageActiveAction();
|
|
23785
23840
|
this.notify('filter', { prop: 'finetuneImage', value: { value: value, option: finetuneOption } });
|
|
23786
23841
|
this.editCompleteArgs = { finetune: finetuneOption, value: value };
|
|
23787
23842
|
this.editCompleted('fine-tune');
|
|
@@ -23798,7 +23853,7 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23798
23853
|
*/
|
|
23799
23854
|
ImageEditor.prototype.applyImageFilter = function (filterOption) {
|
|
23800
23855
|
if (!this.disabled && this.isImageLoaded) {
|
|
23801
|
-
this.
|
|
23856
|
+
this.manageActiveAction();
|
|
23802
23857
|
this.notify('filter', { prop: 'applyImageFilter', value: { option: filterOption.toString() } });
|
|
23803
23858
|
this.editCompleteArgs = { filter: filterOption };
|
|
23804
23859
|
this.editCompleted('filter');
|
|
@@ -23815,7 +23870,7 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23815
23870
|
* @returns {void}.
|
|
23816
23871
|
*/
|
|
23817
23872
|
ImageEditor.prototype.undo = function () {
|
|
23818
|
-
this.
|
|
23873
|
+
this.manageActiveAction();
|
|
23819
23874
|
this.notify('undo-redo', { prop: 'undo', onPropertyChange: false });
|
|
23820
23875
|
this.notify('draw', { prop: 'redrawDownScale' });
|
|
23821
23876
|
};
|
|
@@ -23827,7 +23882,7 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23827
23882
|
* @returns {void}.
|
|
23828
23883
|
*/
|
|
23829
23884
|
ImageEditor.prototype.redo = function () {
|
|
23830
|
-
this.
|
|
23885
|
+
this.manageActiveAction();
|
|
23831
23886
|
this.notify('undo-redo', { prop: 'redo', onPropertyChange: false });
|
|
23832
23887
|
this.notify('draw', { prop: 'redrawDownScale' });
|
|
23833
23888
|
};
|
|
@@ -23852,8 +23907,9 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23852
23907
|
*/
|
|
23853
23908
|
ImageEditor.prototype.resize = function (width, height, isAspectRatio) {
|
|
23854
23909
|
var isResized = false;
|
|
23855
|
-
if ((width.toString()).length <= 4 && (height.toString()).length <= 4) {
|
|
23856
|
-
this.
|
|
23910
|
+
if (((width.toString()).length <= 4 && (height.toString()).length <= 4) && (!this.isCircleCrop || isAspectRatio)) {
|
|
23911
|
+
this.manageActiveAction();
|
|
23912
|
+
this.notify('toolbar', { prop: 'resizeClick', value: { bool: false } });
|
|
23857
23913
|
var destPoints = { startX: this.img.destLeft, startY: this.img.destTop, width: this.img.destWidth,
|
|
23858
23914
|
height: this.img.destHeight };
|
|
23859
23915
|
if (isAspectRatio) {
|
|
@@ -23878,7 +23934,12 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23878
23934
|
if (destPoints.startX !== this.img.destLeft || destPoints.startY !== this.img.destTop ||
|
|
23879
23935
|
destPoints.width !== this.img.destWidth || destPoints.height !== this.img.destHeight) {
|
|
23880
23936
|
isResized = true;
|
|
23881
|
-
this.
|
|
23937
|
+
this.aspectWidth = width;
|
|
23938
|
+
this.aspectHeight = height;
|
|
23939
|
+
if (isAspectRatio) {
|
|
23940
|
+
this.aspectHeight = null;
|
|
23941
|
+
}
|
|
23942
|
+
this.okBtn(false, false, true);
|
|
23882
23943
|
}
|
|
23883
23944
|
else {
|
|
23884
23945
|
this.notify('draw', { prop: 'performCancel', value: { isContextualToolbar: null } });
|
|
@@ -23903,7 +23964,7 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23903
23964
|
* @returns {boolean}.
|
|
23904
23965
|
*/
|
|
23905
23966
|
ImageEditor.prototype.drawFrame = function (frameType, color, gradientColor, size, inset, offset, borderRadius, frameLineStyle, lineCount) {
|
|
23906
|
-
this.
|
|
23967
|
+
this.manageActiveAction();
|
|
23907
23968
|
var isFrame = false;
|
|
23908
23969
|
var obj = { frameChangeEventArgs: null };
|
|
23909
23970
|
color = color ? color : '#fff';
|
|
@@ -23948,6 +24009,10 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23948
24009
|
this.tempFrameZoomLevel = null;
|
|
23949
24010
|
}
|
|
23950
24011
|
this.notify('draw', { prop: 'redrawDownScale' });
|
|
24012
|
+
var ctxTbar = this.element.querySelector('.e-contextual-toolbar-wrapper');
|
|
24013
|
+
if (ctxTbar) {
|
|
24014
|
+
ctxTbar.classList.add('e-hide');
|
|
24015
|
+
}
|
|
23951
24016
|
return isFrame;
|
|
23952
24017
|
};
|
|
23953
24018
|
/**
|
|
@@ -24777,10 +24842,11 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
24777
24842
|
*
|
|
24778
24843
|
* @param { boolean } isMouseDown - Specifies whether it is a mouse down.
|
|
24779
24844
|
* @param { boolean } isFinalApply - Specifies whether it is a final apply.
|
|
24845
|
+
* @param { boolean } isResize - Specifies whether it is called from resize public method.
|
|
24780
24846
|
* @hidden
|
|
24781
24847
|
* @returns {void}.
|
|
24782
24848
|
*/
|
|
24783
|
-
ImageEditor.prototype.okBtn = function (isMouseDown, isFinalApply) {
|
|
24849
|
+
ImageEditor.prototype.okBtn = function (isMouseDown, isFinalApply, isResize) {
|
|
24784
24850
|
if (isFinalApply) {
|
|
24785
24851
|
this.noPushUndo = false;
|
|
24786
24852
|
var tempActiveObj = { activePoint: { startX: 0, startY: 0, endX: 0, endY: 0, width: 0, height: 0 },
|
|
@@ -24879,6 +24945,45 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
24879
24945
|
}
|
|
24880
24946
|
this.isAspectRatio = false;
|
|
24881
24947
|
}
|
|
24948
|
+
else if (isResize) {
|
|
24949
|
+
var isAspectRatio = false;
|
|
24950
|
+
if (this.aspectWidth && this.aspectHeight) {
|
|
24951
|
+
this.notify('transform', { prop: 'resize', value: { width: this.aspectWidth, height: this.aspectHeight, isAspectRatio: false } });
|
|
24952
|
+
}
|
|
24953
|
+
else if (this.aspectWidth) {
|
|
24954
|
+
this.notify('transform', { prop: 'resize', value: { width: this.aspectWidth, height: null, isAspectRatio: true } });
|
|
24955
|
+
this.aspectHeight = this.aspectWidth / (this.img.destWidth / this.img.destHeight);
|
|
24956
|
+
isAspectRatio = true;
|
|
24957
|
+
}
|
|
24958
|
+
this.isResize = false;
|
|
24959
|
+
this.notify('toolbar', { prop: 'refresh-toolbar', onPropertyChange: false, value: { type: 'main',
|
|
24960
|
+
isApplyBtn: false, isCropping: false, isZooming: null, cType: null } });
|
|
24961
|
+
this.notify('transform', { prop: 'zoomAction', onPropertyChange: false,
|
|
24962
|
+
value: { zoomFactor: -this.transform.zoomFactor, zoomPoint: null, isResize: true } });
|
|
24963
|
+
this.notify('transform', { prop: 'zoomAction', onPropertyChange: false,
|
|
24964
|
+
value: { zoomFactor: this.prevObj['defaultZoom'], zoomPoint: null, isResize: true } });
|
|
24965
|
+
if (this.prevObj.zoomFactor) {
|
|
24966
|
+
this.setProperties({ zoomSettings: { zoomFactor: this.prevObj.zoomFactor } }, true);
|
|
24967
|
+
}
|
|
24968
|
+
this.notify('transform', { prop: 'setPreviousZoomValue', onPropertyChange: false,
|
|
24969
|
+
value: { previousZoomValue: this.zoomSettings.zoomFactor } });
|
|
24970
|
+
this.notify('undo-redo', { prop: 'updateUndoRedoColl', onPropertyChange: false, value: { operation: 'resize',
|
|
24971
|
+
previousObj: this.prevObj, previousObjColl: this.prevObj['objColl'],
|
|
24972
|
+
previousPointColl: this.prevObj['pointColl'], previousSelPointColl: this.prevObj['selPointColl'],
|
|
24973
|
+
previousCropObj: this.prevCropObj, previousText: null, currentText: null, previousFilter: null,
|
|
24974
|
+
isCircleCrop: null } });
|
|
24975
|
+
this.notify('undo-redo', { prop: 'updateCurrUrc', value: { type: 'ok' } });
|
|
24976
|
+
var obj_4 = this.cancelCropSelection;
|
|
24977
|
+
if ((obj_4 && isAspectRatio)) {
|
|
24978
|
+
obj_4.previousObj.aspectWidth = obj_4.currentObj.aspectWidth = this.aspectWidth;
|
|
24979
|
+
obj_4.previousObj.aspectHeight = obj_4.currentObj.aspectHeight = this.aspectHeight;
|
|
24980
|
+
obj_4.previousCropObj = extend({}, this.cropObj, {}, true);
|
|
24981
|
+
obj_4.currentCropObj = extend({}, this.cropObj, {}, true);
|
|
24982
|
+
this.notify('draw', { prop: 'updateCropSelObj' });
|
|
24983
|
+
}
|
|
24984
|
+
this.cancelCropSelection = null;
|
|
24985
|
+
this.isAspectRatio = false;
|
|
24986
|
+
}
|
|
24882
24987
|
var selElem = this.element.querySelector('.e-contextual-toolbar-wrapper .e-toolbar-item.e-selected');
|
|
24883
24988
|
var obj = { bool: false };
|
|
24884
24989
|
this.notify('selection', { prop: 'getFreehandDrawEditing', onPropertyChange: false, value: { obj: obj } });
|
|
@@ -24924,8 +25029,8 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
24924
25029
|
else if ((sliderWrap || this.currObjType.isFiltered) && !this.drawingShape && this.activeObj.shape !== 'redact') {
|
|
24925
25030
|
this.initialAdjustmentValue = this.canvasFilter = this.lowerContext.filter;
|
|
24926
25031
|
this.currObjType.isFiltered = false;
|
|
24927
|
-
var
|
|
24928
|
-
this.notify('draw', { prop: 'getTempAdjustmentValue', value: { obj:
|
|
25032
|
+
var obj_5 = { value: null };
|
|
25033
|
+
this.notify('draw', { prop: 'getTempAdjustmentValue', value: { obj: obj_5 } });
|
|
24929
25034
|
if (!sliderWrap || sliderWrap.parentElement.previousElementSibling.textContent !== 'Opacity') {
|
|
24930
25035
|
this.notify('undo-redo', { prop: 'updateCurrUrc', value: { type: 'ok' } });
|
|
24931
25036
|
}
|
|
@@ -25624,19 +25729,19 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
25624
25729
|
var obj = { bool: false };
|
|
25625
25730
|
this.notify('selection', { prop: 'getFreehandDrawEditing', onPropertyChange: false, value: { obj: obj } });
|
|
25626
25731
|
if (obj['bool']) {
|
|
25627
|
-
var
|
|
25628
|
-
this.notify('freehand-draw', { prop: 'getPenStrokeWidth', onPropertyChange: false, value: { obj:
|
|
25732
|
+
var obj_6 = { penStrokeWidth: null };
|
|
25733
|
+
this.notify('freehand-draw', { prop: 'getPenStrokeWidth', onPropertyChange: false, value: { obj: obj_6 } });
|
|
25629
25734
|
this.upperContext.clearRect(0, 0, this.upperCanvas.width, this.upperCanvas.height);
|
|
25630
25735
|
this.lowerContext.clearRect(0, 0, this.lowerCanvas.width, this.lowerCanvas.height);
|
|
25631
25736
|
this.notify('freehand-draw', { prop: 'hoverFhd', onPropertyChange: false,
|
|
25632
|
-
value: { strokeColor: null, strokeWidth:
|
|
25737
|
+
value: { strokeColor: null, strokeWidth: obj_6['penStrokeWidth'] } });
|
|
25633
25738
|
var indexObj = { freehandSelectedIndex: null };
|
|
25634
25739
|
this.notify('freehand-draw', { prop: 'getFreehandSelectedIndex', onPropertyChange: false, value: { obj: indexObj } });
|
|
25635
|
-
this.pointColl[indexObj['freehandSelectedIndex']].strokeWidth =
|
|
25740
|
+
this.pointColl[indexObj['freehandSelectedIndex']].strokeWidth = obj_6['penStrokeWidth'];
|
|
25636
25741
|
this.notify('draw', { prop: 'render-image', value: { isMouseWheel: null } });
|
|
25637
25742
|
this.notify('draw', { prop: 'redrawDownScale' });
|
|
25638
25743
|
this.notify('freehand-draw', { prop: 'hoverFhd', onPropertyChange: false,
|
|
25639
|
-
value: { strokeColor: null, strokeWidth:
|
|
25744
|
+
value: { strokeColor: null, strokeWidth: obj_6['penStrokeWidth'] } });
|
|
25640
25745
|
this.notify('undo-redo', { prop: 'updateUndoRedoColl', onPropertyChange: false,
|
|
25641
25746
|
value: { operation: 'freehanddrawCustomized', previousObj: prevObj, previousObjColl: prevObj.objColl,
|
|
25642
25747
|
previousPointColl: prevObj.pointColl, previousSelPointColl: prevObj.selPointColl,
|
|
@@ -26277,9 +26382,9 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
26277
26382
|
var ctx = this.baseImgCanvas.getContext('2d');
|
|
26278
26383
|
if (ctx.canvas.width !== this.lowerContext.canvas.width &&
|
|
26279
26384
|
ctx.canvas.height !== this.lowerContext.canvas.height) {
|
|
26280
|
-
var
|
|
26385
|
+
var obj_7 = { width: 0, height: 0 };
|
|
26281
26386
|
this.notify('crop', { prop: 'calcRatio', onPropertyChange: false,
|
|
26282
|
-
value: { obj:
|
|
26387
|
+
value: { obj: obj_7, dimension: { width: ctx.canvas.width, height: ctx.canvas.height } } });
|
|
26283
26388
|
}
|
|
26284
26389
|
var dimension = void 0;
|
|
26285
26390
|
// eslint-disable-next-line prefer-const
|
|
@@ -26448,6 +26553,7 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
26448
26553
|
var isPointsInRange = this.allowShape(x, y);
|
|
26449
26554
|
if (!this.disabled && this.isImageLoaded && (isPointsInRange || (isNullOrUndefined(x) && isNullOrUndefined(y)))) {
|
|
26450
26555
|
isRedact = true;
|
|
26556
|
+
this.manageActiveAction();
|
|
26451
26557
|
this.notify('shape', {
|
|
26452
26558
|
prop: 'drawRedact', onPropertyChange: false, value: {
|
|
26453
26559
|
x: x, y: y, width: width, height: height, type: type, value: value
|
|
@@ -27234,6 +27340,48 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
27234
27340
|
case 'heightAspectRatio':
|
|
27235
27341
|
this.heightAspectRatio(args.value['e']);
|
|
27236
27342
|
break;
|
|
27343
|
+
case 'cancelPan':
|
|
27344
|
+
this.cancelPan();
|
|
27345
|
+
break;
|
|
27346
|
+
case 'zoomInBtnMouseDownHandler':
|
|
27347
|
+
this.zoomInBtnMouseDownHandler(args.value['event']);
|
|
27348
|
+
break;
|
|
27349
|
+
case 'zoomOutBtnMouseDownHandler':
|
|
27350
|
+
this.zoomOutBtnMouseDownHandler(args.value['event']);
|
|
27351
|
+
break;
|
|
27352
|
+
case 'drawDashedLine':
|
|
27353
|
+
this.drawDashedLine(args.value['context']);
|
|
27354
|
+
break;
|
|
27355
|
+
case 'saveDialogClosed':
|
|
27356
|
+
this.saveDialogClosed(args.value['id']);
|
|
27357
|
+
break;
|
|
27358
|
+
case 'getIndex':
|
|
27359
|
+
this.getIndex(args.value['item']);
|
|
27360
|
+
break;
|
|
27361
|
+
case 'getRectRadius':
|
|
27362
|
+
this.getRectRadius(args.value['text']);
|
|
27363
|
+
break;
|
|
27364
|
+
case 'applyPreviewFilter':
|
|
27365
|
+
this.applyPreviewFilter();
|
|
27366
|
+
break;
|
|
27367
|
+
case 'renderSlider':
|
|
27368
|
+
this.renderSlider(args.value['type'], args.value['isSelect']);
|
|
27369
|
+
break;
|
|
27370
|
+
case 'zoomInBtnClickHandler':
|
|
27371
|
+
this.zoomInBtnClickHandler(args.value['e']);
|
|
27372
|
+
break;
|
|
27373
|
+
case 'zoomOutBtnClickHandler':
|
|
27374
|
+
this.zoomOutBtnClickHandler(args.value['e']);
|
|
27375
|
+
break;
|
|
27376
|
+
case 'getAdjustmentToolbarItem':
|
|
27377
|
+
this.getAdjustmentToolbarItem();
|
|
27378
|
+
break;
|
|
27379
|
+
case 'getFilterToolbarItem':
|
|
27380
|
+
this.getFilterToolbarItem();
|
|
27381
|
+
break;
|
|
27382
|
+
case 'renderCropBtn':
|
|
27383
|
+
this.renderCropBtn();
|
|
27384
|
+
break;
|
|
27237
27385
|
}
|
|
27238
27386
|
};
|
|
27239
27387
|
ToolbarModule.prototype.updatePrivateVariables = function () {
|
|
@@ -27362,9 +27510,9 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
27362
27510
|
var parent = this.parent;
|
|
27363
27511
|
var id = parent.element.id;
|
|
27364
27512
|
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.length > 0)) {
|
|
27365
|
-
parent.
|
|
27366
|
-
|
|
27367
|
-
|
|
27513
|
+
var contextualToolbarArea = parent.createElement('div', { id: id + '_contextualToolbarArea', className: 'e-contextual-toolbar-wrapper e-hide' });
|
|
27514
|
+
contextualToolbarArea.style.position = 'absolute';
|
|
27515
|
+
parent.element.appendChild(contextualToolbarArea);
|
|
27368
27516
|
var toolbarArea = document.getElementById(id + '_contextualToolbarArea');
|
|
27369
27517
|
var toolbar_2 = parent.createElement('div', { id: id + '_contextualToolbar' });
|
|
27370
27518
|
toolbarArea.appendChild(toolbar_2);
|
|
@@ -28243,8 +28391,9 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
28243
28391
|
ToolbarModule.prototype.enableDisableCloneBtn = function (toolbarId, obj) {
|
|
28244
28392
|
var parent = this.parent;
|
|
28245
28393
|
var isDummyTextClick = false;
|
|
28394
|
+
var width = Math.floor(parent.activeObj.activePoint.width);
|
|
28246
28395
|
if (parent.activeObj.shape && parent.activeObj.shape === 'text' &&
|
|
28247
|
-
parent.activeObj.textSettings.fontSize === 11 &&
|
|
28396
|
+
parent.activeObj.textSettings.fontSize === 11 && (width === 55 || (parent.activeObj.textSettings.bold && width === 58)) &&
|
|
28248
28397
|
Math.floor(parent.activeObj.activePoint.height) === 11) {
|
|
28249
28398
|
isDummyTextClick = true;
|
|
28250
28399
|
}
|
|
@@ -28434,8 +28583,9 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
28434
28583
|
var quality = ['Good', 'Great', 'Highest'];
|
|
28435
28584
|
parent.element.appendChild(parent.createElement('div', { id: id + '_saveDialog' }));
|
|
28436
28585
|
var dialogContent = parent.createElement('div', {
|
|
28437
|
-
id: id + '_dialogContent'
|
|
28586
|
+
id: id + '_dialogContent'
|
|
28438
28587
|
});
|
|
28588
|
+
dialogContent.style.display = 'flex';
|
|
28439
28589
|
var dialogImgContent = dialogContent.appendChild(parent.createElement('div', {
|
|
28440
28590
|
id: id + '_dialogImgContent', className: 'e-ie-dlg-img-content'
|
|
28441
28591
|
}));
|
|
@@ -28874,7 +29024,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
28874
29024
|
}
|
|
28875
29025
|
if ((isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Straightening') > -1)) && !Browser.isDevice) {
|
|
28876
29026
|
toolbarItems.push({ align: 'Center', type: 'Separator' });
|
|
28877
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar &&
|
|
29027
|
+
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Straightening') > -1)) {
|
|
28878
29028
|
var spanWidth = document.createElement('span');
|
|
28879
29029
|
spanWidth.innerHTML = this.l10n.getConstant('Straighten');
|
|
28880
29030
|
toolbarItems.push({ id: id + '_straightenSpan', cssClass: 'e-ie-straighten-span', template: spanWidth, align: 'Center' });
|
|
@@ -30106,7 +30256,9 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
30106
30256
|
}
|
|
30107
30257
|
break;
|
|
30108
30258
|
case 'shapes':
|
|
30109
|
-
parent.
|
|
30259
|
+
if (!parent.isPublicMethod) {
|
|
30260
|
+
parent.noPushUndo = true;
|
|
30261
|
+
}
|
|
30110
30262
|
if (Browser.isDevice) {
|
|
30111
30263
|
this.initMainToolbar(false, true, true);
|
|
30112
30264
|
}
|
|
@@ -30440,37 +30592,37 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
30440
30592
|
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Default') > -1)) {
|
|
30441
30593
|
toolbarItems.push({ id: id + '_default', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
|
|
30442
30594
|
tooltipText: this.l10n.getConstant('Default'), align: 'Center',
|
|
30443
|
-
template: '<div class="filter-wrapper"
|
|
30595
|
+
template: '<div class="filter-wrapper"><canvas id=' + id + '_defaultCanvas' + ' tabindex=0></canvas><div><span>' + this.l10n.getConstant('Default') + '</span></div></div>' });
|
|
30444
30596
|
}
|
|
30445
30597
|
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Chrome') > -1)) {
|
|
30446
30598
|
toolbarItems.push({ id: id + '_chrome', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
|
|
30447
30599
|
tooltipText: this.l10n.getConstant('Chrome'), align: 'Center',
|
|
30448
|
-
template: '<div class="filter-wrapper"
|
|
30600
|
+
template: '<div class="filter-wrapper"><canvas id=' + id + '_chromeCanvas' + '></canvas><div><span>' + this.l10n.getConstant('Chrome') + '</span></div></div>' });
|
|
30449
30601
|
}
|
|
30450
30602
|
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Cold') > -1)) {
|
|
30451
30603
|
toolbarItems.push({ id: id + '_cold', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
|
|
30452
30604
|
tooltipText: this.l10n.getConstant('Cold'), align: 'Center',
|
|
30453
|
-
template: '<div class="filter-wrapper"
|
|
30605
|
+
template: '<div class="filter-wrapper"><canvas id=' + id + '_coldCanvas' + '></canvas><div><span>' + this.l10n.getConstant('Cold') + '</span></div></div>' });
|
|
30454
30606
|
}
|
|
30455
30607
|
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Warm') > -1)) {
|
|
30456
30608
|
toolbarItems.push({ id: id + '_warm', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
|
|
30457
30609
|
tooltipText: this.l10n.getConstant('Warm'), align: 'Center',
|
|
30458
|
-
template: '<div class="filter-wrapper"
|
|
30610
|
+
template: '<div class="filter-wrapper"><canvas id=' + id + '_warmCanvas' + '></canvas><div><span>' + this.l10n.getConstant('Warm') + '</span></div></div>' });
|
|
30459
30611
|
}
|
|
30460
30612
|
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Grayscale') > -1)) {
|
|
30461
30613
|
toolbarItems.push({ id: id + '_grayscale', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
|
|
30462
30614
|
tooltipText: this.l10n.getConstant('Grayscale'), align: 'Center',
|
|
30463
|
-
template: '<div class="filter-wrapper"
|
|
30615
|
+
template: '<div class="filter-wrapper"><canvas id=' + id + '_grayscaleCanvas' + '></canvas><div><span>' + this.l10n.getConstant('Grayscale') + '</span></div></div>' });
|
|
30464
30616
|
}
|
|
30465
30617
|
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Sepia') > -1)) {
|
|
30466
30618
|
toolbarItems.push({ id: id + '_sepia', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
|
|
30467
30619
|
tooltipText: this.l10n.getConstant('Sepia'), align: 'Center',
|
|
30468
|
-
template: '<div class="filter-wrapper"
|
|
30620
|
+
template: '<div class="filter-wrapper"><canvas id=' + id + '_sepiaCanvas' + '></canvas><div><span>' + this.l10n.getConstant('Sepia') + '</span></div></div>' });
|
|
30469
30621
|
}
|
|
30470
30622
|
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Invert') > -1)) {
|
|
30471
30623
|
toolbarItems.push({ id: id + '_invert', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
|
|
30472
30624
|
tooltipText: this.l10n.getConstant('Invert'), align: 'Center',
|
|
30473
|
-
template: '<div class="filter-wrapper"
|
|
30625
|
+
template: '<div class="filter-wrapper"><canvas id=' + id + '_invertCanvas' + '></canvas><div><span>' + this.l10n.getConstant('Invert') + '</span></div></div>' });
|
|
30474
30626
|
}
|
|
30475
30627
|
var tempToolbarItems = this.processToolbar('center');
|
|
30476
30628
|
for (var i = 0, len = tempToolbarItems.length; i < len; i++) {
|
|
@@ -32072,6 +32224,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
32072
32224
|
var splitWords;
|
|
32073
32225
|
var actionType;
|
|
32074
32226
|
var actionArgs;
|
|
32227
|
+
var isRedactClick = false;
|
|
32075
32228
|
if (parent.activeObj.shape !== undefined) {
|
|
32076
32229
|
splitWords = parent.activeObj.shape.split('-');
|
|
32077
32230
|
}
|
|
@@ -32375,7 +32528,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
32375
32528
|
parent.notify('draw', { prop: 'triggerFrameChange', value: { prevFrameSettings: parent.tempFrameObj, obj: { frameChangeEventArgs: null } } });
|
|
32376
32529
|
break;
|
|
32377
32530
|
case 'redact':
|
|
32378
|
-
parent.currObjType.isRedact = true;
|
|
32531
|
+
parent.currObjType.isRedact = isRedactClick = true;
|
|
32379
32532
|
parent.drawingShape = 'redact';
|
|
32380
32533
|
if (isNullOrUndefined(parent.activeObj.redactBlur)) {
|
|
32381
32534
|
parent.activeObj.redactBlur = 20;
|
|
@@ -32388,7 +32541,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
32388
32541
|
this.redactSlider(parent.activeObj.redactType);
|
|
32389
32542
|
break;
|
|
32390
32543
|
case 'pixelate':
|
|
32391
|
-
parent.currObjType.isRedact = true;
|
|
32544
|
+
parent.currObjType.isRedact = isRedactClick = true;
|
|
32392
32545
|
parent.drawingShape = 'redact';
|
|
32393
32546
|
parent.notify('selection', { prop: 'annotate', value: { shape: 'redact' } });
|
|
32394
32547
|
if (parent.activeObj.redactType === 'blur') {
|
|
@@ -32422,7 +32575,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
32422
32575
|
}
|
|
32423
32576
|
break;
|
|
32424
32577
|
case 'redactblur':
|
|
32425
|
-
parent.currObjType.isRedact = true;
|
|
32578
|
+
parent.currObjType.isRedact = isRedactClick = true;
|
|
32426
32579
|
parent.drawingShape = 'redact';
|
|
32427
32580
|
parent.notify('selection', { prop: 'annotate', value: { shape: 'redact' } });
|
|
32428
32581
|
parent.notify('shape', { prop: 'setRedactType', onPropertyChange: false,
|
|
@@ -32457,6 +32610,10 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
32457
32610
|
}
|
|
32458
32611
|
break;
|
|
32459
32612
|
}
|
|
32613
|
+
if (isRedactClick) {
|
|
32614
|
+
parent.notify('draw', { prop: 'updateTempObjColl' });
|
|
32615
|
+
parent.notify('draw', { prop: 'updateTempPointColl' });
|
|
32616
|
+
}
|
|
32460
32617
|
}
|
|
32461
32618
|
};
|
|
32462
32619
|
ToolbarModule.prototype.updateRedactType = function (value) {
|