@syncfusion/ej2-image-editor 25.1.35 → 25.1.37
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 +8 -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 +20 -52
- package/dist/es6/ej2-image-editor.es2015.js.map +1 -1
- package/dist/es6/ej2-image-editor.es5.js +20 -52
- 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 +8 -8
- package/src/image-editor/action/shape.js +3 -0
- package/src/image-editor/action/transform.js +3 -2
- package/src/image-editor/action/undo-redo.d.ts +0 -1
- package/src/image-editor/action/undo-redo.js +0 -26
- package/src/image-editor/base/image-editor.js +14 -2
- package/src/image-editor/renderer/toolbar.js +0 -22
- package/styles/image-editor/_layout.scss +3 -0
- package/styles/image-editor/material3-dark.css +1 -0
- package/styles/image-editor/material3.css +1 -0
- package/styles/image-editor/tailwind-dark.css +1 -0
- package/styles/image-editor/tailwind.css +1 -0
- package/styles/material3-dark.css +1 -0
- package/styles/material3.css +1 -0
- package/styles/tailwind-dark.css +1 -0
- package/styles/tailwind.css +1 -0
|
@@ -13550,6 +13550,8 @@ class Shape {
|
|
|
13550
13550
|
endX: parent.activeObj.activePoint.startX + parent.activeObj.activePoint.width,
|
|
13551
13551
|
endY: parent.activeObj.activePoint.startY + parent.activeObj.activePoint.height,
|
|
13552
13552
|
width: selectionSettings.width, height: selectionSettings.height };
|
|
13553
|
+
parent.activeObj.activePoint.endX = parent.activeObj.activePoint.startX + parent.activeObj.activePoint.width;
|
|
13554
|
+
parent.activeObj.activePoint.endY = parent.activeObj.activePoint.startY + parent.activeObj.activePoint.height;
|
|
13553
13555
|
}
|
|
13554
13556
|
updateShapeChangeEventArgs(shapeSettings) {
|
|
13555
13557
|
const parent = this.parent;
|
|
@@ -13608,6 +13610,7 @@ class Shape {
|
|
|
13608
13610
|
if (shapeSettings.degree) {
|
|
13609
13611
|
parent.activeObj.rotatedAngle = shapeSettings.degree * (Math.PI / 180);
|
|
13610
13612
|
}
|
|
13613
|
+
this.updateFontRatio(parent.activeObj);
|
|
13611
13614
|
break;
|
|
13612
13615
|
case 'rectangle':
|
|
13613
13616
|
case 'image':
|
|
@@ -17761,8 +17764,9 @@ class Transform {
|
|
|
17761
17764
|
toolbarHeight = obj['toolbarHeight'];
|
|
17762
17765
|
}
|
|
17763
17766
|
}
|
|
17764
|
-
|
|
17765
|
-
|
|
17767
|
+
const ctxTbarArea = parent.element.querySelector('#' + parent.element.id + '_contextualToolbarArea');
|
|
17768
|
+
if (Browser.isDevice && straightenObj['bool'] && ctxTbarArea) {
|
|
17769
|
+
cxtTbarHeight = ctxTbarArea.clientHeight;
|
|
17766
17770
|
}
|
|
17767
17771
|
parent.notify('toolbar', { prop: 'setToolbarHeight', value: { height: toolbarHeight } });
|
|
17768
17772
|
if (Browser.isDevice) {
|
|
@@ -19140,32 +19144,6 @@ class UndoRedo {
|
|
|
19140
19144
|
parent.notify('filter', { prop: 'setAdjustmentValue', onPropertyChange: false, value: { adjustmentValue: this.lowerContext.filter } });
|
|
19141
19145
|
parent.currObjType.isCustomCrop = false;
|
|
19142
19146
|
}
|
|
19143
|
-
getImageAction(operation) {
|
|
19144
|
-
if (['brightness', 'contrast', 'saturation', 'opacity', 'blur', 'hue'].indexOf(operation) !== -1) {
|
|
19145
|
-
return 'FinetuneApplied';
|
|
19146
|
-
}
|
|
19147
|
-
else if (['chrome', 'cold', 'warm', 'grayscale', 'blackandwhite', 'sepia', 'invert'].indexOf(operation) !== -1) {
|
|
19148
|
-
return 'FilterApplied';
|
|
19149
|
-
}
|
|
19150
|
-
else if (operation === 'frame') {
|
|
19151
|
-
return 'FrameApplied';
|
|
19152
|
-
}
|
|
19153
|
-
else if (operation === 'resize') {
|
|
19154
|
-
return 'ImageResized';
|
|
19155
|
-
}
|
|
19156
|
-
else if (['deleteFreehandDrawing', 'deleteObj'].indexOf(operation) !== -1) {
|
|
19157
|
-
return 'ShapeDeleted';
|
|
19158
|
-
}
|
|
19159
|
-
else if (operation === 'crop') {
|
|
19160
|
-
return 'Cropped';
|
|
19161
|
-
}
|
|
19162
|
-
else if (['shapeInsert', 'freehanddraw', 'freehand-draw'].indexOf(operation) !== -1) {
|
|
19163
|
-
return 'ShapeInserted';
|
|
19164
|
-
}
|
|
19165
|
-
else {
|
|
19166
|
-
return 'ShapeCustomized';
|
|
19167
|
-
}
|
|
19168
|
-
}
|
|
19169
19147
|
updateUrc(operation, previousObj, previousObjColl, previousPointColl, previousSelPointColl, previousCropObj, previousText, currentText, previousFilter, isCircleCrop) {
|
|
19170
19148
|
const parent = this.parent;
|
|
19171
19149
|
if (parent.isResize || this.isPreventing) {
|
|
@@ -19887,7 +19865,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
19887
19865
|
}
|
|
19888
19866
|
createDropUploader() {
|
|
19889
19867
|
const uploadObj = new Uploader({
|
|
19890
|
-
dropArea:
|
|
19868
|
+
dropArea: this.element.getElementsByClassName('e-canvas-wrapper')[0],
|
|
19891
19869
|
allowedExtensions: '.jpg, .jpeg, .png,.svg',
|
|
19892
19870
|
multiple: false,
|
|
19893
19871
|
selected: (args) => {
|
|
@@ -20173,7 +20151,8 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
20173
20151
|
notifyResetForAllModules() {
|
|
20174
20152
|
const modules = this.requiredModules();
|
|
20175
20153
|
for (let i = 0; i < modules.length; i++) {
|
|
20176
|
-
|
|
20154
|
+
const module = modules[i].member;
|
|
20155
|
+
this.notify(module === 'toolbar-module' ? 'toolbar' : module, { prop: 'reset', onPropertyChange: false });
|
|
20177
20156
|
}
|
|
20178
20157
|
}
|
|
20179
20158
|
allowShape(x, y) {
|
|
@@ -20992,8 +20971,19 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
20992
20971
|
this.notify('shape', { prop: 'selectShape', onPropertyChange: false, value: { id: setting.id, obj: obj } });
|
|
20993
20972
|
this.notify('selection', { prop: 'getFreehandDrawEditing', onPropertyChange: false, value: { obj: freehandObj } });
|
|
20994
20973
|
if (obj['isSelected']) {
|
|
20974
|
+
const tempFontSize = this.activeObj.textSettings.fontSize;
|
|
20995
20975
|
this.notify('shape', { prop: 'updateShapeChangeEventArgs', onPropertyChange: false,
|
|
20996
20976
|
value: { shapeSettings: setting } });
|
|
20977
|
+
if (this.activeObj.shape === 'text' && tempFontSize) {
|
|
20978
|
+
const diff = this.activeObj.textSettings.fontSize - tempFontSize;
|
|
20979
|
+
if (diff !== 0) {
|
|
20980
|
+
this.activeObj.activePoint.height += diff;
|
|
20981
|
+
this.activeObj.activePoint.startY -= (diff / 2);
|
|
20982
|
+
this.activeObj.activePoint.endY += (diff / 2);
|
|
20983
|
+
this.notify('draw', { prop: 'updateActiveObject', onPropertyChange: false, value: { actPoint: this.activeObj.activePoint, obj: this.activeObj,
|
|
20984
|
+
isMouseMove: null, x: null, y: null } });
|
|
20985
|
+
}
|
|
20986
|
+
}
|
|
20997
20987
|
const activeObj = extend({}, this.activeObj, {}, true);
|
|
20998
20988
|
this.notify('shape', { prop: 'refreshActiveObj', onPropertyChange: false });
|
|
20999
20989
|
this.notify('draw', { prop: 'render-image', value: { isMouseWheel: null, isPreventClearRect: null, isFrame: null } });
|
|
@@ -23289,12 +23279,6 @@ class ToolbarModule {
|
|
|
23289
23279
|
case 'setSelectedFreehandColor':
|
|
23290
23280
|
this.selFhdColor = args.value['color'];
|
|
23291
23281
|
break;
|
|
23292
|
-
case 'getCurrentFilter':
|
|
23293
|
-
args.value['obj']['currentFilter'] = parent.currentFilter;
|
|
23294
|
-
break;
|
|
23295
|
-
case 'setCurrentFilter':
|
|
23296
|
-
parent.currentFilter = args.value['filter'];
|
|
23297
|
-
break;
|
|
23298
23282
|
case 'setInitialAdjustmentValue':
|
|
23299
23283
|
parent.initialAdjustmentValue = args.value['value'];
|
|
23300
23284
|
break;
|
|
@@ -23316,9 +23300,6 @@ class ToolbarModule {
|
|
|
23316
23300
|
case 'refreshSlider':
|
|
23317
23301
|
this.refreshSlider();
|
|
23318
23302
|
break;
|
|
23319
|
-
case 'renderSlider':
|
|
23320
|
-
this.renderSlider(args.value['type']);
|
|
23321
|
-
break;
|
|
23322
23303
|
case 'getCurrAdjustmentValue':
|
|
23323
23304
|
parent.getCurrAdjustmentValue(args.value['type']);
|
|
23324
23305
|
break;
|
|
@@ -23328,18 +23309,6 @@ class ToolbarModule {
|
|
|
23328
23309
|
case 'refreshShapeDrawing':
|
|
23329
23310
|
this.refreshShapeDrawing();
|
|
23330
23311
|
break;
|
|
23331
|
-
case 'getCropToolbar':
|
|
23332
|
-
args.value['obj']['isCropToolbar'] = parent.isCropToolbar;
|
|
23333
|
-
break;
|
|
23334
|
-
case 'getPrevCurrSelectionPoint':
|
|
23335
|
-
args.value['obj']['prevCurrSelectionPoint'] = parent.prevCurrSelectionPoint;
|
|
23336
|
-
break;
|
|
23337
|
-
case 'setPrevCurrSelectionPoint':
|
|
23338
|
-
parent.prevCurrSelectionPoint = args.value['point'];
|
|
23339
|
-
break;
|
|
23340
|
-
case 'updateCropTransformItems':
|
|
23341
|
-
parent.updateCropTransformItems();
|
|
23342
|
-
break;
|
|
23343
23312
|
case 'setEnableDisableUndoRedo':
|
|
23344
23313
|
this.preventEnableDisableUr = args.value['isPrevent'];
|
|
23345
23314
|
break;
|
|
@@ -23390,7 +23359,6 @@ class ToolbarModule {
|
|
|
23390
23359
|
}
|
|
23391
23360
|
reset() {
|
|
23392
23361
|
const parent = this.parent;
|
|
23393
|
-
this.defToolbarItems = [];
|
|
23394
23362
|
this.toolbarHeight = 46;
|
|
23395
23363
|
parent.prevCurrSelectionPoint = null;
|
|
23396
23364
|
this.zoomBtnHold = null;
|