@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
|
@@ -13567,6 +13567,8 @@ var Shape = /** @__PURE__ @class */ (function () {
|
|
|
13567
13567
|
endX: parent.activeObj.activePoint.startX + parent.activeObj.activePoint.width,
|
|
13568
13568
|
endY: parent.activeObj.activePoint.startY + parent.activeObj.activePoint.height,
|
|
13569
13569
|
width: selectionSettings.width, height: selectionSettings.height };
|
|
13570
|
+
parent.activeObj.activePoint.endX = parent.activeObj.activePoint.startX + parent.activeObj.activePoint.width;
|
|
13571
|
+
parent.activeObj.activePoint.endY = parent.activeObj.activePoint.startY + parent.activeObj.activePoint.height;
|
|
13570
13572
|
};
|
|
13571
13573
|
Shape.prototype.updateShapeChangeEventArgs = function (shapeSettings) {
|
|
13572
13574
|
var parent = this.parent;
|
|
@@ -13625,6 +13627,7 @@ var Shape = /** @__PURE__ @class */ (function () {
|
|
|
13625
13627
|
if (shapeSettings.degree) {
|
|
13626
13628
|
parent.activeObj.rotatedAngle = shapeSettings.degree * (Math.PI / 180);
|
|
13627
13629
|
}
|
|
13630
|
+
this.updateFontRatio(parent.activeObj);
|
|
13628
13631
|
break;
|
|
13629
13632
|
case 'rectangle':
|
|
13630
13633
|
case 'image':
|
|
@@ -17781,8 +17784,9 @@ var Transform = /** @__PURE__ @class */ (function () {
|
|
|
17781
17784
|
toolbarHeight = obj['toolbarHeight'];
|
|
17782
17785
|
}
|
|
17783
17786
|
}
|
|
17784
|
-
|
|
17785
|
-
|
|
17787
|
+
var ctxTbarArea = parent.element.querySelector('#' + parent.element.id + '_contextualToolbarArea');
|
|
17788
|
+
if (Browser.isDevice && straightenObj['bool'] && ctxTbarArea) {
|
|
17789
|
+
cxtTbarHeight = ctxTbarArea.clientHeight;
|
|
17786
17790
|
}
|
|
17787
17791
|
parent.notify('toolbar', { prop: 'setToolbarHeight', value: { height: toolbarHeight } });
|
|
17788
17792
|
if (Browser.isDevice) {
|
|
@@ -19162,32 +19166,6 @@ var UndoRedo = /** @__PURE__ @class */ (function () {
|
|
|
19162
19166
|
parent.notify('filter', { prop: 'setAdjustmentValue', onPropertyChange: false, value: { adjustmentValue: this.lowerContext.filter } });
|
|
19163
19167
|
parent.currObjType.isCustomCrop = false;
|
|
19164
19168
|
};
|
|
19165
|
-
UndoRedo.prototype.getImageAction = function (operation) {
|
|
19166
|
-
if (['brightness', 'contrast', 'saturation', 'opacity', 'blur', 'hue'].indexOf(operation) !== -1) {
|
|
19167
|
-
return 'FinetuneApplied';
|
|
19168
|
-
}
|
|
19169
|
-
else if (['chrome', 'cold', 'warm', 'grayscale', 'blackandwhite', 'sepia', 'invert'].indexOf(operation) !== -1) {
|
|
19170
|
-
return 'FilterApplied';
|
|
19171
|
-
}
|
|
19172
|
-
else if (operation === 'frame') {
|
|
19173
|
-
return 'FrameApplied';
|
|
19174
|
-
}
|
|
19175
|
-
else if (operation === 'resize') {
|
|
19176
|
-
return 'ImageResized';
|
|
19177
|
-
}
|
|
19178
|
-
else if (['deleteFreehandDrawing', 'deleteObj'].indexOf(operation) !== -1) {
|
|
19179
|
-
return 'ShapeDeleted';
|
|
19180
|
-
}
|
|
19181
|
-
else if (operation === 'crop') {
|
|
19182
|
-
return 'Cropped';
|
|
19183
|
-
}
|
|
19184
|
-
else if (['shapeInsert', 'freehanddraw', 'freehand-draw'].indexOf(operation) !== -1) {
|
|
19185
|
-
return 'ShapeInserted';
|
|
19186
|
-
}
|
|
19187
|
-
else {
|
|
19188
|
-
return 'ShapeCustomized';
|
|
19189
|
-
}
|
|
19190
|
-
};
|
|
19191
19169
|
UndoRedo.prototype.updateUrc = function (operation, previousObj, previousObjColl, previousPointColl, previousSelPointColl, previousCropObj, previousText, currentText, previousFilter, isCircleCrop) {
|
|
19192
19170
|
var parent = this.parent;
|
|
19193
19171
|
if (parent.isResize || this.isPreventing) {
|
|
@@ -19947,7 +19925,7 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
19947
19925
|
ImageEditor.prototype.createDropUploader = function () {
|
|
19948
19926
|
var _this = this;
|
|
19949
19927
|
var uploadObj = new Uploader({
|
|
19950
|
-
dropArea:
|
|
19928
|
+
dropArea: this.element.getElementsByClassName('e-canvas-wrapper')[0],
|
|
19951
19929
|
allowedExtensions: '.jpg, .jpeg, .png,.svg',
|
|
19952
19930
|
multiple: false,
|
|
19953
19931
|
selected: function (args) {
|
|
@@ -20233,7 +20211,8 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
20233
20211
|
ImageEditor.prototype.notifyResetForAllModules = function () {
|
|
20234
20212
|
var modules = this.requiredModules();
|
|
20235
20213
|
for (var i = 0; i < modules.length; i++) {
|
|
20236
|
-
|
|
20214
|
+
var module = modules[i].member;
|
|
20215
|
+
this.notify(module === 'toolbar-module' ? 'toolbar' : module, { prop: 'reset', onPropertyChange: false });
|
|
20237
20216
|
}
|
|
20238
20217
|
};
|
|
20239
20218
|
ImageEditor.prototype.allowShape = function (x, y) {
|
|
@@ -21052,8 +21031,19 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
21052
21031
|
this.notify('shape', { prop: 'selectShape', onPropertyChange: false, value: { id: setting.id, obj: obj } });
|
|
21053
21032
|
this.notify('selection', { prop: 'getFreehandDrawEditing', onPropertyChange: false, value: { obj: freehandObj } });
|
|
21054
21033
|
if (obj['isSelected']) {
|
|
21034
|
+
var tempFontSize = this.activeObj.textSettings.fontSize;
|
|
21055
21035
|
this.notify('shape', { prop: 'updateShapeChangeEventArgs', onPropertyChange: false,
|
|
21056
21036
|
value: { shapeSettings: setting } });
|
|
21037
|
+
if (this.activeObj.shape === 'text' && tempFontSize) {
|
|
21038
|
+
var diff = this.activeObj.textSettings.fontSize - tempFontSize;
|
|
21039
|
+
if (diff !== 0) {
|
|
21040
|
+
this.activeObj.activePoint.height += diff;
|
|
21041
|
+
this.activeObj.activePoint.startY -= (diff / 2);
|
|
21042
|
+
this.activeObj.activePoint.endY += (diff / 2);
|
|
21043
|
+
this.notify('draw', { prop: 'updateActiveObject', onPropertyChange: false, value: { actPoint: this.activeObj.activePoint, obj: this.activeObj,
|
|
21044
|
+
isMouseMove: null, x: null, y: null } });
|
|
21045
|
+
}
|
|
21046
|
+
}
|
|
21057
21047
|
var activeObj = extend({}, this.activeObj, {}, true);
|
|
21058
21048
|
this.notify('shape', { prop: 'refreshActiveObj', onPropertyChange: false });
|
|
21059
21049
|
this.notify('draw', { prop: 'render-image', value: { isMouseWheel: null, isPreventClearRect: null, isFrame: null } });
|
|
@@ -23351,12 +23341,6 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
23351
23341
|
case 'setSelectedFreehandColor':
|
|
23352
23342
|
this.selFhdColor = args.value['color'];
|
|
23353
23343
|
break;
|
|
23354
|
-
case 'getCurrentFilter':
|
|
23355
|
-
args.value['obj']['currentFilter'] = parent.currentFilter;
|
|
23356
|
-
break;
|
|
23357
|
-
case 'setCurrentFilter':
|
|
23358
|
-
parent.currentFilter = args.value['filter'];
|
|
23359
|
-
break;
|
|
23360
23344
|
case 'setInitialAdjustmentValue':
|
|
23361
23345
|
parent.initialAdjustmentValue = args.value['value'];
|
|
23362
23346
|
break;
|
|
@@ -23378,9 +23362,6 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
23378
23362
|
case 'refreshSlider':
|
|
23379
23363
|
this.refreshSlider();
|
|
23380
23364
|
break;
|
|
23381
|
-
case 'renderSlider':
|
|
23382
|
-
this.renderSlider(args.value['type']);
|
|
23383
|
-
break;
|
|
23384
23365
|
case 'getCurrAdjustmentValue':
|
|
23385
23366
|
parent.getCurrAdjustmentValue(args.value['type']);
|
|
23386
23367
|
break;
|
|
@@ -23390,18 +23371,6 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
23390
23371
|
case 'refreshShapeDrawing':
|
|
23391
23372
|
this.refreshShapeDrawing();
|
|
23392
23373
|
break;
|
|
23393
|
-
case 'getCropToolbar':
|
|
23394
|
-
args.value['obj']['isCropToolbar'] = parent.isCropToolbar;
|
|
23395
|
-
break;
|
|
23396
|
-
case 'getPrevCurrSelectionPoint':
|
|
23397
|
-
args.value['obj']['prevCurrSelectionPoint'] = parent.prevCurrSelectionPoint;
|
|
23398
|
-
break;
|
|
23399
|
-
case 'setPrevCurrSelectionPoint':
|
|
23400
|
-
parent.prevCurrSelectionPoint = args.value['point'];
|
|
23401
|
-
break;
|
|
23402
|
-
case 'updateCropTransformItems':
|
|
23403
|
-
parent.updateCropTransformItems();
|
|
23404
|
-
break;
|
|
23405
23374
|
case 'setEnableDisableUndoRedo':
|
|
23406
23375
|
this.preventEnableDisableUr = args.value['isPrevent'];
|
|
23407
23376
|
break;
|
|
@@ -23452,7 +23421,6 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
23452
23421
|
};
|
|
23453
23422
|
ToolbarModule.prototype.reset = function () {
|
|
23454
23423
|
var parent = this.parent;
|
|
23455
|
-
this.defToolbarItems = [];
|
|
23456
23424
|
this.toolbarHeight = 46;
|
|
23457
23425
|
parent.prevCurrSelectionPoint = null;
|
|
23458
23426
|
this.zoomBtnHold = null;
|