@syncfusion/ej2-image-editor 24.1.44 → 24.1.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/dist/ej2-image-editor.umd.min.js +2 -2
- package/dist/ej2-image-editor.umd.min.js.map +1 -1
- package/dist/es6/ej2-image-editor.es2015.js +52 -21
- package/dist/es6/ej2-image-editor.es2015.js.map +1 -1
- package/dist/es6/ej2-image-editor.es5.js +52 -21
- 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 +11 -11
- package/src/image-editor/action/draw.js +10 -2
- package/src/image-editor/action/selection.js +5 -3
- package/src/image-editor/action/shape.d.ts +1 -0
- package/src/image-editor/action/shape.js +17 -1
- package/src/image-editor/action/transform.js +1 -3
- package/src/image-editor/base/image-editor.js +1 -0
- package/src/image-editor/renderer/toolbar.js +18 -12
- package/styles/bootstrap-dark.css +21 -1
- package/styles/bootstrap.css +21 -1
- package/styles/bootstrap4.css +22 -2
- package/styles/bootstrap5-dark.css +21 -1
- package/styles/bootstrap5.css +21 -1
- package/styles/fabric-dark.css +21 -1
- package/styles/fabric.css +21 -1
- package/styles/fluent-dark.css +21 -1
- package/styles/fluent.css +21 -1
- package/styles/highcontrast-light.css +21 -1
- package/styles/highcontrast.css +21 -1
- package/styles/image-editor/_bootstrap-dark-definition.scss +2 -0
- package/styles/image-editor/_bootstrap-definition.scss +2 -0
- package/styles/image-editor/_bootstrap4-definition.scss +2 -0
- package/styles/image-editor/_bootstrap5-definition.scss +2 -0
- package/styles/image-editor/_fabric-dark-definition.scss +2 -0
- package/styles/image-editor/_fabric-definition.scss +2 -0
- package/styles/image-editor/_fluent-definition.scss +2 -0
- package/styles/image-editor/_highcontrast-definition.scss +2 -0
- package/styles/image-editor/_highcontrast-light-definition.scss +2 -0
- package/styles/image-editor/_layout.scss +29 -1
- package/styles/image-editor/_material-dark-definition.scss +3 -1
- package/styles/image-editor/_material-definition.scss +3 -1
- package/styles/image-editor/_material3-definition.scss +2 -0
- package/styles/image-editor/_tailwind-definition.scss +2 -0
- package/styles/image-editor/bootstrap-dark.css +21 -1
- package/styles/image-editor/bootstrap.css +21 -1
- package/styles/image-editor/bootstrap4.css +22 -2
- package/styles/image-editor/bootstrap5-dark.css +21 -1
- package/styles/image-editor/bootstrap5.css +21 -1
- package/styles/image-editor/fabric-dark.css +21 -1
- package/styles/image-editor/fabric.css +21 -1
- package/styles/image-editor/fluent-dark.css +21 -1
- package/styles/image-editor/fluent.css +21 -1
- package/styles/image-editor/highcontrast-light.css +21 -1
- package/styles/image-editor/highcontrast.css +21 -1
- package/styles/image-editor/material-dark.css +22 -2
- package/styles/image-editor/material.css +22 -2
- package/styles/image-editor/material3-dark.css +21 -1
- package/styles/image-editor/material3.css +21 -1
- package/styles/image-editor/tailwind-dark.css +21 -1
- package/styles/image-editor/tailwind.css +21 -1
- package/styles/material-dark.css +22 -2
- package/styles/material.css +22 -2
- package/styles/material3-dark.css +21 -1
- package/styles/material3.css +21 -1
- package/styles/tailwind-dark.css +21 -1
- package/styles/tailwind.css +21 -1
|
@@ -3634,11 +3634,19 @@ var Draw = /** @__PURE__ @class */ (function () {
|
|
|
3634
3634
|
if (!isBlazor()) {
|
|
3635
3635
|
parent.element.querySelector('.e-contextual-toolbar-wrapper').classList.add('e-hide');
|
|
3636
3636
|
parent.notify('toolbar', { prop: 'refresh-toolbar', onPropertyChange: false, value: eventargs });
|
|
3637
|
+
if (parent.activeObj.shape && parent.activeObj.shape === 'image') {
|
|
3638
|
+
parent.notify('toolbar', { prop: 'destroy-qa-toolbar', onPropertyChange: false });
|
|
3639
|
+
}
|
|
3637
3640
|
}
|
|
3638
3641
|
else {
|
|
3639
3642
|
parent.updateToolbar(parent.element, 'imageLoaded');
|
|
3643
|
+
if (parent.activeObj.shape && parent.activeObj.shape === 'image') {
|
|
3644
|
+
parent.updateToolbar(parent.element, 'destroyQuickAccessToolbar');
|
|
3645
|
+
}
|
|
3640
3646
|
}
|
|
3641
3647
|
parent.notify('undo-redo', { prop: 'updateCurrUrc', value: { type: 'cancel' } });
|
|
3648
|
+
parent.notify('shape', { prop: 'refreshActiveObj', onPropertyChange: false });
|
|
3649
|
+
this.upperContext.clearRect(0, 0, parent.upperCanvas.width, parent.upperCanvas.height);
|
|
3642
3650
|
}
|
|
3643
3651
|
else {
|
|
3644
3652
|
if (isContextualToolbar && (!Browser.isDevice || (Browser.isDevice && !straightenObj['bool']))) {
|
|
@@ -5047,9 +5055,9 @@ var Draw = /** @__PURE__ @class */ (function () {
|
|
|
5047
5055
|
}
|
|
5048
5056
|
}
|
|
5049
5057
|
}
|
|
5050
|
-
var panX = (parent.lowerCanvas.clientWidth / 2) -
|
|
5058
|
+
var panX = (parent.lowerCanvas.clientWidth / 2) - (currObj.activePoint.startX +
|
|
5051
5059
|
(currObj.activePoint.width / 2));
|
|
5052
|
-
var panY = (parent.lowerCanvas.clientHeight / 2) -
|
|
5060
|
+
var panY = ((parent.lowerCanvas.clientHeight + 1) / 2) - (currObj.activePoint.startY +
|
|
5053
5061
|
(currObj.activePoint.height / 2));
|
|
5054
5062
|
if (isNullOrUndefined(parent.activeObj.shape)) {
|
|
5055
5063
|
parent.activeObj = extend({}, activeObj, {}, true);
|
|
@@ -12429,8 +12437,8 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
12429
12437
|
actPoint.height = height;
|
|
12430
12438
|
actPoint.startX = (this.dragPoint.startX = (originalWidth - width) / 2) + arcRadius;
|
|
12431
12439
|
actPoint.startY = (this.dragPoint.startY = (originalHeight - height) / 2) + arcRadius;
|
|
12432
|
-
actPoint.endX =
|
|
12433
|
-
actPoint.endY =
|
|
12440
|
+
actPoint.endX = actPoint.startX + actPoint.width;
|
|
12441
|
+
actPoint.endY = actPoint.startY + actPoint.height;
|
|
12434
12442
|
if (actPoint.startX < destLeft && destLeft + destWidth > parent.lowerCanvas.clientWidth) {
|
|
12435
12443
|
actPoint.startX = destLeft;
|
|
12436
12444
|
actPoint.endX = actPoint.startX + width - arcRadius;
|
|
@@ -12915,7 +12923,9 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
12915
12923
|
}
|
|
12916
12924
|
if (!isInside) {
|
|
12917
12925
|
if (isNullOrUndefined(parent.activeObj.currIndex)) {
|
|
12918
|
-
|
|
12926
|
+
var shapeIDObj = { id: 'shape_' + (parent.objColl.length + 1) };
|
|
12927
|
+
parent.notify('shape', { prop: 'getNewShapeId', onPropertyChange: false, value: { obj: shapeIDObj } });
|
|
12928
|
+
parent.activeObj.currIndex = shapeIDObj['id'];
|
|
12919
12929
|
}
|
|
12920
12930
|
parent.notify('shape', { prop: 'updImgRatioForActObj', onPropertyChange: false });
|
|
12921
12931
|
if (parent.activeObj.horTopLine !== undefined && parent.activeObj.horTopLine.startX !== 0 && parent.activeObj.horTopLine.endX
|
|
@@ -13539,6 +13549,9 @@ var Shape = /** @__PURE__ @class */ (function () {
|
|
|
13539
13549
|
case 'setFlipState':
|
|
13540
13550
|
this.setFlipState(args.value['x'], args.value['y'], args.value['obj'], args.value['object']);
|
|
13541
13551
|
break;
|
|
13552
|
+
case 'getNewShapeId':
|
|
13553
|
+
args.value['obj']['id'] = this.getNewShapeId();
|
|
13554
|
+
break;
|
|
13542
13555
|
}
|
|
13543
13556
|
};
|
|
13544
13557
|
Shape.prototype.getModuleName = function () {
|
|
@@ -13929,6 +13942,7 @@ var Shape = /** @__PURE__ @class */ (function () {
|
|
|
13929
13942
|
parent.notify('selection', { prop: 'isShapeInserted', onPropertyChange: false, value: { bool: true } });
|
|
13930
13943
|
if (isBlazor()) {
|
|
13931
13944
|
parent.updateToolbar(parent.element, 'text');
|
|
13945
|
+
parent.getFontSizes();
|
|
13932
13946
|
}
|
|
13933
13947
|
else {
|
|
13934
13948
|
parent.notify('toolbar', { prop: 'refresh-toolbar', onPropertyChange: false, value: { type: 'text',
|
|
@@ -15998,7 +16012,7 @@ var Shape = /** @__PURE__ @class */ (function () {
|
|
|
15998
16012
|
}
|
|
15999
16013
|
if (!isActObj) {
|
|
16000
16014
|
if (isNullOrUndefined(parent.activeObj.currIndex)) {
|
|
16001
|
-
parent.activeObj.currIndex =
|
|
16015
|
+
parent.activeObj.currIndex = this.getNewShapeId();
|
|
16002
16016
|
}
|
|
16003
16017
|
this.updImgRatioForActObj();
|
|
16004
16018
|
var splitWords_1 = parent.activeObj.currIndex.split('_');
|
|
@@ -16034,6 +16048,17 @@ var Shape = /** @__PURE__ @class */ (function () {
|
|
|
16034
16048
|
}
|
|
16035
16049
|
}
|
|
16036
16050
|
};
|
|
16051
|
+
Shape.prototype.getNewShapeId = function () {
|
|
16052
|
+
var parent = this.parent;
|
|
16053
|
+
var value = parent.objColl.length + 1;
|
|
16054
|
+
for (var i = 0; i < parent.objColl.length; i++) {
|
|
16055
|
+
if (parent.objColl[i].currIndex === 'shape_' + value) {
|
|
16056
|
+
value++;
|
|
16057
|
+
i = -1;
|
|
16058
|
+
}
|
|
16059
|
+
}
|
|
16060
|
+
return 'shape_' + value;
|
|
16061
|
+
};
|
|
16037
16062
|
Shape.prototype.alignTextAreaIntoCanvas = function () {
|
|
16038
16063
|
var parent = this.parent;
|
|
16039
16064
|
var letters = parent.textArea.value;
|
|
@@ -16144,6 +16169,7 @@ var Shape = /** @__PURE__ @class */ (function () {
|
|
|
16144
16169
|
case 'text':
|
|
16145
16170
|
shapeDetails.text = obj.keyHistory;
|
|
16146
16171
|
shapeDetails.fontSize = obj.textSettings.fontSize;
|
|
16172
|
+
shapeDetails.fontFamily = obj.textSettings.fontFamily;
|
|
16147
16173
|
shapeDetails.color = obj.strokeSettings.strokeColor;
|
|
16148
16174
|
shapeDetails.fontStyle = [];
|
|
16149
16175
|
if (obj.textSettings.bold) {
|
|
@@ -19090,9 +19116,7 @@ var Transform = /** @__PURE__ @class */ (function () {
|
|
|
19090
19116
|
parent.notify('toolbar', { prop: 'performCropTransformClick', value: { shape: null } });
|
|
19091
19117
|
}
|
|
19092
19118
|
parent.setStraighten(degree, true);
|
|
19093
|
-
|
|
19094
|
-
parent.okBtn();
|
|
19095
|
-
}
|
|
19119
|
+
parent.okBtn();
|
|
19096
19120
|
};
|
|
19097
19121
|
return Transform;
|
|
19098
19122
|
}());
|
|
@@ -21332,6 +21356,7 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
21332
21356
|
*
|
|
21333
21357
|
*/
|
|
21334
21358
|
ImageEditor.prototype.zoom = function (zoomFactor, zoomPoint) {
|
|
21359
|
+
this.isZoomBtnClick = true;
|
|
21335
21360
|
this.notify('transform', { prop: 'zoom', onPropertyChange: false,
|
|
21336
21361
|
value: { zoomFactor: zoomFactor, zoomPoint: zoomPoint } });
|
|
21337
21362
|
this.notify('draw', { prop: 'redrawDownScale' });
|
|
@@ -24376,7 +24401,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
24376
24401
|
this.createLeftToolbarControls();
|
|
24377
24402
|
var mToolbar = document.getElementById(id + '_toolbar');
|
|
24378
24403
|
if (toolbar_1) {
|
|
24379
|
-
this.toolbarHeight = mToolbar.
|
|
24404
|
+
this.toolbarHeight = mToolbar.clientHeight;
|
|
24380
24405
|
}
|
|
24381
24406
|
}
|
|
24382
24407
|
else {
|
|
@@ -24679,10 +24704,10 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
24679
24704
|
}
|
|
24680
24705
|
if (!isBlazor()) {
|
|
24681
24706
|
if (parent.toolbarTemplate) {
|
|
24682
|
-
this.toolbarHeight = parent.element.querySelector('#' + parent.element.id + '_toolbarArea').
|
|
24707
|
+
this.toolbarHeight = parent.element.querySelector('#' + parent.element.id + '_toolbarArea').clientHeight;
|
|
24683
24708
|
}
|
|
24684
24709
|
else if (parent.element.querySelector('#' + parent.element.id + '_toolbar')) {
|
|
24685
|
-
this.toolbarHeight = parent.element.querySelector('#' + parent.element.id + '_toolbar').
|
|
24710
|
+
this.toolbarHeight = parent.element.querySelector('#' + parent.element.id + '_toolbar').clientHeight;
|
|
24686
24711
|
}
|
|
24687
24712
|
parent.toolbarHeight = this.toolbarHeight;
|
|
24688
24713
|
}
|
|
@@ -24693,7 +24718,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
24693
24718
|
cHt = cusWrapper.offsetHeight + 2;
|
|
24694
24719
|
}
|
|
24695
24720
|
var ht = parent.element.querySelector('#' + id + '_canvasWrapper').offsetHeight;
|
|
24696
|
-
contextualToolbarArea.style.top = this.toolbarHeight + ht - cHt + 'px';
|
|
24721
|
+
contextualToolbarArea.style.top = this.toolbarHeight + 1 + ht - cHt + 'px';
|
|
24697
24722
|
if (cType === 'straighten') {
|
|
24698
24723
|
parent.isStraightening = true;
|
|
24699
24724
|
var ctxToolbar = parent.element.querySelector('#' + id + '_contextualToolbarArea');
|
|
@@ -24710,7 +24735,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
24710
24735
|
}
|
|
24711
24736
|
}
|
|
24712
24737
|
else {
|
|
24713
|
-
contextualToolbarArea.style.top = this.toolbarHeight + 'px';
|
|
24738
|
+
contextualToolbarArea.style.top = this.toolbarHeight + 1 + 'px';
|
|
24714
24739
|
}
|
|
24715
24740
|
};
|
|
24716
24741
|
ToolbarModule.prototype.processToolbar = function (position) {
|
|
@@ -25534,8 +25559,8 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
25534
25559
|
}
|
|
25535
25560
|
var slider = parent.element.querySelector('#' + id + '_straightenSlider');
|
|
25536
25561
|
if ((isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Straightening') > -1))
|
|
25537
|
-
&& slider && slider.parentElement.
|
|
25538
|
-
this.toolbarHeight = parent.toolbarHeight = slider.parentElement.
|
|
25562
|
+
&& slider && slider.parentElement.clientHeight > this.toolbarHeight) {
|
|
25563
|
+
this.toolbarHeight = parent.toolbarHeight = slider.parentElement.clientHeight;
|
|
25539
25564
|
}
|
|
25540
25565
|
this.enableDisableTbrBtn();
|
|
25541
25566
|
parent.notify('transform', { prop: 'disableZoomOutBtn', value: { isZoomOut: true } });
|
|
@@ -28431,20 +28456,23 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
28431
28456
|
if (type === 'transparency') {
|
|
28432
28457
|
labelWrapper = hdrWrapper.appendChild(parent.createElement('label', {
|
|
28433
28458
|
id: id + '_labelWrapper',
|
|
28434
|
-
|
|
28435
|
-
|
|
28459
|
+
className: 'e-ie-finetune-slider-label',
|
|
28460
|
+
styles: Browser.isDevice ? 'position: absolute; top: 31%; left: calc(50% - 150px); font-size: 15px; text-transform: capitalize; font-weight: 400;'
|
|
28461
|
+
: 'position: absolute; top: 31%; left: calc(50% - 220px); font-size: 15px; text-transform: capitalize; font-weight: 400;'
|
|
28436
28462
|
}));
|
|
28437
28463
|
}
|
|
28438
28464
|
else {
|
|
28439
28465
|
labelWrapper = hdrWrapper.appendChild(parent.createElement('label', {
|
|
28440
28466
|
id: id + '_labelWrapper',
|
|
28441
|
-
|
|
28467
|
+
className: 'e-ie-finetune-slider-label',
|
|
28468
|
+
styles: Browser.isDevice ? ('position: absolute; top: 31%; left: calc(50% - 160px); font-size: 15px; text-transform: capitalize; font-weight: 400;')
|
|
28442
28469
|
: 'position: absolute; top: 25%; left: calc(50% - 226px); font-size: 15px; text-transform: capitalize; font-weight: 400;'
|
|
28443
28470
|
}));
|
|
28444
28471
|
}
|
|
28445
28472
|
labelWrapper.textContent = this.l10n.getConstant(parent.toPascalCase(type === 'transparency' ? 'opacity' : type));
|
|
28446
28473
|
var sliderWrapper = hdrWrapper.appendChild(parent.createElement('div', {
|
|
28447
28474
|
id: id + '_sliderWrapper',
|
|
28475
|
+
className: 'e-ie-finetune-slider-wrap',
|
|
28448
28476
|
styles: 'position: absolute'
|
|
28449
28477
|
}));
|
|
28450
28478
|
var value = parent.getCurrAdjustmentValue(type);
|
|
@@ -28523,8 +28551,8 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
28523
28551
|
if (type === 'straighten' && Browser.isDevice) {
|
|
28524
28552
|
var sLabelWrapper = hdrWrapper.appendChild(parent.createElement('label', {
|
|
28525
28553
|
id: id + '_sLabelWrapper',
|
|
28526
|
-
className: 'e-ie-straighten-value-span',
|
|
28527
|
-
styles: 'position: absolute; top:
|
|
28554
|
+
className: 'e-ie-straighten-value-span e-ie-finetune-value-span',
|
|
28555
|
+
styles: 'position: absolute; top: 31%; margin-left: 20px; font-size: 15px; text-transform: capitalize; font-weight: 400;'
|
|
28528
28556
|
}));
|
|
28529
28557
|
sLabelWrapper.innerHTML = parent.transform.straighten.toString() + '°';
|
|
28530
28558
|
sliderWrapper.parentElement.classList.add('e-straighten-slider');
|
|
@@ -28537,6 +28565,9 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
28537
28565
|
'position: absolute; top: 25%; left: calc(50% + 190px); font-size: 15px; text-transform: capitalize; font-weight: 400;'
|
|
28538
28566
|
}));
|
|
28539
28567
|
sliderWrapper.parentElement.classList.add('e-finetune-slider');
|
|
28568
|
+
if (type === 'transparency' && Browser.isDevice) {
|
|
28569
|
+
sliderWrapper.parentElement.classList.add('e-ie-device-transparency-slider');
|
|
28570
|
+
}
|
|
28540
28571
|
this.updateFinetuneSpan(type);
|
|
28541
28572
|
}
|
|
28542
28573
|
};
|