@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
|
@@ -2930,7 +2930,7 @@ class Draw {
|
|
|
2930
2930
|
}
|
|
2931
2931
|
}
|
|
2932
2932
|
else {
|
|
2933
|
-
canvasDraw.lineWidth =
|
|
2933
|
+
canvasDraw.lineWidth = 1;
|
|
2934
2934
|
}
|
|
2935
2935
|
let textStyle = '';
|
|
2936
2936
|
if (bold) {
|
|
@@ -6827,9 +6827,6 @@ class Filter {
|
|
|
6827
6827
|
case 'setAdjustmentValue':
|
|
6828
6828
|
this.adjustmentValue = args.value['adjustmentValue'];
|
|
6829
6829
|
break;
|
|
6830
|
-
case 'getBrightnessAdjusted':
|
|
6831
|
-
args.value['obj']['isBrightnessAdjusted'] = this.isBrightnessAdjusted;
|
|
6832
|
-
break;
|
|
6833
6830
|
case 'setBrightnessAdjusted':
|
|
6834
6831
|
this.isBrightnessAdjusted = args.value['isBrightnessAdjusted'];
|
|
6835
6832
|
if (this.parent.currentFilter.split('_') && this.parent.currentFilter.split('_')[1] === 'cold') {
|
|
@@ -6906,18 +6903,6 @@ class Filter {
|
|
|
6906
6903
|
let splitWords = this.lowerContext.filter.split(' ');
|
|
6907
6904
|
let values = [];
|
|
6908
6905
|
const brightness = this.getFilterValue(this.adjustmentLevel.brightness);
|
|
6909
|
-
const excludedTypes = ['brightness', 'contrast', 'hue', 'saturation', 'exposure', 'opacity', 'blur'];
|
|
6910
|
-
if (excludedTypes.indexOf(type) === -1) {
|
|
6911
|
-
if (isNullOrUndefined(isPreview) && (this.adjustmentLevel.sharpen || this.adjustmentLevel.bw)) {
|
|
6912
|
-
parent.isUndoRedo = true;
|
|
6913
|
-
const temp = this.lowerContext.filter;
|
|
6914
|
-
this.lowerContext.filter = 'none';
|
|
6915
|
-
parent.notify('shape', { prop: 'drawAnnotations', onPropertyChange: false,
|
|
6916
|
-
value: { ctx: this.lowerContext, shape: 'iterate', pen: 'iterate', isPreventApply: null } });
|
|
6917
|
-
this.lowerContext.filter = temp;
|
|
6918
|
-
parent.isUndoRedo = false;
|
|
6919
|
-
}
|
|
6920
|
-
}
|
|
6921
6906
|
let saturate;
|
|
6922
6907
|
let bright;
|
|
6923
6908
|
let saturatePercent;
|
|
@@ -9182,6 +9167,48 @@ class Selection {
|
|
|
9182
9167
|
case 'setTransformedShape':
|
|
9183
9168
|
this.isTransformedShape = args.value['bool'];
|
|
9184
9169
|
break;
|
|
9170
|
+
case 'rgbToHex':
|
|
9171
|
+
this.rgbToHex(args.value['r'], args.value['g'], args.value['b'], args.value['a']);
|
|
9172
|
+
break;
|
|
9173
|
+
case 'padLeft':
|
|
9174
|
+
this.padLeft(args.value['value'], args.value['length'], args.value['padChar']);
|
|
9175
|
+
break;
|
|
9176
|
+
case 'setTimer':
|
|
9177
|
+
this.setTimer(args.value['e']);
|
|
9178
|
+
break;
|
|
9179
|
+
case 'targetTouches':
|
|
9180
|
+
args.value['output'] = this.targetTouches(args.value['touches']);
|
|
9181
|
+
break;
|
|
9182
|
+
case 'calculateScale':
|
|
9183
|
+
args.value['output'] = this.calculateScale(args.value['startTouches'], args.value['endTouches']);
|
|
9184
|
+
break;
|
|
9185
|
+
case 'beforeSaveEvent':
|
|
9186
|
+
this.beforeSaveEvent(args.value['args'], args.value['e']);
|
|
9187
|
+
break;
|
|
9188
|
+
case 'isKeyBoardCrop':
|
|
9189
|
+
args.value['output'] = this.isKeyBoardCrop(args.value['e']);
|
|
9190
|
+
break;
|
|
9191
|
+
case 'focusRatioBtn':
|
|
9192
|
+
this.focusRatioBtn();
|
|
9193
|
+
break;
|
|
9194
|
+
case 'performEnterAction':
|
|
9195
|
+
this.performEnterAction(args.value['e']);
|
|
9196
|
+
break;
|
|
9197
|
+
case 'getImagePoints':
|
|
9198
|
+
args.value['output'] = this.getImagePoints(args.value['x'], args.value['y']);
|
|
9199
|
+
break;
|
|
9200
|
+
case 'revertPoints':
|
|
9201
|
+
this.revertPoints(args.value['actPoint'], args.value['tempActiveObj']);
|
|
9202
|
+
break;
|
|
9203
|
+
case 'performNWResize':
|
|
9204
|
+
this.performNWResize(args.value['x'], args.value['y'], args.value['tempActiveObj'], args.value['actPoint']);
|
|
9205
|
+
break;
|
|
9206
|
+
case 'performSEResize':
|
|
9207
|
+
this.performSEResize(args.value['x'], args.value['y'], args.value['tempActiveObj'], args.value['actPoint']);
|
|
9208
|
+
break;
|
|
9209
|
+
case 'isMouseOutsideImg':
|
|
9210
|
+
args.value['output'] = this.isMouseOutsideImg(args.value['x'], args.value['y']);
|
|
9211
|
+
break;
|
|
9185
9212
|
}
|
|
9186
9213
|
}
|
|
9187
9214
|
getModuleName() {
|
|
@@ -12070,7 +12097,7 @@ class Selection {
|
|
|
12070
12097
|
parent.cursor : 'default';
|
|
12071
12098
|
const tempCursor = parent.upperCanvas.style.cursor;
|
|
12072
12099
|
if (parent.isResize) {
|
|
12073
|
-
this.performEnterAction();
|
|
12100
|
+
this.performEnterAction(e);
|
|
12074
12101
|
parent.upperCanvas.style.cursor = 'default';
|
|
12075
12102
|
return;
|
|
12076
12103
|
}
|
|
@@ -12708,9 +12735,10 @@ class Selection {
|
|
|
12708
12735
|
}
|
|
12709
12736
|
parent.notify('toolbar', { prop: 'update-toolbar-items', onPropertyChange: false });
|
|
12710
12737
|
if (!this.isFhdEditing) {
|
|
12738
|
+
const width = Math.floor(parent.activeObj.activePoint.width);
|
|
12711
12739
|
if (parent.activeObj.shape && parent.activeObj.shape === 'text' &&
|
|
12712
|
-
parent.activeObj.textSettings.fontSize === 11 && Math.floor(parent.activeObj.activePoint.
|
|
12713
|
-
|
|
12740
|
+
parent.activeObj.textSettings.fontSize === 11 && Math.floor(parent.activeObj.activePoint.height) === 11 &&
|
|
12741
|
+
(width === 55 || (parent.activeObj.textSettings.bold && width === 58))) {
|
|
12714
12742
|
parent.notify('shape', { prop: 'refreshActiveObj', onPropertyChange: false });
|
|
12715
12743
|
if (parent.drawingShape === 'text' && !parent.activeObj.keyHistory) {
|
|
12716
12744
|
parent.activeObj.keyHistory = 'Enter Text';
|
|
@@ -20628,13 +20656,16 @@ class Transform {
|
|
|
20628
20656
|
}
|
|
20629
20657
|
straightenImage(degree) {
|
|
20630
20658
|
const parent = this.parent;
|
|
20659
|
+
const isSelection = parent.activeObj.shape && parent.activeObj.shape.indexOf('crop-') > -1;
|
|
20631
20660
|
if (parent.toolbar && parent.toolbar.length === 0) {
|
|
20632
20661
|
parent.notify('draw', { prop: 'select', onPropertyChange: false,
|
|
20633
20662
|
value: { type: 'custom', startX: null, startY: null, width: null, height: null } });
|
|
20634
20663
|
}
|
|
20635
20664
|
parent.notify('toolbar', { prop: 'performCropTransformClick', value: { shape: null } });
|
|
20636
20665
|
parent.setStraighten(degree);
|
|
20637
|
-
|
|
20666
|
+
if (!isSelection) {
|
|
20667
|
+
parent.okBtn();
|
|
20668
|
+
}
|
|
20638
20669
|
}
|
|
20639
20670
|
}
|
|
20640
20671
|
|
|
@@ -22571,6 +22602,9 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
22571
22602
|
if (i === extension.length - 1 && extension.length > 1 &&
|
|
22572
22603
|
!((extension[i] === 'jpeg' || extension[i] === 'jpg') &&
|
|
22573
22604
|
(words.indexOf('JPG') > -1))) {
|
|
22605
|
+
if (extension.length === 2 || (extension.length === 3 && extension.indexOf('jpeg') !== -1 && extension.indexOf('jpg') !== -1)) {
|
|
22606
|
+
words = words.replace(/,\s*$/, '');
|
|
22607
|
+
}
|
|
22574
22608
|
words += ' ' + andObj['value'];
|
|
22575
22609
|
}
|
|
22576
22610
|
switch (extension[i]) {
|
|
@@ -22659,22 +22693,24 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
22659
22693
|
}
|
|
22660
22694
|
this.element.style.width = this.width;
|
|
22661
22695
|
this.element.style.height = this.height;
|
|
22662
|
-
const
|
|
22663
|
-
|
|
22664
|
-
|
|
22665
|
-
+ 'px; position: relative; overflow: hidden; margin: 0 auto;' }
|
|
22666
|
-
}));
|
|
22696
|
+
const canvasWrapperElement = this.createElement('div', { id: this.element.id + '_canvasWrapper', className: 'e-canvas-wrapper' });
|
|
22697
|
+
canvasWrapperElement.style.cssText = `height: ${this.element.offsetHeight - height - 2}px; width: ${this.element.offsetWidth - 2}px; position: relative; overflow: hidden; margin: 0 auto;`;
|
|
22698
|
+
const canvasWrapper = this.element.appendChild(canvasWrapperElement);
|
|
22667
22699
|
const dragObj = { key: 'DragText' };
|
|
22668
22700
|
this.notify('toolbar', { prop: 'getLocaleText', onPropertyChange: false, value: { obj: dragObj } });
|
|
22669
22701
|
const dropObj = { key: 'DropText' };
|
|
22670
22702
|
this.notify('toolbar', { prop: 'getLocaleText', onPropertyChange: false, value: { obj: dropObj } });
|
|
22671
22703
|
const browseObj = { key: 'BrowseText' };
|
|
22672
22704
|
this.notify('toolbar', { prop: 'getLocaleText', onPropertyChange: false, value: { obj: browseObj } });
|
|
22673
|
-
const dropAreaElement = this.createElement('div', { id: this.element.id + '_dropArea', className: 'e-ie-drop-area'
|
|
22674
|
-
|
|
22675
|
-
const
|
|
22705
|
+
const dropAreaElement = this.createElement('div', { id: this.element.id + '_dropArea', className: 'e-ie-drop-area' });
|
|
22706
|
+
dropAreaElement.style.position = 'relative';
|
|
22707
|
+
const dropIconElement = this.createElement('span', { className: 'e-ie-drop-icon e-icons e-image' });
|
|
22708
|
+
dropIconElement.style.position = 'absolute';
|
|
22709
|
+
const dropContentElement = this.createElement('span', { className: 'e-ie-drop-content' });
|
|
22710
|
+
dropContentElement.style.cssText = 'position: absolute; display: none;';
|
|
22676
22711
|
dropContentElement.textContent = dragObj['value'] + ' ';
|
|
22677
|
-
const minDropContentElem = this.createElement('span', { className: 'e-ie-min-drop-content'
|
|
22712
|
+
const minDropContentElem = this.createElement('span', { className: 'e-ie-min-drop-content' });
|
|
22713
|
+
minDropContentElem.style.position = 'absolute';
|
|
22678
22714
|
minDropContentElem.textContent = dropObj['value'] + ' ';
|
|
22679
22715
|
const dropAnchorElement = this.createElement('a', { id: this.element.id + '_dropBrowse', className: 'e-ie-drop-browse' });
|
|
22680
22716
|
dropAnchorElement.textContent = browseObj['value'];
|
|
@@ -22827,6 +22863,12 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
22827
22863
|
value: { x: x, y: y, obj: obj } });
|
|
22828
22864
|
return obj['inRange'];
|
|
22829
22865
|
}
|
|
22866
|
+
manageActiveAction() {
|
|
22867
|
+
this.applyShapes();
|
|
22868
|
+
if (this.activeObj.shape && this.activeObj.shape.indexOf('crop') > -1) {
|
|
22869
|
+
this.discard();
|
|
22870
|
+
}
|
|
22871
|
+
}
|
|
22830
22872
|
/**
|
|
22831
22873
|
* Clears the current selection performed in the image editor.
|
|
22832
22874
|
*
|
|
@@ -22868,6 +22910,8 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
22868
22910
|
*
|
|
22869
22911
|
*/
|
|
22870
22912
|
flip(direction) {
|
|
22913
|
+
this.applyShapes();
|
|
22914
|
+
this.updateImageTransformColl(direction.toLowerCase() + 'flip');
|
|
22871
22915
|
this.notify('transform', { prop: 'flip', value: { direction: direction } });
|
|
22872
22916
|
this.notify('draw', { prop: 'redrawDownScale' });
|
|
22873
22917
|
this.notify('undo-redo', { prop: 'updateCurrUrc', value: { type: 'ok' } });
|
|
@@ -23055,6 +23099,10 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
23055
23099
|
if (Browser.isDevice && straightenObj['bool']) {
|
|
23056
23100
|
this.notify('crop', { prop: 'resizeWrapper' });
|
|
23057
23101
|
}
|
|
23102
|
+
const saveDialog = this.element.querySelector('#' + this.element.id + '_saveDialog');
|
|
23103
|
+
if (saveDialog) {
|
|
23104
|
+
getComponent(saveDialog, 'dialog').close();
|
|
23105
|
+
}
|
|
23058
23106
|
const actionArgs = { action: 'reset', actionEventArgs: null };
|
|
23059
23107
|
this.triggerEditCompleteEvent(actionArgs);
|
|
23060
23108
|
}
|
|
@@ -23075,6 +23123,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
23075
23123
|
*/
|
|
23076
23124
|
rotate(degree) {
|
|
23077
23125
|
const obj = { isRotate: false };
|
|
23126
|
+
this.applyShapes();
|
|
23078
23127
|
if (degree === 90 || degree === -90) {
|
|
23079
23128
|
this.updateImageTransformColl(degree === 90 ? 'rotateright' : 'rotateleft');
|
|
23080
23129
|
}
|
|
@@ -23164,7 +23213,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
23164
23213
|
this.discard();
|
|
23165
23214
|
return;
|
|
23166
23215
|
}
|
|
23167
|
-
this.
|
|
23216
|
+
this.manageActiveAction();
|
|
23168
23217
|
this.freeHandDraw(value);
|
|
23169
23218
|
const prevObj = { shapeSettingsObj: {} };
|
|
23170
23219
|
this.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: prevObj } });
|
|
@@ -23231,6 +23280,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
23231
23280
|
const isPointsInRange = this.allowShape(x, y);
|
|
23232
23281
|
if (!this.disabled && this.isImageLoaded && (isPointsInRange || (isNullOrUndefined(x) && isNullOrUndefined(y)))) {
|
|
23233
23282
|
isEllipse = true;
|
|
23283
|
+
this.manageActiveAction();
|
|
23234
23284
|
this.notify('shape', { prop: 'drawEllipse', onPropertyChange: false, value: { x: x, y: y, radiusX: radiusX, radiusY: radiusY,
|
|
23235
23285
|
strokeWidth: strokeWidth, strokeColor: strokeColor, fillColor: fillColor, degree: degree, isSelected: isSelected } });
|
|
23236
23286
|
this.editCompleted();
|
|
@@ -23254,6 +23304,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
23254
23304
|
const isPointsInRange = this.allowShape(startX, startY);
|
|
23255
23305
|
if (!this.disabled && this.isImageLoaded && (isPointsInRange || (isNullOrUndefined(startX) && isNullOrUndefined(startY)))) {
|
|
23256
23306
|
isLine = true;
|
|
23307
|
+
this.manageActiveAction();
|
|
23257
23308
|
this.notify('shape', { prop: 'drawLine', onPropertyChange: false, value: { startX: startX, startY: startY, endX: endX,
|
|
23258
23309
|
endY: endY, strokeWidth: strokeWidth, strokeColor: strokeColor, isSelected: isSelected } });
|
|
23259
23310
|
this.editCompleted();
|
|
@@ -23279,6 +23330,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
23279
23330
|
const isPointsInRange = this.allowShape(startX, startY);
|
|
23280
23331
|
if (!this.disabled && this.isImageLoaded && (isPointsInRange || (isNullOrUndefined(startX) && isNullOrUndefined(startY)))) {
|
|
23281
23332
|
isArrow = true;
|
|
23333
|
+
this.manageActiveAction();
|
|
23282
23334
|
this.notify('shape', { prop: 'drawArrow', onPropertyChange: false, value: { startX: startX, startY: startY, endX: endX,
|
|
23283
23335
|
endY: endY, strokeWidth: strokeWidth, strokeColor: strokeColor, arrowStart: arrowStart, arrowEnd: arrowEnd,
|
|
23284
23336
|
isSelected: isSelected } });
|
|
@@ -23310,7 +23362,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
23310
23362
|
}
|
|
23311
23363
|
if (!this.disabled && this.isImageLoaded && (obj['inRange'] || isNullOrUndefined(pointColl))) {
|
|
23312
23364
|
isPath = true;
|
|
23313
|
-
this.
|
|
23365
|
+
this.manageActiveAction();
|
|
23314
23366
|
this.notify('shape', { prop: 'drawPath', onPropertyChange: false, value: { pointColl: pointColl,
|
|
23315
23367
|
strokeWidth: strokeWidth, strokeColor: strokeColor, isSelected: isSelected } });
|
|
23316
23368
|
this.editCompleted();
|
|
@@ -23337,6 +23389,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
23337
23389
|
const isPointsInRange = this.allowShape(x, y);
|
|
23338
23390
|
if (!this.disabled && this.isImageLoaded && (isPointsInRange || (isNullOrUndefined(x) && isNullOrUndefined(y)))) {
|
|
23339
23391
|
isRectangle = true;
|
|
23392
|
+
this.manageActiveAction();
|
|
23340
23393
|
this.notify('shape', { prop: 'drawRectangle', onPropertyChange: false, value: { x: x, y: y, width: width, height: height,
|
|
23341
23394
|
strokeWidth: strokeWidth, strokeColor: strokeColor, fillColor: fillColor, degree: degree, isSelected: isSelected,
|
|
23342
23395
|
radius: borderRadius } });
|
|
@@ -23371,6 +23424,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
23371
23424
|
const isPointsInRange = this.allowShape(x, y);
|
|
23372
23425
|
if (!this.disabled && this.isImageLoaded && (isPointsInRange || (isNullOrUndefined(x) && isNullOrUndefined(y)))) {
|
|
23373
23426
|
isText = true;
|
|
23427
|
+
this.manageActiveAction();
|
|
23374
23428
|
this.notify('shape', { prop: 'drawText', onPropertyChange: false, value: { x: x, y: y, text: text, fontFamily: fontFamily,
|
|
23375
23429
|
fontSize: fontSize, bold: bold, italic: italic, color: color, isSelected: isSelected, degree: degree, fillColor: fillColor,
|
|
23376
23430
|
outlineColor: strokeColor, outlineWidth: strokeWidth, transformCollection: transformCollection } });
|
|
@@ -23398,6 +23452,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
23398
23452
|
let isImage = false;
|
|
23399
23453
|
const isPointsInRange = this.allowShape(x, y);
|
|
23400
23454
|
if (!this.disabled && this.isImageLoaded && (isPointsInRange || (isNullOrUndefined(x) && isNullOrUndefined(y)))) {
|
|
23455
|
+
this.manageActiveAction();
|
|
23401
23456
|
const length = this.objColl.length;
|
|
23402
23457
|
this.notify('shape', { prop: 'drawImage', onPropertyChange: false, value: { x: x, y: y, width: width, height: height,
|
|
23403
23458
|
src: data, degree: degree, isAspectRatio: isAspectRatio, opacity: opacity, isSelected: isSelected } });
|
|
@@ -23445,7 +23500,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
23445
23500
|
this.okBtn(null, true);
|
|
23446
23501
|
isTextArea = true;
|
|
23447
23502
|
}
|
|
23448
|
-
this.notify('shape', { prop: 'selectShape', onPropertyChange: false, value: { id: setting.id, obj: obj } });
|
|
23503
|
+
this.notify('shape', { prop: 'selectShape', onPropertyChange: false, value: { id: setting.id, obj: obj, isShape: true } });
|
|
23449
23504
|
this.notify('selection', { prop: 'getFreehandDrawEditing', onPropertyChange: false, value: { obj: freehandObj } });
|
|
23450
23505
|
if (obj['isSelected']) {
|
|
23451
23506
|
const tempFontSize = this.activeObj.textSettings.fontSize;
|
|
@@ -23505,7 +23560,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
23505
23560
|
selectShape(id) {
|
|
23506
23561
|
this.applyShapes();
|
|
23507
23562
|
const obj = { isSelected: false };
|
|
23508
|
-
this.notify('shape', { prop: 'selectShape', onPropertyChange: false, value: { id: id, obj: obj } });
|
|
23563
|
+
this.notify('shape', { prop: 'selectShape', onPropertyChange: false, value: { id: id, obj: obj, isShape: true } });
|
|
23509
23564
|
this.editCompleted('shape-select');
|
|
23510
23565
|
this.noRedact = false;
|
|
23511
23566
|
return obj['isSelected'];
|
|
@@ -23527,7 +23582,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
23527
23582
|
return;
|
|
23528
23583
|
}
|
|
23529
23584
|
this.applyShapes();
|
|
23530
|
-
this.notify('shape', { prop: 'deleteShape', onPropertyChange: false, value: { id: id } });
|
|
23585
|
+
this.notify('shape', { prop: 'deleteShape', onPropertyChange: false, value: { id: id, isShape: true } });
|
|
23531
23586
|
this.editCompleted('shape-delete');
|
|
23532
23587
|
}
|
|
23533
23588
|
/**
|
|
@@ -23586,7 +23641,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
23586
23641
|
selectRedact(id) {
|
|
23587
23642
|
this.applyShapes();
|
|
23588
23643
|
const obj = { isSelected: false };
|
|
23589
|
-
this.notify('shape', { prop: 'selectShape', onPropertyChange: false, value: { id: id, obj: obj } });
|
|
23644
|
+
this.notify('shape', { prop: 'selectShape', onPropertyChange: false, value: { id: id, obj: obj, isRedact: true } });
|
|
23590
23645
|
this.editCompleted('redact-select');
|
|
23591
23646
|
this.noRedact = false;
|
|
23592
23647
|
return obj['isSelected'];
|
|
@@ -23602,7 +23657,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
23602
23657
|
*/
|
|
23603
23658
|
deleteRedact(id) {
|
|
23604
23659
|
this.applyShapes();
|
|
23605
|
-
this.notify('shape', { prop: 'deleteShape', onPropertyChange: false, value: { id: id } });
|
|
23660
|
+
this.notify('shape', { prop: 'deleteShape', onPropertyChange: false, value: { id: id, isRedact: true } });
|
|
23606
23661
|
this.editCompleted('redact-delete');
|
|
23607
23662
|
}
|
|
23608
23663
|
/**
|
|
@@ -23617,7 +23672,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
23617
23672
|
updateRedact(setting, isSelected) {
|
|
23618
23673
|
this.applyShapes();
|
|
23619
23674
|
const obj = { isSelected: false };
|
|
23620
|
-
this.notify('shape', { prop: 'selectShape', onPropertyChange: false, value: { id: setting.id, obj: obj } });
|
|
23675
|
+
this.notify('shape', { prop: 'selectShape', onPropertyChange: false, value: { id: setting.id, obj: obj, isRedact: true } });
|
|
23621
23676
|
if (obj['isSelected']) {
|
|
23622
23677
|
this.notify('shape', { prop: 'updateShapeChangeEventArgs', onPropertyChange: false,
|
|
23623
23678
|
value: { shapeSettings: setting } });
|
|
@@ -23667,7 +23722,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
23667
23722
|
*/
|
|
23668
23723
|
finetuneImage(finetuneOption, value) {
|
|
23669
23724
|
if (!this.disabled && this.isImageLoaded) {
|
|
23670
|
-
this.
|
|
23725
|
+
this.manageActiveAction();
|
|
23671
23726
|
this.notify('filter', { prop: 'finetuneImage', value: { value: value, option: finetuneOption } });
|
|
23672
23727
|
this.editCompleteArgs = { finetune: finetuneOption, value: value };
|
|
23673
23728
|
this.editCompleted('fine-tune');
|
|
@@ -23684,7 +23739,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
23684
23739
|
*/
|
|
23685
23740
|
applyImageFilter(filterOption) {
|
|
23686
23741
|
if (!this.disabled && this.isImageLoaded) {
|
|
23687
|
-
this.
|
|
23742
|
+
this.manageActiveAction();
|
|
23688
23743
|
this.notify('filter', { prop: 'applyImageFilter', value: { option: filterOption.toString() } });
|
|
23689
23744
|
this.editCompleteArgs = { filter: filterOption };
|
|
23690
23745
|
this.editCompleted('filter');
|
|
@@ -23701,7 +23756,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
23701
23756
|
* @returns {void}.
|
|
23702
23757
|
*/
|
|
23703
23758
|
undo() {
|
|
23704
|
-
this.
|
|
23759
|
+
this.manageActiveAction();
|
|
23705
23760
|
this.notify('undo-redo', { prop: 'undo', onPropertyChange: false });
|
|
23706
23761
|
this.notify('draw', { prop: 'redrawDownScale' });
|
|
23707
23762
|
}
|
|
@@ -23713,7 +23768,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
23713
23768
|
* @returns {void}.
|
|
23714
23769
|
*/
|
|
23715
23770
|
redo() {
|
|
23716
|
-
this.
|
|
23771
|
+
this.manageActiveAction();
|
|
23717
23772
|
this.notify('undo-redo', { prop: 'redo', onPropertyChange: false });
|
|
23718
23773
|
this.notify('draw', { prop: 'redrawDownScale' });
|
|
23719
23774
|
}
|
|
@@ -23738,8 +23793,9 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
23738
23793
|
*/
|
|
23739
23794
|
resize(width, height, isAspectRatio) {
|
|
23740
23795
|
let isResized = false;
|
|
23741
|
-
if ((width.toString()).length <= 4 && (height.toString()).length <= 4) {
|
|
23742
|
-
this.
|
|
23796
|
+
if (((width.toString()).length <= 4 && (height.toString()).length <= 4) && (!this.isCircleCrop || isAspectRatio)) {
|
|
23797
|
+
this.manageActiveAction();
|
|
23798
|
+
this.notify('toolbar', { prop: 'resizeClick', value: { bool: false } });
|
|
23743
23799
|
const destPoints = { startX: this.img.destLeft, startY: this.img.destTop, width: this.img.destWidth,
|
|
23744
23800
|
height: this.img.destHeight };
|
|
23745
23801
|
if (isAspectRatio) {
|
|
@@ -23764,7 +23820,12 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
23764
23820
|
if (destPoints.startX !== this.img.destLeft || destPoints.startY !== this.img.destTop ||
|
|
23765
23821
|
destPoints.width !== this.img.destWidth || destPoints.height !== this.img.destHeight) {
|
|
23766
23822
|
isResized = true;
|
|
23767
|
-
this.
|
|
23823
|
+
this.aspectWidth = width;
|
|
23824
|
+
this.aspectHeight = height;
|
|
23825
|
+
if (isAspectRatio) {
|
|
23826
|
+
this.aspectHeight = null;
|
|
23827
|
+
}
|
|
23828
|
+
this.okBtn(false, false, true);
|
|
23768
23829
|
}
|
|
23769
23830
|
else {
|
|
23770
23831
|
this.notify('draw', { prop: 'performCancel', value: { isContextualToolbar: null } });
|
|
@@ -23789,7 +23850,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
23789
23850
|
* @returns {boolean}.
|
|
23790
23851
|
*/
|
|
23791
23852
|
drawFrame(frameType, color, gradientColor, size, inset, offset, borderRadius, frameLineStyle, lineCount) {
|
|
23792
|
-
this.
|
|
23853
|
+
this.manageActiveAction();
|
|
23793
23854
|
let isFrame = false;
|
|
23794
23855
|
const obj = { frameChangeEventArgs: null };
|
|
23795
23856
|
color = color ? color : '#fff';
|
|
@@ -23834,6 +23895,10 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
23834
23895
|
this.tempFrameZoomLevel = null;
|
|
23835
23896
|
}
|
|
23836
23897
|
this.notify('draw', { prop: 'redrawDownScale' });
|
|
23898
|
+
const ctxTbar = this.element.querySelector('.e-contextual-toolbar-wrapper');
|
|
23899
|
+
if (ctxTbar) {
|
|
23900
|
+
ctxTbar.classList.add('e-hide');
|
|
23901
|
+
}
|
|
23837
23902
|
return isFrame;
|
|
23838
23903
|
}
|
|
23839
23904
|
/**
|
|
@@ -24662,10 +24727,11 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
24662
24727
|
*
|
|
24663
24728
|
* @param { boolean } isMouseDown - Specifies whether it is a mouse down.
|
|
24664
24729
|
* @param { boolean } isFinalApply - Specifies whether it is a final apply.
|
|
24730
|
+
* @param { boolean } isResize - Specifies whether it is called from resize public method.
|
|
24665
24731
|
* @hidden
|
|
24666
24732
|
* @returns {void}.
|
|
24667
24733
|
*/
|
|
24668
|
-
okBtn(isMouseDown, isFinalApply) {
|
|
24734
|
+
okBtn(isMouseDown, isFinalApply, isResize) {
|
|
24669
24735
|
if (isFinalApply) {
|
|
24670
24736
|
this.noPushUndo = false;
|
|
24671
24737
|
const tempActiveObj = { activePoint: { startX: 0, startY: 0, endX: 0, endY: 0, width: 0, height: 0 },
|
|
@@ -24764,6 +24830,45 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
24764
24830
|
}
|
|
24765
24831
|
this.isAspectRatio = false;
|
|
24766
24832
|
}
|
|
24833
|
+
else if (isResize) {
|
|
24834
|
+
let isAspectRatio = false;
|
|
24835
|
+
if (this.aspectWidth && this.aspectHeight) {
|
|
24836
|
+
this.notify('transform', { prop: 'resize', value: { width: this.aspectWidth, height: this.aspectHeight, isAspectRatio: false } });
|
|
24837
|
+
}
|
|
24838
|
+
else if (this.aspectWidth) {
|
|
24839
|
+
this.notify('transform', { prop: 'resize', value: { width: this.aspectWidth, height: null, isAspectRatio: true } });
|
|
24840
|
+
this.aspectHeight = this.aspectWidth / (this.img.destWidth / this.img.destHeight);
|
|
24841
|
+
isAspectRatio = true;
|
|
24842
|
+
}
|
|
24843
|
+
this.isResize = false;
|
|
24844
|
+
this.notify('toolbar', { prop: 'refresh-toolbar', onPropertyChange: false, value: { type: 'main',
|
|
24845
|
+
isApplyBtn: false, isCropping: false, isZooming: null, cType: null } });
|
|
24846
|
+
this.notify('transform', { prop: 'zoomAction', onPropertyChange: false,
|
|
24847
|
+
value: { zoomFactor: -this.transform.zoomFactor, zoomPoint: null, isResize: true } });
|
|
24848
|
+
this.notify('transform', { prop: 'zoomAction', onPropertyChange: false,
|
|
24849
|
+
value: { zoomFactor: this.prevObj['defaultZoom'], zoomPoint: null, isResize: true } });
|
|
24850
|
+
if (this.prevObj.zoomFactor) {
|
|
24851
|
+
this.setProperties({ zoomSettings: { zoomFactor: this.prevObj.zoomFactor } }, true);
|
|
24852
|
+
}
|
|
24853
|
+
this.notify('transform', { prop: 'setPreviousZoomValue', onPropertyChange: false,
|
|
24854
|
+
value: { previousZoomValue: this.zoomSettings.zoomFactor } });
|
|
24855
|
+
this.notify('undo-redo', { prop: 'updateUndoRedoColl', onPropertyChange: false, value: { operation: 'resize',
|
|
24856
|
+
previousObj: this.prevObj, previousObjColl: this.prevObj['objColl'],
|
|
24857
|
+
previousPointColl: this.prevObj['pointColl'], previousSelPointColl: this.prevObj['selPointColl'],
|
|
24858
|
+
previousCropObj: this.prevCropObj, previousText: null, currentText: null, previousFilter: null,
|
|
24859
|
+
isCircleCrop: null } });
|
|
24860
|
+
this.notify('undo-redo', { prop: 'updateCurrUrc', value: { type: 'ok' } });
|
|
24861
|
+
const obj = this.cancelCropSelection;
|
|
24862
|
+
if ((obj && isAspectRatio)) {
|
|
24863
|
+
obj.previousObj.aspectWidth = obj.currentObj.aspectWidth = this.aspectWidth;
|
|
24864
|
+
obj.previousObj.aspectHeight = obj.currentObj.aspectHeight = this.aspectHeight;
|
|
24865
|
+
obj.previousCropObj = extend({}, this.cropObj, {}, true);
|
|
24866
|
+
obj.currentCropObj = extend({}, this.cropObj, {}, true);
|
|
24867
|
+
this.notify('draw', { prop: 'updateCropSelObj' });
|
|
24868
|
+
}
|
|
24869
|
+
this.cancelCropSelection = null;
|
|
24870
|
+
this.isAspectRatio = false;
|
|
24871
|
+
}
|
|
24767
24872
|
const selElem = this.element.querySelector('.e-contextual-toolbar-wrapper .e-toolbar-item.e-selected');
|
|
24768
24873
|
const obj = { bool: false };
|
|
24769
24874
|
this.notify('selection', { prop: 'getFreehandDrawEditing', onPropertyChange: false, value: { obj: obj } });
|
|
@@ -26333,6 +26438,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
26333
26438
|
const isPointsInRange = this.allowShape(x, y);
|
|
26334
26439
|
if (!this.disabled && this.isImageLoaded && (isPointsInRange || (isNullOrUndefined(x) && isNullOrUndefined(y)))) {
|
|
26335
26440
|
isRedact = true;
|
|
26441
|
+
this.manageActiveAction();
|
|
26336
26442
|
this.notify('shape', {
|
|
26337
26443
|
prop: 'drawRedact', onPropertyChange: false, value: {
|
|
26338
26444
|
x: x, y: y, width: width, height: height, type: type, value: value
|
|
@@ -27117,6 +27223,48 @@ class ToolbarModule {
|
|
|
27117
27223
|
case 'heightAspectRatio':
|
|
27118
27224
|
this.heightAspectRatio(args.value['e']);
|
|
27119
27225
|
break;
|
|
27226
|
+
case 'cancelPan':
|
|
27227
|
+
this.cancelPan();
|
|
27228
|
+
break;
|
|
27229
|
+
case 'zoomInBtnMouseDownHandler':
|
|
27230
|
+
this.zoomInBtnMouseDownHandler(args.value['event']);
|
|
27231
|
+
break;
|
|
27232
|
+
case 'zoomOutBtnMouseDownHandler':
|
|
27233
|
+
this.zoomOutBtnMouseDownHandler(args.value['event']);
|
|
27234
|
+
break;
|
|
27235
|
+
case 'drawDashedLine':
|
|
27236
|
+
this.drawDashedLine(args.value['context']);
|
|
27237
|
+
break;
|
|
27238
|
+
case 'saveDialogClosed':
|
|
27239
|
+
this.saveDialogClosed(args.value['id']);
|
|
27240
|
+
break;
|
|
27241
|
+
case 'getIndex':
|
|
27242
|
+
this.getIndex(args.value['item']);
|
|
27243
|
+
break;
|
|
27244
|
+
case 'getRectRadius':
|
|
27245
|
+
this.getRectRadius(args.value['text']);
|
|
27246
|
+
break;
|
|
27247
|
+
case 'applyPreviewFilter':
|
|
27248
|
+
this.applyPreviewFilter();
|
|
27249
|
+
break;
|
|
27250
|
+
case 'renderSlider':
|
|
27251
|
+
this.renderSlider(args.value['type'], args.value['isSelect']);
|
|
27252
|
+
break;
|
|
27253
|
+
case 'zoomInBtnClickHandler':
|
|
27254
|
+
this.zoomInBtnClickHandler(args.value['e']);
|
|
27255
|
+
break;
|
|
27256
|
+
case 'zoomOutBtnClickHandler':
|
|
27257
|
+
this.zoomOutBtnClickHandler(args.value['e']);
|
|
27258
|
+
break;
|
|
27259
|
+
case 'getAdjustmentToolbarItem':
|
|
27260
|
+
this.getAdjustmentToolbarItem();
|
|
27261
|
+
break;
|
|
27262
|
+
case 'getFilterToolbarItem':
|
|
27263
|
+
this.getFilterToolbarItem();
|
|
27264
|
+
break;
|
|
27265
|
+
case 'renderCropBtn':
|
|
27266
|
+
this.renderCropBtn();
|
|
27267
|
+
break;
|
|
27120
27268
|
}
|
|
27121
27269
|
}
|
|
27122
27270
|
updatePrivateVariables() {
|
|
@@ -27244,9 +27392,9 @@ class ToolbarModule {
|
|
|
27244
27392
|
const parent = this.parent;
|
|
27245
27393
|
const id = parent.element.id;
|
|
27246
27394
|
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.length > 0)) {
|
|
27247
|
-
parent.
|
|
27248
|
-
|
|
27249
|
-
|
|
27395
|
+
const contextualToolbarArea = parent.createElement('div', { id: id + '_contextualToolbarArea', className: 'e-contextual-toolbar-wrapper e-hide' });
|
|
27396
|
+
contextualToolbarArea.style.position = 'absolute';
|
|
27397
|
+
parent.element.appendChild(contextualToolbarArea);
|
|
27250
27398
|
const toolbarArea = document.getElementById(id + '_contextualToolbarArea');
|
|
27251
27399
|
const toolbar = parent.createElement('div', { id: id + '_contextualToolbar' });
|
|
27252
27400
|
toolbarArea.appendChild(toolbar);
|
|
@@ -28121,8 +28269,9 @@ class ToolbarModule {
|
|
|
28121
28269
|
enableDisableCloneBtn(toolbarId, obj) {
|
|
28122
28270
|
const parent = this.parent;
|
|
28123
28271
|
let isDummyTextClick = false;
|
|
28272
|
+
const width = Math.floor(parent.activeObj.activePoint.width);
|
|
28124
28273
|
if (parent.activeObj.shape && parent.activeObj.shape === 'text' &&
|
|
28125
|
-
parent.activeObj.textSettings.fontSize === 11 &&
|
|
28274
|
+
parent.activeObj.textSettings.fontSize === 11 && (width === 55 || (parent.activeObj.textSettings.bold && width === 58)) &&
|
|
28126
28275
|
Math.floor(parent.activeObj.activePoint.height) === 11) {
|
|
28127
28276
|
isDummyTextClick = true;
|
|
28128
28277
|
}
|
|
@@ -28309,8 +28458,9 @@ class ToolbarModule {
|
|
|
28309
28458
|
const quality = ['Good', 'Great', 'Highest'];
|
|
28310
28459
|
parent.element.appendChild(parent.createElement('div', { id: id + '_saveDialog' }));
|
|
28311
28460
|
const dialogContent = parent.createElement('div', {
|
|
28312
|
-
id: id + '_dialogContent'
|
|
28461
|
+
id: id + '_dialogContent'
|
|
28313
28462
|
});
|
|
28463
|
+
dialogContent.style.display = 'flex';
|
|
28314
28464
|
const dialogImgContent = dialogContent.appendChild(parent.createElement('div', {
|
|
28315
28465
|
id: id + '_dialogImgContent', className: 'e-ie-dlg-img-content'
|
|
28316
28466
|
}));
|
|
@@ -28747,7 +28897,7 @@ class ToolbarModule {
|
|
|
28747
28897
|
}
|
|
28748
28898
|
if ((isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Straightening') > -1)) && !Browser.isDevice) {
|
|
28749
28899
|
toolbarItems.push({ align: 'Center', type: 'Separator' });
|
|
28750
|
-
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar &&
|
|
28900
|
+
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Straightening') > -1)) {
|
|
28751
28901
|
const spanWidth = document.createElement('span');
|
|
28752
28902
|
spanWidth.innerHTML = this.l10n.getConstant('Straighten');
|
|
28753
28903
|
toolbarItems.push({ id: id + '_straightenSpan', cssClass: 'e-ie-straighten-span', template: spanWidth, align: 'Center' });
|
|
@@ -29966,7 +30116,9 @@ class ToolbarModule {
|
|
|
29966
30116
|
}
|
|
29967
30117
|
break;
|
|
29968
30118
|
case 'shapes':
|
|
29969
|
-
parent.
|
|
30119
|
+
if (!parent.isPublicMethod) {
|
|
30120
|
+
parent.noPushUndo = true;
|
|
30121
|
+
}
|
|
29970
30122
|
if (Browser.isDevice) {
|
|
29971
30123
|
this.initMainToolbar(false, true, true);
|
|
29972
30124
|
}
|
|
@@ -30300,37 +30452,37 @@ class ToolbarModule {
|
|
|
30300
30452
|
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Default') > -1)) {
|
|
30301
30453
|
toolbarItems.push({ id: id + '_default', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
|
|
30302
30454
|
tooltipText: this.l10n.getConstant('Default'), align: 'Center',
|
|
30303
|
-
template: '<div class="filter-wrapper"
|
|
30455
|
+
template: '<div class="filter-wrapper"><canvas id=' + id + '_defaultCanvas' + ' tabindex=0></canvas><div><span>' + this.l10n.getConstant('Default') + '</span></div></div>' });
|
|
30304
30456
|
}
|
|
30305
30457
|
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Chrome') > -1)) {
|
|
30306
30458
|
toolbarItems.push({ id: id + '_chrome', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
|
|
30307
30459
|
tooltipText: this.l10n.getConstant('Chrome'), align: 'Center',
|
|
30308
|
-
template: '<div class="filter-wrapper"
|
|
30460
|
+
template: '<div class="filter-wrapper"><canvas id=' + id + '_chromeCanvas' + '></canvas><div><span>' + this.l10n.getConstant('Chrome') + '</span></div></div>' });
|
|
30309
30461
|
}
|
|
30310
30462
|
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Cold') > -1)) {
|
|
30311
30463
|
toolbarItems.push({ id: id + '_cold', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
|
|
30312
30464
|
tooltipText: this.l10n.getConstant('Cold'), align: 'Center',
|
|
30313
|
-
template: '<div class="filter-wrapper"
|
|
30465
|
+
template: '<div class="filter-wrapper"><canvas id=' + id + '_coldCanvas' + '></canvas><div><span>' + this.l10n.getConstant('Cold') + '</span></div></div>' });
|
|
30314
30466
|
}
|
|
30315
30467
|
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Warm') > -1)) {
|
|
30316
30468
|
toolbarItems.push({ id: id + '_warm', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
|
|
30317
30469
|
tooltipText: this.l10n.getConstant('Warm'), align: 'Center',
|
|
30318
|
-
template: '<div class="filter-wrapper"
|
|
30470
|
+
template: '<div class="filter-wrapper"><canvas id=' + id + '_warmCanvas' + '></canvas><div><span>' + this.l10n.getConstant('Warm') + '</span></div></div>' });
|
|
30319
30471
|
}
|
|
30320
30472
|
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Grayscale') > -1)) {
|
|
30321
30473
|
toolbarItems.push({ id: id + '_grayscale', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
|
|
30322
30474
|
tooltipText: this.l10n.getConstant('Grayscale'), align: 'Center',
|
|
30323
|
-
template: '<div class="filter-wrapper"
|
|
30475
|
+
template: '<div class="filter-wrapper"><canvas id=' + id + '_grayscaleCanvas' + '></canvas><div><span>' + this.l10n.getConstant('Grayscale') + '</span></div></div>' });
|
|
30324
30476
|
}
|
|
30325
30477
|
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Sepia') > -1)) {
|
|
30326
30478
|
toolbarItems.push({ id: id + '_sepia', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
|
|
30327
30479
|
tooltipText: this.l10n.getConstant('Sepia'), align: 'Center',
|
|
30328
|
-
template: '<div class="filter-wrapper"
|
|
30480
|
+
template: '<div class="filter-wrapper"><canvas id=' + id + '_sepiaCanvas' + '></canvas><div><span>' + this.l10n.getConstant('Sepia') + '</span></div></div>' });
|
|
30329
30481
|
}
|
|
30330
30482
|
if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Invert') > -1)) {
|
|
30331
30483
|
toolbarItems.push({ id: id + '_invert', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
|
|
30332
30484
|
tooltipText: this.l10n.getConstant('Invert'), align: 'Center',
|
|
30333
|
-
template: '<div class="filter-wrapper"
|
|
30485
|
+
template: '<div class="filter-wrapper"><canvas id=' + id + '_invertCanvas' + '></canvas><div><span>' + this.l10n.getConstant('Invert') + '</span></div></div>' });
|
|
30334
30486
|
}
|
|
30335
30487
|
const tempToolbarItems = this.processToolbar('center');
|
|
30336
30488
|
for (let i = 0, len = tempToolbarItems.length; i < len; i++) {
|
|
@@ -31920,6 +32072,7 @@ class ToolbarModule {
|
|
|
31920
32072
|
let splitWords;
|
|
31921
32073
|
let actionType;
|
|
31922
32074
|
let actionArgs;
|
|
32075
|
+
let isRedactClick = false;
|
|
31923
32076
|
if (parent.activeObj.shape !== undefined) {
|
|
31924
32077
|
splitWords = parent.activeObj.shape.split('-');
|
|
31925
32078
|
}
|
|
@@ -32223,7 +32376,7 @@ class ToolbarModule {
|
|
|
32223
32376
|
parent.notify('draw', { prop: 'triggerFrameChange', value: { prevFrameSettings: parent.tempFrameObj, obj: { frameChangeEventArgs: null } } });
|
|
32224
32377
|
break;
|
|
32225
32378
|
case 'redact':
|
|
32226
|
-
parent.currObjType.isRedact = true;
|
|
32379
|
+
parent.currObjType.isRedact = isRedactClick = true;
|
|
32227
32380
|
parent.drawingShape = 'redact';
|
|
32228
32381
|
if (isNullOrUndefined(parent.activeObj.redactBlur)) {
|
|
32229
32382
|
parent.activeObj.redactBlur = 20;
|
|
@@ -32236,7 +32389,7 @@ class ToolbarModule {
|
|
|
32236
32389
|
this.redactSlider(parent.activeObj.redactType);
|
|
32237
32390
|
break;
|
|
32238
32391
|
case 'pixelate':
|
|
32239
|
-
parent.currObjType.isRedact = true;
|
|
32392
|
+
parent.currObjType.isRedact = isRedactClick = true;
|
|
32240
32393
|
parent.drawingShape = 'redact';
|
|
32241
32394
|
parent.notify('selection', { prop: 'annotate', value: { shape: 'redact' } });
|
|
32242
32395
|
if (parent.activeObj.redactType === 'blur') {
|
|
@@ -32270,7 +32423,7 @@ class ToolbarModule {
|
|
|
32270
32423
|
}
|
|
32271
32424
|
break;
|
|
32272
32425
|
case 'redactblur':
|
|
32273
|
-
parent.currObjType.isRedact = true;
|
|
32426
|
+
parent.currObjType.isRedact = isRedactClick = true;
|
|
32274
32427
|
parent.drawingShape = 'redact';
|
|
32275
32428
|
parent.notify('selection', { prop: 'annotate', value: { shape: 'redact' } });
|
|
32276
32429
|
parent.notify('shape', { prop: 'setRedactType', onPropertyChange: false,
|
|
@@ -32305,6 +32458,10 @@ class ToolbarModule {
|
|
|
32305
32458
|
}
|
|
32306
32459
|
break;
|
|
32307
32460
|
}
|
|
32461
|
+
if (isRedactClick) {
|
|
32462
|
+
parent.notify('draw', { prop: 'updateTempObjColl' });
|
|
32463
|
+
parent.notify('draw', { prop: 'updateTempPointColl' });
|
|
32464
|
+
}
|
|
32308
32465
|
}
|
|
32309
32466
|
}
|
|
32310
32467
|
updateRedactType(value) {
|