@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
|
@@ -3630,11 +3630,19 @@ class Draw {
|
|
|
3630
3630
|
if (!isBlazor()) {
|
|
3631
3631
|
parent.element.querySelector('.e-contextual-toolbar-wrapper').classList.add('e-hide');
|
|
3632
3632
|
parent.notify('toolbar', { prop: 'refresh-toolbar', onPropertyChange: false, value: eventargs });
|
|
3633
|
+
if (parent.activeObj.shape && parent.activeObj.shape === 'image') {
|
|
3634
|
+
parent.notify('toolbar', { prop: 'destroy-qa-toolbar', onPropertyChange: false });
|
|
3635
|
+
}
|
|
3633
3636
|
}
|
|
3634
3637
|
else {
|
|
3635
3638
|
parent.updateToolbar(parent.element, 'imageLoaded');
|
|
3639
|
+
if (parent.activeObj.shape && parent.activeObj.shape === 'image') {
|
|
3640
|
+
parent.updateToolbar(parent.element, 'destroyQuickAccessToolbar');
|
|
3641
|
+
}
|
|
3636
3642
|
}
|
|
3637
3643
|
parent.notify('undo-redo', { prop: 'updateCurrUrc', value: { type: 'cancel' } });
|
|
3644
|
+
parent.notify('shape', { prop: 'refreshActiveObj', onPropertyChange: false });
|
|
3645
|
+
this.upperContext.clearRect(0, 0, parent.upperCanvas.width, parent.upperCanvas.height);
|
|
3638
3646
|
}
|
|
3639
3647
|
else {
|
|
3640
3648
|
if (isContextualToolbar && (!Browser.isDevice || (Browser.isDevice && !straightenObj['bool']))) {
|
|
@@ -5042,9 +5050,9 @@ class Draw {
|
|
|
5042
5050
|
}
|
|
5043
5051
|
}
|
|
5044
5052
|
}
|
|
5045
|
-
const panX = (parent.lowerCanvas.clientWidth / 2) -
|
|
5053
|
+
const panX = (parent.lowerCanvas.clientWidth / 2) - (currObj.activePoint.startX +
|
|
5046
5054
|
(currObj.activePoint.width / 2));
|
|
5047
|
-
const panY = (parent.lowerCanvas.clientHeight / 2) -
|
|
5055
|
+
const panY = ((parent.lowerCanvas.clientHeight + 1) / 2) - (currObj.activePoint.startY +
|
|
5048
5056
|
(currObj.activePoint.height / 2));
|
|
5049
5057
|
if (isNullOrUndefined(parent.activeObj.shape)) {
|
|
5050
5058
|
parent.activeObj = extend({}, activeObj, {}, true);
|
|
@@ -12406,8 +12414,8 @@ class Selection {
|
|
|
12406
12414
|
actPoint.height = height;
|
|
12407
12415
|
actPoint.startX = (this.dragPoint.startX = (originalWidth - width) / 2) + arcRadius;
|
|
12408
12416
|
actPoint.startY = (this.dragPoint.startY = (originalHeight - height) / 2) + arcRadius;
|
|
12409
|
-
actPoint.endX =
|
|
12410
|
-
actPoint.endY =
|
|
12417
|
+
actPoint.endX = actPoint.startX + actPoint.width;
|
|
12418
|
+
actPoint.endY = actPoint.startY + actPoint.height;
|
|
12411
12419
|
if (actPoint.startX < destLeft && destLeft + destWidth > parent.lowerCanvas.clientWidth) {
|
|
12412
12420
|
actPoint.startX = destLeft;
|
|
12413
12421
|
actPoint.endX = actPoint.startX + width - arcRadius;
|
|
@@ -12891,7 +12899,9 @@ class Selection {
|
|
|
12891
12899
|
}
|
|
12892
12900
|
if (!isInside) {
|
|
12893
12901
|
if (isNullOrUndefined(parent.activeObj.currIndex)) {
|
|
12894
|
-
|
|
12902
|
+
const shapeIDObj = { id: 'shape_' + (parent.objColl.length + 1) };
|
|
12903
|
+
parent.notify('shape', { prop: 'getNewShapeId', onPropertyChange: false, value: { obj: shapeIDObj } });
|
|
12904
|
+
parent.activeObj.currIndex = shapeIDObj['id'];
|
|
12895
12905
|
}
|
|
12896
12906
|
parent.notify('shape', { prop: 'updImgRatioForActObj', onPropertyChange: false });
|
|
12897
12907
|
if (parent.activeObj.horTopLine !== undefined && parent.activeObj.horTopLine.startX !== 0 && parent.activeObj.horTopLine.endX
|
|
@@ -13514,6 +13524,9 @@ class Shape {
|
|
|
13514
13524
|
case 'setFlipState':
|
|
13515
13525
|
this.setFlipState(args.value['x'], args.value['y'], args.value['obj'], args.value['object']);
|
|
13516
13526
|
break;
|
|
13527
|
+
case 'getNewShapeId':
|
|
13528
|
+
args.value['obj']['id'] = this.getNewShapeId();
|
|
13529
|
+
break;
|
|
13517
13530
|
}
|
|
13518
13531
|
}
|
|
13519
13532
|
getModuleName() {
|
|
@@ -13902,6 +13915,7 @@ class Shape {
|
|
|
13902
13915
|
parent.notify('selection', { prop: 'isShapeInserted', onPropertyChange: false, value: { bool: true } });
|
|
13903
13916
|
if (isBlazor()) {
|
|
13904
13917
|
parent.updateToolbar(parent.element, 'text');
|
|
13918
|
+
parent.getFontSizes();
|
|
13905
13919
|
}
|
|
13906
13920
|
else {
|
|
13907
13921
|
parent.notify('toolbar', { prop: 'refresh-toolbar', onPropertyChange: false, value: { type: 'text',
|
|
@@ -15968,7 +15982,7 @@ class Shape {
|
|
|
15968
15982
|
}
|
|
15969
15983
|
if (!isActObj) {
|
|
15970
15984
|
if (isNullOrUndefined(parent.activeObj.currIndex)) {
|
|
15971
|
-
parent.activeObj.currIndex =
|
|
15985
|
+
parent.activeObj.currIndex = this.getNewShapeId();
|
|
15972
15986
|
}
|
|
15973
15987
|
this.updImgRatioForActObj();
|
|
15974
15988
|
const splitWords = parent.activeObj.currIndex.split('_');
|
|
@@ -16004,6 +16018,17 @@ class Shape {
|
|
|
16004
16018
|
}
|
|
16005
16019
|
}
|
|
16006
16020
|
}
|
|
16021
|
+
getNewShapeId() {
|
|
16022
|
+
const parent = this.parent;
|
|
16023
|
+
let value = parent.objColl.length + 1;
|
|
16024
|
+
for (let i = 0; i < parent.objColl.length; i++) {
|
|
16025
|
+
if (parent.objColl[i].currIndex === 'shape_' + value) {
|
|
16026
|
+
value++;
|
|
16027
|
+
i = -1;
|
|
16028
|
+
}
|
|
16029
|
+
}
|
|
16030
|
+
return 'shape_' + value;
|
|
16031
|
+
}
|
|
16007
16032
|
alignTextAreaIntoCanvas() {
|
|
16008
16033
|
const parent = this.parent;
|
|
16009
16034
|
const letters = parent.textArea.value;
|
|
@@ -16114,6 +16139,7 @@ class Shape {
|
|
|
16114
16139
|
case 'text':
|
|
16115
16140
|
shapeDetails.text = obj.keyHistory;
|
|
16116
16141
|
shapeDetails.fontSize = obj.textSettings.fontSize;
|
|
16142
|
+
shapeDetails.fontFamily = obj.textSettings.fontFamily;
|
|
16117
16143
|
shapeDetails.color = obj.strokeSettings.strokeColor;
|
|
16118
16144
|
shapeDetails.fontStyle = [];
|
|
16119
16145
|
if (obj.textSettings.bold) {
|
|
@@ -19053,9 +19079,7 @@ class Transform {
|
|
|
19053
19079
|
parent.notify('toolbar', { prop: 'performCropTransformClick', value: { shape: null } });
|
|
19054
19080
|
}
|
|
19055
19081
|
parent.setStraighten(degree, true);
|
|
19056
|
-
|
|
19057
|
-
parent.okBtn();
|
|
19058
|
-
}
|
|
19082
|
+
parent.okBtn();
|
|
19059
19083
|
}
|
|
19060
19084
|
}
|
|
19061
19085
|
|
|
@@ -21255,6 +21279,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
21255
21279
|
*
|
|
21256
21280
|
*/
|
|
21257
21281
|
zoom(zoomFactor, zoomPoint) {
|
|
21282
|
+
this.isZoomBtnClick = true;
|
|
21258
21283
|
this.notify('transform', { prop: 'zoom', onPropertyChange: false,
|
|
21259
21284
|
value: { zoomFactor: zoomFactor, zoomPoint: zoomPoint } });
|
|
21260
21285
|
this.notify('draw', { prop: 'redrawDownScale' });
|
|
@@ -24295,7 +24320,7 @@ class ToolbarModule {
|
|
|
24295
24320
|
this.createLeftToolbarControls();
|
|
24296
24321
|
const mToolbar = document.getElementById(id + '_toolbar');
|
|
24297
24322
|
if (toolbar) {
|
|
24298
|
-
this.toolbarHeight = mToolbar.
|
|
24323
|
+
this.toolbarHeight = mToolbar.clientHeight;
|
|
24299
24324
|
}
|
|
24300
24325
|
}
|
|
24301
24326
|
else {
|
|
@@ -24596,10 +24621,10 @@ class ToolbarModule {
|
|
|
24596
24621
|
}
|
|
24597
24622
|
if (!isBlazor()) {
|
|
24598
24623
|
if (parent.toolbarTemplate) {
|
|
24599
|
-
this.toolbarHeight = parent.element.querySelector('#' + parent.element.id + '_toolbarArea').
|
|
24624
|
+
this.toolbarHeight = parent.element.querySelector('#' + parent.element.id + '_toolbarArea').clientHeight;
|
|
24600
24625
|
}
|
|
24601
24626
|
else if (parent.element.querySelector('#' + parent.element.id + '_toolbar')) {
|
|
24602
|
-
this.toolbarHeight = parent.element.querySelector('#' + parent.element.id + '_toolbar').
|
|
24627
|
+
this.toolbarHeight = parent.element.querySelector('#' + parent.element.id + '_toolbar').clientHeight;
|
|
24603
24628
|
}
|
|
24604
24629
|
parent.toolbarHeight = this.toolbarHeight;
|
|
24605
24630
|
}
|
|
@@ -24610,7 +24635,7 @@ class ToolbarModule {
|
|
|
24610
24635
|
cHt = cusWrapper.offsetHeight + 2;
|
|
24611
24636
|
}
|
|
24612
24637
|
const ht = parent.element.querySelector('#' + id + '_canvasWrapper').offsetHeight;
|
|
24613
|
-
contextualToolbarArea.style.top = this.toolbarHeight + ht - cHt + 'px';
|
|
24638
|
+
contextualToolbarArea.style.top = this.toolbarHeight + 1 + ht - cHt + 'px';
|
|
24614
24639
|
if (cType === 'straighten') {
|
|
24615
24640
|
parent.isStraightening = true;
|
|
24616
24641
|
const ctxToolbar = parent.element.querySelector('#' + id + '_contextualToolbarArea');
|
|
@@ -24627,7 +24652,7 @@ class ToolbarModule {
|
|
|
24627
24652
|
}
|
|
24628
24653
|
}
|
|
24629
24654
|
else {
|
|
24630
|
-
contextualToolbarArea.style.top = this.toolbarHeight + 'px';
|
|
24655
|
+
contextualToolbarArea.style.top = this.toolbarHeight + 1 + 'px';
|
|
24631
24656
|
}
|
|
24632
24657
|
}
|
|
24633
24658
|
processToolbar(position) {
|
|
@@ -25447,8 +25472,8 @@ class ToolbarModule {
|
|
|
25447
25472
|
}
|
|
25448
25473
|
const slider = parent.element.querySelector('#' + id + '_straightenSlider');
|
|
25449
25474
|
if ((isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('Straightening') > -1))
|
|
25450
|
-
&& slider && slider.parentElement.
|
|
25451
|
-
this.toolbarHeight = parent.toolbarHeight = slider.parentElement.
|
|
25475
|
+
&& slider && slider.parentElement.clientHeight > this.toolbarHeight) {
|
|
25476
|
+
this.toolbarHeight = parent.toolbarHeight = slider.parentElement.clientHeight;
|
|
25452
25477
|
}
|
|
25453
25478
|
this.enableDisableTbrBtn();
|
|
25454
25479
|
parent.notify('transform', { prop: 'disableZoomOutBtn', value: { isZoomOut: true } });
|
|
@@ -28335,20 +28360,23 @@ class ToolbarModule {
|
|
|
28335
28360
|
if (type === 'transparency') {
|
|
28336
28361
|
labelWrapper = hdrWrapper.appendChild(parent.createElement('label', {
|
|
28337
28362
|
id: id + '_labelWrapper',
|
|
28338
|
-
|
|
28339
|
-
|
|
28363
|
+
className: 'e-ie-finetune-slider-label',
|
|
28364
|
+
styles: Browser.isDevice ? 'position: absolute; top: 31%; left: calc(50% - 150px); font-size: 15px; text-transform: capitalize; font-weight: 400;'
|
|
28365
|
+
: 'position: absolute; top: 31%; left: calc(50% - 220px); font-size: 15px; text-transform: capitalize; font-weight: 400;'
|
|
28340
28366
|
}));
|
|
28341
28367
|
}
|
|
28342
28368
|
else {
|
|
28343
28369
|
labelWrapper = hdrWrapper.appendChild(parent.createElement('label', {
|
|
28344
28370
|
id: id + '_labelWrapper',
|
|
28345
|
-
|
|
28371
|
+
className: 'e-ie-finetune-slider-label',
|
|
28372
|
+
styles: Browser.isDevice ? ('position: absolute; top: 31%; left: calc(50% - 160px); font-size: 15px; text-transform: capitalize; font-weight: 400;')
|
|
28346
28373
|
: 'position: absolute; top: 25%; left: calc(50% - 226px); font-size: 15px; text-transform: capitalize; font-weight: 400;'
|
|
28347
28374
|
}));
|
|
28348
28375
|
}
|
|
28349
28376
|
labelWrapper.textContent = this.l10n.getConstant(parent.toPascalCase(type === 'transparency' ? 'opacity' : type));
|
|
28350
28377
|
const sliderWrapper = hdrWrapper.appendChild(parent.createElement('div', {
|
|
28351
28378
|
id: id + '_sliderWrapper',
|
|
28379
|
+
className: 'e-ie-finetune-slider-wrap',
|
|
28352
28380
|
styles: 'position: absolute'
|
|
28353
28381
|
}));
|
|
28354
28382
|
let value = parent.getCurrAdjustmentValue(type);
|
|
@@ -28427,8 +28455,8 @@ class ToolbarModule {
|
|
|
28427
28455
|
if (type === 'straighten' && Browser.isDevice) {
|
|
28428
28456
|
const sLabelWrapper = hdrWrapper.appendChild(parent.createElement('label', {
|
|
28429
28457
|
id: id + '_sLabelWrapper',
|
|
28430
|
-
className: 'e-ie-straighten-value-span',
|
|
28431
|
-
styles: 'position: absolute; top:
|
|
28458
|
+
className: 'e-ie-straighten-value-span e-ie-finetune-value-span',
|
|
28459
|
+
styles: 'position: absolute; top: 31%; margin-left: 20px; font-size: 15px; text-transform: capitalize; font-weight: 400;'
|
|
28432
28460
|
}));
|
|
28433
28461
|
sLabelWrapper.innerHTML = parent.transform.straighten.toString() + '°';
|
|
28434
28462
|
sliderWrapper.parentElement.classList.add('e-straighten-slider');
|
|
@@ -28441,6 +28469,9 @@ class ToolbarModule {
|
|
|
28441
28469
|
'position: absolute; top: 25%; left: calc(50% + 190px); font-size: 15px; text-transform: capitalize; font-weight: 400;'
|
|
28442
28470
|
}));
|
|
28443
28471
|
sliderWrapper.parentElement.classList.add('e-finetune-slider');
|
|
28472
|
+
if (type === 'transparency' && Browser.isDevice) {
|
|
28473
|
+
sliderWrapper.parentElement.classList.add('e-ie-device-transparency-slider');
|
|
28474
|
+
}
|
|
28444
28475
|
this.updateFinetuneSpan(type);
|
|
28445
28476
|
}
|
|
28446
28477
|
}
|