@syncfusion/ej2-image-editor 26.1.41 → 26.2.4
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/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 +79 -15
- package/dist/es6/ej2-image-editor.es2015.js.map +1 -1
- package/dist/es6/ej2-image-editor.es5.js +78 -14
- package/dist/es6/ej2-image-editor.es5.js.map +1 -1
- package/dist/global/ej2-image-editor.min.js +2 -2
- package/dist/global/ej2-image-editor.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/hotfix/26.1.35_Vol2.txt +1 -0
- package/package.json +12 -12
- package/src/image-editor/action/selection.js +4 -1
- package/src/image-editor/action/transform.js +2 -1
- package/src/image-editor/base/image-editor.js +56 -7
- package/src/image-editor/renderer/toolbar.js +16 -5
- package/styles/bootstrap-dark.css +0 -2
- package/styles/bootstrap.css +0 -2
- package/styles/bootstrap4.css +2 -0
- package/styles/bootstrap5-dark.css +2 -0
- package/styles/bootstrap5.css +2 -0
- package/styles/fabric-dark.css +1 -2
- package/styles/fabric.css +1 -2
- package/styles/fluent-dark.css +3 -2
- package/styles/fluent.css +3 -2
- package/styles/fluent2.css +26 -12
- package/styles/highcontrast-light.css +3 -2
- package/styles/highcontrast.css +3 -2
- package/styles/image-editor/_layout.scss +16 -0
- package/styles/image-editor/_theme.scss +34 -1
- package/styles/image-editor/bootstrap-dark.css +0 -2
- package/styles/image-editor/bootstrap.css +0 -2
- package/styles/image-editor/bootstrap4.css +2 -0
- package/styles/image-editor/bootstrap5-dark.css +2 -0
- package/styles/image-editor/bootstrap5.css +2 -0
- package/styles/image-editor/fabric-dark.css +1 -2
- package/styles/image-editor/fabric.css +1 -2
- package/styles/image-editor/fluent-dark.css +3 -2
- package/styles/image-editor/fluent.css +3 -2
- package/styles/image-editor/fluent2.css +26 -12
- package/styles/image-editor/highcontrast-light.css +3 -2
- package/styles/image-editor/highcontrast.css +3 -2
- package/styles/image-editor/material-dark.css +0 -2
- package/styles/image-editor/material.css +0 -2
- package/styles/image-editor/material3-dark.css +2 -3
- package/styles/image-editor/material3.css +2 -3
- package/styles/image-editor/tailwind-dark.css +2 -2
- package/styles/image-editor/tailwind.css +2 -2
- package/styles/material-dark.css +0 -2
- package/styles/material.css +0 -2
- package/styles/material3-dark.css +2 -3
- package/styles/material3.css +2 -3
- package/styles/tailwind-dark.css +2 -2
- package/styles/tailwind.css +2 -2
|
@@ -9099,6 +9099,10 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
9099
9099
|
return;
|
|
9100
9100
|
}
|
|
9101
9101
|
var actObj = extend({}, obj[i], {}, true);
|
|
9102
|
+
if (actObj.activePoint.width === 0 && actObj.activePoint.height === 0) {
|
|
9103
|
+
obj.splice(i, 1);
|
|
9104
|
+
return;
|
|
9105
|
+
}
|
|
9102
9106
|
this.cursorTargetId = actObj.currIndex;
|
|
9103
9107
|
if (actObj.shape === 'line' || actObj.shape === 'arrow') {
|
|
9104
9108
|
this.setCursorForLineArrow(actObj, x, y, upperCanvas);
|
|
@@ -11688,7 +11692,6 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
11688
11692
|
var tempObj = extend({}, parent.objColl[parent.objColl.length - 1], {}, true);
|
|
11689
11693
|
parent.objColl.pop();
|
|
11690
11694
|
this.redrawShape(tempObj);
|
|
11691
|
-
parent.objColl.push(tempObj);
|
|
11692
11695
|
this.tempObjColl = undefined;
|
|
11693
11696
|
}
|
|
11694
11697
|
if (!this.isFhdEditing) {
|
|
@@ -18683,7 +18686,8 @@ var Transform = /** @__PURE__ @class */ (function () {
|
|
|
18683
18686
|
if (freehandObj['bool']) {
|
|
18684
18687
|
parent.notify('toolbar', { prop: 'destroy-qa-toolbar', onPropertyChange: false });
|
|
18685
18688
|
}
|
|
18686
|
-
|
|
18689
|
+
var actPoint = extend({}, parent.activeObj.activePoint, {}, true);
|
|
18690
|
+
if (parent.activeObj.shape && (actPoint.width !== 0 || actPoint.height !== 0)) {
|
|
18687
18691
|
isActiveObj = true;
|
|
18688
18692
|
if (parent.textArea.style.display === 'block' || parent.textArea.style.display === 'inline-block') {
|
|
18689
18693
|
parent.notify('shape', { prop: 'redrawActObj', onPropertyChange: false,
|
|
@@ -22989,7 +22993,12 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
22989
22993
|
* @returns {void}.
|
|
22990
22994
|
*/
|
|
22991
22995
|
ImageEditor.prototype.updateArrow = function (type, id) {
|
|
22996
|
+
var isObjPushed = false;
|
|
22997
|
+
var collLength = this.objColl.length;
|
|
22992
22998
|
this.notify('shape', { prop: 'pushActItemIntoObj' });
|
|
22999
|
+
if (collLength !== this.objColl.length) {
|
|
23000
|
+
isObjPushed = true;
|
|
23001
|
+
}
|
|
22993
23002
|
var prevCropObj = extend({}, this.cropObj, {}, true);
|
|
22994
23003
|
var object = { currObj: {} };
|
|
22995
23004
|
var objt = { shapeSettingsObj: {} };
|
|
@@ -23000,7 +23009,9 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23000
23009
|
prevObj.objColl = extend([], this.objColl, [], true);
|
|
23001
23010
|
prevObj.pointColl = extend([], this.pointColl, [], true);
|
|
23002
23011
|
prevObj.afterCropActions = extend([], this.afterCropActions, [], true);
|
|
23003
|
-
|
|
23012
|
+
if (isObjPushed) {
|
|
23013
|
+
this.objColl.pop();
|
|
23014
|
+
}
|
|
23004
23015
|
if (type === 'startArrow') {
|
|
23005
23016
|
this.activeObj.start = this.getTextFromId(id);
|
|
23006
23017
|
}
|
|
@@ -23044,7 +23055,12 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23044
23055
|
*/
|
|
23045
23056
|
ImageEditor.prototype.updateFontFamily = function (id) {
|
|
23046
23057
|
this.notify('selection', { prop: 'setInitialTextEdit', value: { bool: false } });
|
|
23058
|
+
var isObjPushed = false;
|
|
23059
|
+
var collLength = this.objColl.length;
|
|
23047
23060
|
this.notify('shape', { prop: 'pushActItemIntoObj' });
|
|
23061
|
+
if (collLength !== this.objColl.length) {
|
|
23062
|
+
isObjPushed = true;
|
|
23063
|
+
}
|
|
23048
23064
|
var objColl = extend([], this.objColl, [], true);
|
|
23049
23065
|
var prevCropObj = extend({}, this.cropObj, {}, true);
|
|
23050
23066
|
var objt = { shapeSettingsObj: {} };
|
|
@@ -23060,7 +23076,9 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23060
23076
|
this.notify('freehand-draw', { prop: 'getSelPointColl', onPropertyChange: false,
|
|
23061
23077
|
value: { obj: selPointCollObj } });
|
|
23062
23078
|
prevObj.selPointColl = extend([], selPointCollObj['selPointColl'], [], true);
|
|
23063
|
-
|
|
23079
|
+
if (isObjPushed) {
|
|
23080
|
+
this.objColl.pop();
|
|
23081
|
+
}
|
|
23064
23082
|
if (this.textArea.style.display === 'block' || this.textArea.style.display === 'inline-block') {
|
|
23065
23083
|
this.notify('shape', { prop: 'updateFontRatio', onPropertyChange: false,
|
|
23066
23084
|
value: { obj: this.activeObj, isTextArea: true } });
|
|
@@ -23120,7 +23138,12 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23120
23138
|
ImageEditor.prototype.updateFontSize = function (text) {
|
|
23121
23139
|
var itemText = text;
|
|
23122
23140
|
this.notify('selection', { prop: 'setInitialTextEdit', value: { bool: false } });
|
|
23141
|
+
var isObjPushed = false;
|
|
23142
|
+
var collLength = this.objColl.length;
|
|
23123
23143
|
this.notify('shape', { prop: 'pushActItemIntoObj' });
|
|
23144
|
+
if (collLength !== this.objColl.length) {
|
|
23145
|
+
isObjPushed = true;
|
|
23146
|
+
}
|
|
23124
23147
|
var prevCropObj = extend({}, this.cropObj, {}, true);
|
|
23125
23148
|
var objt = { shapeSettingsObj: {} };
|
|
23126
23149
|
this.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: objt } });
|
|
@@ -23135,7 +23158,9 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23135
23158
|
this.notify('freehand-draw', { prop: 'getSelPointColl', onPropertyChange: false,
|
|
23136
23159
|
value: { obj: selPointCollObj } });
|
|
23137
23160
|
prevObj.selPointColl = extend([], selPointCollObj['selPointColl'], [], true);
|
|
23138
|
-
|
|
23161
|
+
if (isObjPushed) {
|
|
23162
|
+
this.objColl.pop();
|
|
23163
|
+
}
|
|
23139
23164
|
if (this.textArea.style.display === 'block' || this.textArea.style.display === 'inline-block') {
|
|
23140
23165
|
this.notify('shape', { prop: 'updateFontRatio', onPropertyChange: false,
|
|
23141
23166
|
value: { obj: this.activeObj, isTextArea: true } });
|
|
@@ -23223,7 +23248,12 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23223
23248
|
*/
|
|
23224
23249
|
ImageEditor.prototype.updateFontColor = function (value) {
|
|
23225
23250
|
this.notify('selection', { prop: 'setInitialTextEdit', value: { bool: false } });
|
|
23251
|
+
var isObjPushed = false;
|
|
23252
|
+
var collLength = this.objColl.length;
|
|
23226
23253
|
this.notify('shape', { prop: 'pushActItemIntoObj' });
|
|
23254
|
+
if (collLength !== this.objColl.length) {
|
|
23255
|
+
isObjPushed = true;
|
|
23256
|
+
}
|
|
23227
23257
|
var prevCropObj = extend({}, this.cropObj, {}, true);
|
|
23228
23258
|
var objt = { shapeSettingsObj: {} };
|
|
23229
23259
|
this.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: objt } });
|
|
@@ -23238,7 +23268,9 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23238
23268
|
this.notify('freehand-draw', { prop: 'getSelPointColl', onPropertyChange: false,
|
|
23239
23269
|
value: { obj: selPointCollObj } });
|
|
23240
23270
|
prevObj.selPointColl = extend([], selPointCollObj['selPointColl'], [], true);
|
|
23241
|
-
|
|
23271
|
+
if (isObjPushed) {
|
|
23272
|
+
this.objColl.pop();
|
|
23273
|
+
}
|
|
23242
23274
|
if (this.textArea.style.display === 'none') {
|
|
23243
23275
|
this.activeObj.strokeSettings.strokeColor = value;
|
|
23244
23276
|
this.notify('shape', { prop: 'setStrokeSettings', value: { strokeSettings: null,
|
|
@@ -23415,7 +23447,12 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23415
23447
|
var obj = { shapeSettingsObj: {} };
|
|
23416
23448
|
this.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: obj } });
|
|
23417
23449
|
var shapeSettings = obj['shapeSettingsObj'];
|
|
23450
|
+
var isObjPushed = false;
|
|
23451
|
+
var collLength = this.objColl.length;
|
|
23418
23452
|
this.notify('shape', { prop: 'pushActItemIntoObj' });
|
|
23453
|
+
if (collLength !== this.objColl.length) {
|
|
23454
|
+
isObjPushed = true;
|
|
23455
|
+
}
|
|
23419
23456
|
var prevCropObj = extend({}, this.cropObj, {}, true);
|
|
23420
23457
|
var object = { currObj: {} };
|
|
23421
23458
|
this.notify('filter', { prop: 'getCurrentObj', onPropertyChange: false, value: { object: object } });
|
|
@@ -23427,7 +23464,9 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23427
23464
|
this.notify('freehand-draw', { prop: 'getSelPointColl', onPropertyChange: false,
|
|
23428
23465
|
value: { obj: selPointCollObj } });
|
|
23429
23466
|
prevObj.selPointColl = extend([], selPointCollObj['selPointColl'], [], true);
|
|
23430
|
-
|
|
23467
|
+
if (isObjPushed) {
|
|
23468
|
+
this.objColl.pop();
|
|
23469
|
+
}
|
|
23431
23470
|
this.activeObj.strokeSettings.strokeWidth = parseInt(id, 10);
|
|
23432
23471
|
if (this.activeObj.shape === 'rectangle' || this.activeObj.shape === 'ellipse') {
|
|
23433
23472
|
this.activeObj.strokeSettings.strokeWidth = parseInt(id, 10) - 1;
|
|
@@ -23469,7 +23508,12 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23469
23508
|
var shapeSettings = objt['shapeSettingsObj'];
|
|
23470
23509
|
if (this.activeObj.shape && (this.activeObj.shape !== 'path' || (this.activeObj.shape === 'path' &&
|
|
23471
23510
|
this.activeObj.pointColl.length > 0))) {
|
|
23511
|
+
var isObjPushed = false;
|
|
23512
|
+
var collLength = this.objColl.length;
|
|
23472
23513
|
this.notify('shape', { prop: 'pushActItemIntoObj' });
|
|
23514
|
+
if (collLength !== this.objColl.length) {
|
|
23515
|
+
isObjPushed = true;
|
|
23516
|
+
}
|
|
23473
23517
|
var prevCropObj = extend({}, this.cropObj, {}, true);
|
|
23474
23518
|
var object = { currObj: {} };
|
|
23475
23519
|
this.notify('filter', { prop: 'getCurrentObj', onPropertyChange: false, value: { object: object } });
|
|
@@ -23481,7 +23525,9 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23481
23525
|
this.notify('freehand-draw', { prop: 'getSelPointColl', onPropertyChange: false,
|
|
23482
23526
|
value: { obj: selPointCollObj } });
|
|
23483
23527
|
prevObj.selPointColl = extend([], selPointCollObj['selPointColl'], [], true);
|
|
23484
|
-
|
|
23528
|
+
if (isObjPushed) {
|
|
23529
|
+
this.objColl.pop();
|
|
23530
|
+
}
|
|
23485
23531
|
this.activeObj.strokeSettings.strokeColor = value;
|
|
23486
23532
|
this.notify('shape', { prop: 'setStrokeSettings', value: { strokeSettings: null, strokeColor: this.activeObj.strokeSettings.strokeColor, fillColor: null, strokeWidth: null } });
|
|
23487
23533
|
if (!this.togglePen) {
|
|
@@ -23516,7 +23562,12 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23516
23562
|
var obj = { shapeSettingsObj: {} };
|
|
23517
23563
|
this.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: obj } });
|
|
23518
23564
|
var shapeSettings = obj['shapeSettingsObj'];
|
|
23565
|
+
var isObjPushed = false;
|
|
23566
|
+
var collLength = this.objColl.length;
|
|
23519
23567
|
this.notify('shape', { prop: 'pushActItemIntoObj' });
|
|
23568
|
+
if (collLength !== this.objColl.length) {
|
|
23569
|
+
isObjPushed = true;
|
|
23570
|
+
}
|
|
23520
23571
|
var prevCropObj = extend({}, this.cropObj, {}, true);
|
|
23521
23572
|
var object = { currObj: {} };
|
|
23522
23573
|
this.notify('filter', { prop: 'getCurrentObj', onPropertyChange: false, value: { object: object } });
|
|
@@ -23528,7 +23579,9 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23528
23579
|
this.notify('freehand-draw', { prop: 'getSelPointColl', onPropertyChange: false,
|
|
23529
23580
|
value: { obj: selPointCollObj } });
|
|
23530
23581
|
prevObj.selPointColl = extend([], selPointCollObj['selPointColl'], [], true);
|
|
23531
|
-
|
|
23582
|
+
if (isObjPushed) {
|
|
23583
|
+
this.objColl.pop();
|
|
23584
|
+
}
|
|
23532
23585
|
this.activeObj.strokeSettings.fillColor = value;
|
|
23533
23586
|
this.notify('shape', { prop: 'setStrokeSettings',
|
|
23534
23587
|
value: { strokeSettings: null, strokeColor: null, fillColor: this.activeObj.strokeSettings.fillColor,
|
|
@@ -27328,6 +27381,15 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
27328
27381
|
args.toolbarItems = ['fillColor', 'strokeColor', 'strokeWidth', 'z-order', 'duplicate', 'remove'];
|
|
27329
27382
|
}
|
|
27330
27383
|
this.initShapesToolbarItem(args.toolbarItems);
|
|
27384
|
+
if (parent.activeObj.shape === 'image') {
|
|
27385
|
+
var actObj = extend({}, parent.activeObj, {}, true);
|
|
27386
|
+
parent.notify('shape', { prop: 'refreshActiveObj', onPropertyChange: false });
|
|
27387
|
+
parent.notify('draw', { prop: 'render-image', value: { isMouseWheel: null, isPreventClearRect: null, isFrame: true } });
|
|
27388
|
+
parent.activeObj = actObj;
|
|
27389
|
+
parent.notify('draw', { prop: 'drawObject', onPropertyChange: false, value: { canvas: 'duplicate', obj: parent.activeObj,
|
|
27390
|
+
isCropRatio: null, points: null, isPreventDrag: true } });
|
|
27391
|
+
this.renderQAT(false);
|
|
27392
|
+
}
|
|
27331
27393
|
break;
|
|
27332
27394
|
case 'text':
|
|
27333
27395
|
if (Browser.isDevice) {
|
|
@@ -27411,14 +27473,14 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
27411
27473
|
parent.notify('draw', { prop: 'render-image', value: { isMouseWheel: null, isPreventClearRect: null, isFrame: true } });
|
|
27412
27474
|
break;
|
|
27413
27475
|
}
|
|
27414
|
-
this.currToolbar = type;
|
|
27415
27476
|
this.refreshDropDownBtn(isCropping);
|
|
27416
|
-
this.updateKBDNavigation(
|
|
27477
|
+
this.updateKBDNavigation(type);
|
|
27478
|
+
this.currToolbar = type;
|
|
27417
27479
|
};
|
|
27418
27480
|
ToolbarModule.prototype.updateKBDNavigation = function (type) {
|
|
27419
27481
|
var parent = this.parent;
|
|
27420
27482
|
var id = parent.element.id;
|
|
27421
|
-
if (!parent.isKBDNavigation) {
|
|
27483
|
+
if (!parent.isKBDNavigation || this.currToolbar === type) {
|
|
27422
27484
|
return;
|
|
27423
27485
|
}
|
|
27424
27486
|
if (this.isToolbar()) {
|
|
@@ -29910,8 +29972,10 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
29910
29972
|
}
|
|
29911
29973
|
parent.notify('selection', { prop: 'setSliderActive', onPropertyChange: false, value: { bool: false } });
|
|
29912
29974
|
if (type === 'transparency') {
|
|
29913
|
-
|
|
29914
|
-
|
|
29975
|
+
setTimeout(function () {
|
|
29976
|
+
parent.notify('undo-redo', { prop: 'updateUndoRedoStack', onPropertyChange: false });
|
|
29977
|
+
parent.element.querySelector('#' + parent.element.id + '_transparency').click();
|
|
29978
|
+
}, 50);
|
|
29915
29979
|
}
|
|
29916
29980
|
}
|
|
29917
29981
|
});
|