@syncfusion/ej2-image-editor 23.1.36 → 23.1.39
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 +18 -0
- package/dist/ej2-image-editor.umd.min.js +3 -3
- package/dist/ej2-image-editor.umd.min.js.map +1 -1
- package/dist/es6/ej2-image-editor.es2015.js +249 -31
- package/dist/es6/ej2-image-editor.es2015.js.map +1 -1
- package/dist/es6/ej2-image-editor.es5.js +266 -48
- package/dist/es6/ej2-image-editor.es5.js.map +1 -1
- package/dist/global/ej2-image-editor.min.js +3 -3
- package/dist/global/ej2-image-editor.min.js.map +1 -1
- package/dist/global/index.d.ts +2 -2
- package/package.json +10 -10
- package/src/image-editor/action/draw.js +5 -1
- package/src/image-editor/action/freehand-draw.d.ts +1 -0
- package/src/image-editor/action/freehand-draw.js +53 -26
- package/src/image-editor/action/selection.js +38 -3
- package/src/image-editor/action/shape.js +33 -16
- package/src/image-editor/base/enum.d.ts +28 -1
- package/src/image-editor/base/enum.js +27 -0
- package/src/image-editor/base/image-editor-model.d.ts +1 -1
- package/src/image-editor/base/image-editor.d.ts +8 -0
- package/src/image-editor/base/image-editor.js +110 -3
- package/src/image-editor/renderer/toolbar.js +1 -0
- package/styles/bootstrap-dark.css +5 -0
- package/styles/bootstrap.css +5 -0
- package/styles/bootstrap4.css +5 -0
- package/styles/bootstrap5-dark.css +5 -0
- package/styles/bootstrap5.css +5 -0
- package/styles/fabric-dark.css +5 -0
- package/styles/fabric.css +5 -0
- package/styles/fluent-dark.css +5 -0
- package/styles/fluent.css +5 -0
- package/styles/highcontrast-light.css +5 -0
- package/styles/highcontrast.css +5 -0
- package/styles/image-editor/_layout.scss +6 -0
- package/styles/image-editor/bootstrap-dark.css +5 -0
- package/styles/image-editor/bootstrap.css +5 -0
- package/styles/image-editor/bootstrap4.css +5 -0
- package/styles/image-editor/bootstrap5-dark.css +5 -0
- package/styles/image-editor/bootstrap5.css +5 -0
- package/styles/image-editor/fabric-dark.css +5 -0
- package/styles/image-editor/fabric.css +5 -0
- package/styles/image-editor/fluent-dark.css +5 -0
- package/styles/image-editor/fluent.css +5 -0
- package/styles/image-editor/highcontrast-light.css +5 -0
- package/styles/image-editor/highcontrast.css +5 -0
- package/styles/image-editor/material-dark.css +5 -0
- package/styles/image-editor/material.css +5 -0
- package/styles/image-editor/material3-dark.css +5 -0
- package/styles/image-editor/material3.css +5 -0
- package/styles/image-editor/tailwind-dark.css +5 -0
- package/styles/image-editor/tailwind.css +5 -0
- package/styles/material-dark.css +5 -0
- package/styles/material.css +5 -0
- package/styles/material3-dark.css +5 -0
- package/styles/material3.css +5 -0
- package/styles/tailwind-dark.css +5 -0
- package/styles/tailwind.css +5 -0
|
@@ -21,7 +21,7 @@ import { Component, NotifyPropertyChanges, Property, addClass, removeClass, exte
|
|
|
21
21
|
import { Event, EventHandler, getComponent, isNullOrUndefined, getUniqueID } from '@syncfusion/ej2-base';
|
|
22
22
|
import { Dialog, createSpinner } from '@syncfusion/ej2-popups';
|
|
23
23
|
import { Complex, Browser, ChildProperty, compile as templateCompiler, compile } from '@syncfusion/ej2-base';
|
|
24
|
-
import { ToolbarModule, Crop, Draw, Filter, FreehandDrawing, Selection, Shape, Transform, UndoRedo, Export } from './../index';
|
|
24
|
+
import { ToolbarModule, Crop, Draw, Filter, FreehandDrawing, Selection, Shape, Transform, UndoRedo, Export, ShapeType } from './../index';
|
|
25
25
|
import { ZoomTrigger, ImageFinetuneOption } from './../index';
|
|
26
26
|
import { Uploader } from '@syncfusion/ej2-inputs';
|
|
27
27
|
/**
|
|
@@ -439,6 +439,10 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
439
439
|
this.notify('toolbar', { prop: 'create-contextual-toolbar', onPropertyChange: false });
|
|
440
440
|
}
|
|
441
441
|
this.createCanvas();
|
|
442
|
+
if (this.element.offsetWidth > 359 && this.element.querySelector('.e-ie-min-drop-content') && this.element.querySelector('.e-ie-drop-content')) {
|
|
443
|
+
this.element.querySelector('.e-ie-min-drop-content').style.display = 'none';
|
|
444
|
+
this.element.querySelector('.e-ie-drop-content').style.display = 'block';
|
|
445
|
+
}
|
|
442
446
|
this.createDropUploader();
|
|
443
447
|
if (this.showQuickAccessToolbar) {
|
|
444
448
|
var canvasWrapper = document.querySelector('#' + this.element.id + '_canvasWrapper');
|
|
@@ -598,18 +602,26 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
598
602
|
}));
|
|
599
603
|
var dragObj = { key: 'DragText' };
|
|
600
604
|
this.notify('toolbar', { prop: 'getLocaleText', onPropertyChange: false, value: { obj: dragObj } });
|
|
605
|
+
var dropObj = { key: 'DropText' };
|
|
606
|
+
this.notify('toolbar', { prop: 'getLocaleText', onPropertyChange: false, value: { obj: dropObj } });
|
|
601
607
|
var browseObj = { key: 'BrowseText' };
|
|
602
608
|
this.notify('toolbar', { prop: 'getLocaleText', onPropertyChange: false, value: { obj: browseObj } });
|
|
603
609
|
var supportObj = { key: 'SupportText' };
|
|
604
610
|
this.notify('toolbar', { prop: 'getLocaleText', onPropertyChange: false, value: { obj: supportObj } });
|
|
605
611
|
var dropAreaElement = this.createElement('div', { id: this.element.id + '_dropArea', className: 'e-ie-drop-area', attrs: { style: 'position: relative;' } });
|
|
606
612
|
var dropIconElement = this.createElement('span', { className: 'e-ie-drop-icon e-icons e-image', attrs: { style: 'position: absolute;' } });
|
|
607
|
-
var dropContentElement = this.createElement('span', { className: 'e-ie-drop-content', attrs: { style: 'position: absolute;' } });
|
|
613
|
+
var dropContentElement = this.createElement('span', { className: 'e-ie-drop-content', attrs: { style: 'position: absolute; display: none;' } });
|
|
608
614
|
dropContentElement.textContent = dragObj['value'] + ' ';
|
|
615
|
+
var minDropContentElem = this.createElement('span', { className: 'e-ie-min-drop-content', attrs: { style: 'position: absolute;' } });
|
|
616
|
+
minDropContentElem.textContent = dropObj['value'] + ' ';
|
|
609
617
|
var dropAnchorElement = this.createElement('a', { id: this.element.id + '_dropBrowse', className: 'e-ie-drop-browse' });
|
|
610
618
|
dropAnchorElement.textContent = browseObj['value'];
|
|
619
|
+
var minDropAnchorElem = this.createElement('a', { id: this.element.id + '_dropBrowse', className: 'e-ie-drop-browse' });
|
|
620
|
+
minDropAnchorElem.textContent = browseObj['value'];
|
|
611
621
|
dropContentElement.appendChild(dropAnchorElement);
|
|
622
|
+
minDropContentElem.appendChild(minDropAnchorElem);
|
|
612
623
|
dropAnchorElement.href = '';
|
|
624
|
+
minDropAnchorElem.href = '';
|
|
613
625
|
var dropInfoElement = this.createElement('span', { className: 'e-ie-drop-info', attrs: { position: 'absolute' } });
|
|
614
626
|
dropInfoElement.textContent = supportObj['value'] + ' SVG, PNG, and JPG';
|
|
615
627
|
var dropUploader = dropAreaElement.appendChild(this.createElement('input', {
|
|
@@ -619,6 +631,7 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
619
631
|
dropUploader.setAttribute('accept', 'image/*');
|
|
620
632
|
dropAreaElement.appendChild(dropIconElement);
|
|
621
633
|
dropAreaElement.appendChild(dropContentElement);
|
|
634
|
+
dropAreaElement.appendChild(minDropContentElem);
|
|
622
635
|
dropAreaElement.appendChild(dropInfoElement);
|
|
623
636
|
canvasWrapper.appendChild(dropAreaElement);
|
|
624
637
|
this.lowerCanvas = canvasWrapper.appendChild(this.createElement('canvas', {
|
|
@@ -1625,7 +1638,9 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
1625
1638
|
* @returns {void}.
|
|
1626
1639
|
*/
|
|
1627
1640
|
ImageEditor.prototype.okBtn = function (isMouseDown) {
|
|
1628
|
-
this.element.querySelector('.e-contextual-toolbar-wrapper')
|
|
1641
|
+
if (this.element.querySelector('.e-contextual-toolbar-wrapper')) {
|
|
1642
|
+
this.element.querySelector('.e-contextual-toolbar-wrapper').classList.remove('e-frame-wrapper');
|
|
1643
|
+
}
|
|
1629
1644
|
var isCropSelection = false;
|
|
1630
1645
|
var splitWords;
|
|
1631
1646
|
var aspectIcon = this.element.querySelector('#' + this.element.id + '_aspectratio');
|
|
@@ -1642,6 +1657,17 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
1642
1657
|
isCropSelection = true;
|
|
1643
1658
|
}
|
|
1644
1659
|
this.allowDownScale = true;
|
|
1660
|
+
if ((this.activeObj.shape && this.activeObj.shape !== 'image' || this.togglePen) && !isCropSelection) {
|
|
1661
|
+
var objt = { shapeSettingsObj: {} };
|
|
1662
|
+
this.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: objt } });
|
|
1663
|
+
var shapeSettings = objt['shapeSettingsObj'];
|
|
1664
|
+
if (this.togglePen) {
|
|
1665
|
+
shapeSettings.type = ShapeType.FreehandDraw;
|
|
1666
|
+
}
|
|
1667
|
+
var shapeChangedArgs = { action: 'apply', previousShapeSettings: extend({}, shapeSettings, {}, true),
|
|
1668
|
+
currentShapeSettings: extend({}, shapeSettings, {}, true) };
|
|
1669
|
+
this.triggerShapeChanged(shapeChangedArgs);
|
|
1670
|
+
}
|
|
1645
1671
|
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
1646
1672
|
if (aspectIcon || nonAspectIcon || (isBlazor() && this.currentToolbar === 'resize-toolbar')) {
|
|
1647
1673
|
var obj_2 = { width: null, height: null };
|
|
@@ -1938,6 +1964,9 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
1938
1964
|
this.notify('shape', { prop: 'pushActItemIntoObj' });
|
|
1939
1965
|
var prevCropObj = extend({}, this.cropObj, {}, true);
|
|
1940
1966
|
var object = { currObj: {} };
|
|
1967
|
+
var objt = { shapeSettingsObj: {} };
|
|
1968
|
+
this.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: objt } });
|
|
1969
|
+
var shapeSettings = objt['shapeSettingsObj'];
|
|
1941
1970
|
this.notify('filter', { prop: 'getCurrentObj', onPropertyChange: false, value: { object: object } });
|
|
1942
1971
|
var prevObj = object['currObj'];
|
|
1943
1972
|
prevObj.objColl = extend([], this.objColl, [], true);
|
|
@@ -1974,6 +2003,9 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
1974
2003
|
}
|
|
1975
2004
|
}
|
|
1976
2005
|
}
|
|
2006
|
+
var shapeChangedArgs = { action: type, previousShapeSettings: extend({}, shapeSettings, {}, true),
|
|
2007
|
+
currentShapeSettings: extend({}, shapeSettings, {}, true) };
|
|
2008
|
+
this.triggerShapeChanged(shapeChangedArgs);
|
|
1977
2009
|
};
|
|
1978
2010
|
/**
|
|
1979
2011
|
* Apply Font style for text.
|
|
@@ -1987,6 +2019,9 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
1987
2019
|
this.notify('shape', { prop: 'pushActItemIntoObj' });
|
|
1988
2020
|
var objColl = extend([], this.objColl, [], true);
|
|
1989
2021
|
var prevCropObj = extend({}, this.cropObj, {}, true);
|
|
2022
|
+
var objt = { shapeSettingsObj: {} };
|
|
2023
|
+
this.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: objt } });
|
|
2024
|
+
var shapeSettings = objt['shapeSettingsObj'];
|
|
1990
2025
|
var object = { currObj: {} };
|
|
1991
2026
|
this.notify('filter', { prop: 'getCurrentObj', onPropertyChange: false, value: { object: object } });
|
|
1992
2027
|
var prevObj = object['currObj'];
|
|
@@ -2035,6 +2070,10 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
2035
2070
|
currentText: null, previousFilter: null, isCircleCrop: null } });
|
|
2036
2071
|
this.notify('selection', { prop: 'redrawShape', value: { obj: this.objColl[this.objColl.length - 1] } });
|
|
2037
2072
|
}
|
|
2073
|
+
var shapeChangedArgs = { action: 'font-family', previousShapeSettings: extend({}, shapeSettings, {}, true),
|
|
2074
|
+
currentShapeSettings: extend({}, shapeSettings, {}, true) };
|
|
2075
|
+
shapeChangedArgs.currentShapeSettings.fontFamily = this.textArea.style.fontFamily;
|
|
2076
|
+
this.triggerShapeChanged(shapeChangedArgs);
|
|
2038
2077
|
};
|
|
2039
2078
|
/**
|
|
2040
2079
|
* Apply Font size for text.
|
|
@@ -2048,6 +2087,9 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
2048
2087
|
this.notify('selection', { prop: 'setInitialTextEdit', value: { bool: false } });
|
|
2049
2088
|
this.notify('shape', { prop: 'pushActItemIntoObj' });
|
|
2050
2089
|
var prevCropObj = extend({}, this.cropObj, {}, true);
|
|
2090
|
+
var objt = { shapeSettingsObj: {} };
|
|
2091
|
+
this.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: objt } });
|
|
2092
|
+
var shapeSettings = objt['shapeSettingsObj'];
|
|
2051
2093
|
var object = { currObj: {} };
|
|
2052
2094
|
this.notify('filter', { prop: 'getCurrentObj', onPropertyChange: false, value: { object: object } });
|
|
2053
2095
|
var prevObj = object['currObj'];
|
|
@@ -2127,6 +2169,10 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
2127
2169
|
currentText: null, previousFilter: null, isCircleCrop: null } });
|
|
2128
2170
|
this.notify('selection', { prop: 'redrawShape', value: { obj: this.objColl[this.objColl.length - 1] } });
|
|
2129
2171
|
}
|
|
2172
|
+
var shapeChangedArgs = { action: 'font-size', previousShapeSettings: extend({}, shapeSettings, {}, true),
|
|
2173
|
+
currentShapeSettings: extend({}, shapeSettings, {}, true) };
|
|
2174
|
+
shapeChangedArgs.currentShapeSettings.fontSize = this.activeObj.textSettings.fontSize;
|
|
2175
|
+
this.triggerShapeChanged(shapeChangedArgs);
|
|
2130
2176
|
};
|
|
2131
2177
|
/**
|
|
2132
2178
|
* Apply Font color for text.
|
|
@@ -2139,6 +2185,9 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
2139
2185
|
this.notify('selection', { prop: 'setInitialTextEdit', value: { bool: false } });
|
|
2140
2186
|
this.notify('shape', { prop: 'pushActItemIntoObj' });
|
|
2141
2187
|
var prevCropObj = extend({}, this.cropObj, {}, true);
|
|
2188
|
+
var objt = { shapeSettingsObj: {} };
|
|
2189
|
+
this.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: objt } });
|
|
2190
|
+
var shapeSettings = objt['shapeSettingsObj'];
|
|
2142
2191
|
var object = { currObj: {} };
|
|
2143
2192
|
this.notify('filter', { prop: 'getCurrentObj', onPropertyChange: false, value: { object: object } });
|
|
2144
2193
|
var prevObj = object['currObj'];
|
|
@@ -2186,6 +2235,10 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
2186
2235
|
currentText: null, previousFilter: null, isCircleCrop: null } });
|
|
2187
2236
|
this.notify('selection', { prop: 'redrawShape', value: { obj: this.objColl[this.objColl.length - 1] } });
|
|
2188
2237
|
}
|
|
2238
|
+
var shapeChangedArgs = { action: 'font-color', previousShapeSettings: extend({}, shapeSettings, {}, true),
|
|
2239
|
+
currentShapeSettings: extend({}, shapeSettings, {}, true) };
|
|
2240
|
+
shapeChangedArgs.currentShapeSettings.fillColor = value;
|
|
2241
|
+
this.triggerShapeChanged(shapeChangedArgs);
|
|
2189
2242
|
};
|
|
2190
2243
|
/**
|
|
2191
2244
|
* Apply Pen stroke width.
|
|
@@ -2199,6 +2252,9 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
2199
2252
|
var temp = extend([], this.pointColl, [], true);
|
|
2200
2253
|
this.updateFreehandDrawColorChange();
|
|
2201
2254
|
var prevCropObj = extend({}, this.cropObj, {}, true);
|
|
2255
|
+
var objt = { shapeSettingsObj: {} };
|
|
2256
|
+
this.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: objt } });
|
|
2257
|
+
var shapeSettings = objt['shapeSettingsObj'];
|
|
2202
2258
|
var object = { currObj: {} };
|
|
2203
2259
|
this.notify('filter', { prop: 'getCurrentObj', onPropertyChange: false, value: { object: object } });
|
|
2204
2260
|
var prevObj = object['currObj'];
|
|
@@ -2229,6 +2285,11 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
2229
2285
|
previousCropObj: prevCropObj, previousText: null,
|
|
2230
2286
|
currentText: null, previousFilter: null, isCircleCrop: null } });
|
|
2231
2287
|
}
|
|
2288
|
+
shapeSettings.type = ShapeType.FreehandDraw;
|
|
2289
|
+
var shapeChangedArgs = { action: 'stroke-width', previousShapeSettings: extend({}, shapeSettings, {}, true),
|
|
2290
|
+
currentShapeSettings: extend({}, shapeSettings, {}, true) };
|
|
2291
|
+
shapeChangedArgs.currentShapeSettings.strokeWidth = this.activeObj.strokeSettings.strokeWidth;
|
|
2292
|
+
this.triggerShapeChanged(shapeChangedArgs);
|
|
2232
2293
|
};
|
|
2233
2294
|
/**
|
|
2234
2295
|
* Apply Pen stroke color.
|
|
@@ -2242,6 +2303,9 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
2242
2303
|
var temp = extend([], this.pointColl, [], true);
|
|
2243
2304
|
this.updateFreehandDrawColorChange();
|
|
2244
2305
|
var prevCropObj = extend({}, this.cropObj, {}, true);
|
|
2306
|
+
var objt = { shapeSettingsObj: {} };
|
|
2307
|
+
this.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: objt } });
|
|
2308
|
+
var shapeSettings = objt['shapeSettingsObj'];
|
|
2245
2309
|
var object = { currObj: {} };
|
|
2246
2310
|
this.notify('filter', { prop: 'getCurrentObj', onPropertyChange: false, value: { object: object } });
|
|
2247
2311
|
var prevObj = object['currObj'];
|
|
@@ -2273,6 +2337,11 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
2273
2337
|
else if (!this.togglePen) {
|
|
2274
2338
|
this.notify('selection', { prop: 'redrawShape', value: { obj: this.activeObj } });
|
|
2275
2339
|
}
|
|
2340
|
+
shapeSettings.type = ShapeType.FreehandDraw;
|
|
2341
|
+
var shapeChangedArgs = { action: 'stroke-color', previousShapeSettings: extend({}, shapeSettings, {}, true),
|
|
2342
|
+
currentShapeSettings: extend({}, shapeSettings, {}, true) };
|
|
2343
|
+
shapeChangedArgs.currentShapeSettings.strokeColor = value;
|
|
2344
|
+
this.triggerShapeChanged(shapeChangedArgs);
|
|
2276
2345
|
};
|
|
2277
2346
|
/**
|
|
2278
2347
|
* Apply Shape stroke width.
|
|
@@ -2284,6 +2353,9 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
2284
2353
|
ImageEditor.prototype.updateStrokeWidth = function (id) {
|
|
2285
2354
|
if (this.activeObj.shape && (this.activeObj.shape !== 'path' || (this.activeObj.shape === 'path' &&
|
|
2286
2355
|
this.activeObj.pointColl.length > 0))) {
|
|
2356
|
+
var obj = { shapeSettingsObj: {} };
|
|
2357
|
+
this.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: obj } });
|
|
2358
|
+
var shapeSettings = obj['shapeSettingsObj'];
|
|
2287
2359
|
this.notify('shape', { prop: 'pushActItemIntoObj' });
|
|
2288
2360
|
var prevCropObj = extend({}, this.cropObj, {}, true);
|
|
2289
2361
|
var object = { currObj: {} };
|
|
@@ -2308,6 +2380,10 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
2308
2380
|
previousCropObj: prevCropObj, previousText: null,
|
|
2309
2381
|
currentText: null, previousFilter: null, isCircleCrop: null } });
|
|
2310
2382
|
this.notify('selection', { prop: 'redrawShape', value: { obj: this.objColl[this.objColl.length - 1] } });
|
|
2383
|
+
var shapeChangedArgs = { action: 'stroke-width', previousShapeSettings: extend({}, shapeSettings, {}, true),
|
|
2384
|
+
currentShapeSettings: extend({}, shapeSettings, {}, true) };
|
|
2385
|
+
shapeChangedArgs.currentShapeSettings.strokeWidth = this.activeObj.strokeSettings.strokeWidth;
|
|
2386
|
+
this.triggerShapeChanged(shapeChangedArgs);
|
|
2311
2387
|
}
|
|
2312
2388
|
else if (this.activeObj.shape && (this.activeObj.shape === 'path' &&
|
|
2313
2389
|
this.activeObj.pointColl.length === 0)) {
|
|
@@ -2325,6 +2401,9 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
2325
2401
|
* @returns {void}.
|
|
2326
2402
|
*/
|
|
2327
2403
|
ImageEditor.prototype.updateStrokeColor = function (value) {
|
|
2404
|
+
var objt = { shapeSettingsObj: {} };
|
|
2405
|
+
this.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: objt } });
|
|
2406
|
+
var shapeSettings = objt['shapeSettingsObj'];
|
|
2328
2407
|
if (this.activeObj.shape && (this.activeObj.shape !== 'path' || (this.activeObj.shape === 'path' &&
|
|
2329
2408
|
this.activeObj.pointColl.length > 0))) {
|
|
2330
2409
|
this.notify('shape', { prop: 'pushActItemIntoObj' });
|
|
@@ -2357,6 +2436,10 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
2357
2436
|
this.activeObj.strokeSettings.strokeColor = value;
|
|
2358
2437
|
this.notify('shape', { prop: 'setStrokeSettings', value: { strokeSettings: null, strokeColor: this.activeObj.strokeSettings.strokeColor, fillColor: null, strokeWidth: null } });
|
|
2359
2438
|
}
|
|
2439
|
+
var shapeChangedArgs = { action: 'stroke-color', previousShapeSettings: extend({}, shapeSettings, {}, true),
|
|
2440
|
+
currentShapeSettings: extend({}, shapeSettings, {}, true) };
|
|
2441
|
+
shapeChangedArgs.currentShapeSettings.strokeColor = value;
|
|
2442
|
+
this.triggerShapeChanged(shapeChangedArgs);
|
|
2360
2443
|
};
|
|
2361
2444
|
/**
|
|
2362
2445
|
* Apply Shape fill color.
|
|
@@ -2366,6 +2449,9 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
2366
2449
|
* @returns {void}.
|
|
2367
2450
|
*/
|
|
2368
2451
|
ImageEditor.prototype.updateFillColor = function (value) {
|
|
2452
|
+
var obj = { shapeSettingsObj: {} };
|
|
2453
|
+
this.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: obj } });
|
|
2454
|
+
var shapeSettings = obj['shapeSettingsObj'];
|
|
2369
2455
|
this.notify('shape', { prop: 'pushActItemIntoObj' });
|
|
2370
2456
|
var prevCropObj = extend({}, this.cropObj, {}, true);
|
|
2371
2457
|
var object = { currObj: {} };
|
|
@@ -2390,6 +2476,10 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
2390
2476
|
previousCropObj: prevCropObj, previousText: null,
|
|
2391
2477
|
currentText: null, previousFilter: null, isCircleCrop: null } });
|
|
2392
2478
|
this.notify('selection', { prop: 'redrawShape', value: { obj: this.objColl[this.objColl.length - 1] } });
|
|
2479
|
+
var shapeChangedArgs = { action: 'fill-color', previousShapeSettings: extend({}, shapeSettings, {}, true),
|
|
2480
|
+
currentShapeSettings: extend({}, shapeSettings, {}, true) };
|
|
2481
|
+
shapeChangedArgs.currentShapeSettings.fillColor = value;
|
|
2482
|
+
this.triggerShapeChanged(shapeChangedArgs);
|
|
2393
2483
|
};
|
|
2394
2484
|
/**
|
|
2395
2485
|
* Apply horizontal flip.
|
|
@@ -2586,6 +2676,10 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
2586
2676
|
if (isBlazor() && this.element.querySelector('.place-holder')) {
|
|
2587
2677
|
this.element.querySelector('.place-holder').remove();
|
|
2588
2678
|
}
|
|
2679
|
+
if (this.element.offsetWidth > 359 && this.element.querySelector('.e-ie-min-drop-content') && this.element.querySelector('.e-ie-drop-content')) {
|
|
2680
|
+
this.element.querySelector('.e-ie-min-drop-content').style.display = 'none';
|
|
2681
|
+
this.element.querySelector('.e-ie-drop-content').style.display = 'block';
|
|
2682
|
+
}
|
|
2589
2683
|
if (isBlazor() && this.element.querySelector('.e-ie-drop-area')) {
|
|
2590
2684
|
this.element.querySelector('.e-ie-drop-area').style.display = 'block';
|
|
2591
2685
|
}
|
|
@@ -2690,6 +2784,19 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
2690
2784
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function
|
|
2691
2785
|
ImageEditor.prototype.updateToolbar = function (element, type, value) {
|
|
2692
2786
|
};
|
|
2787
|
+
/**
|
|
2788
|
+
* Trigger the shapeChanging event for after the shape applied.
|
|
2789
|
+
*
|
|
2790
|
+
* @param { ShapeChangeEventArgs } shapeChangedArgs - Specifies the shapeChaning event args.
|
|
2791
|
+
* @hidden
|
|
2792
|
+
* @returns {void}.
|
|
2793
|
+
*/
|
|
2794
|
+
ImageEditor.prototype.triggerShapeChanged = function (shapeChangedArgs) {
|
|
2795
|
+
if (isBlazor() && this.events && this.events.shapeChanged.hasDelegate === true) {
|
|
2796
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
2797
|
+
this.dotNetRef.invokeMethodAsync('ShapeEventAsync', 'ShapeChanged', shapeChangedArgs);
|
|
2798
|
+
}
|
|
2799
|
+
};
|
|
2693
2800
|
var ImageEditor_1;
|
|
2694
2801
|
__decorate([
|
|
2695
2802
|
Property('')
|
|
@@ -294,6 +294,11 @@
|
|
|
294
294
|
position: absolute;
|
|
295
295
|
font-size: 14px;
|
|
296
296
|
}
|
|
297
|
+
.e-image-editor .e-ie-drop-area .e-ie-min-drop-content {
|
|
298
|
+
left: calc(50% - 120px);
|
|
299
|
+
top: 50%;
|
|
300
|
+
font-size: 14px;
|
|
301
|
+
}
|
|
297
302
|
.e-image-editor .e-toolbar {
|
|
298
303
|
border: none;
|
|
299
304
|
height: 42px !important; /* stylelint-disable-line declaration-no-important */
|
package/styles/bootstrap.css
CHANGED
|
@@ -294,6 +294,11 @@
|
|
|
294
294
|
position: absolute;
|
|
295
295
|
font-size: 14px;
|
|
296
296
|
}
|
|
297
|
+
.e-image-editor .e-ie-drop-area .e-ie-min-drop-content {
|
|
298
|
+
left: calc(50% - 120px);
|
|
299
|
+
top: 50%;
|
|
300
|
+
font-size: 14px;
|
|
301
|
+
}
|
|
297
302
|
.e-image-editor .e-toolbar {
|
|
298
303
|
border: none;
|
|
299
304
|
height: 42px !important; /* stylelint-disable-line declaration-no-important */
|
package/styles/bootstrap4.css
CHANGED
|
@@ -293,6 +293,11 @@
|
|
|
293
293
|
position: absolute;
|
|
294
294
|
font-size: 14px;
|
|
295
295
|
}
|
|
296
|
+
.e-image-editor .e-ie-drop-area .e-ie-min-drop-content {
|
|
297
|
+
left: calc(50% - 120px);
|
|
298
|
+
top: 50%;
|
|
299
|
+
font-size: 14px;
|
|
300
|
+
}
|
|
296
301
|
.e-image-editor .e-toolbar {
|
|
297
302
|
border: none;
|
|
298
303
|
height: 40px !important; /* stylelint-disable-line declaration-no-important */
|
|
@@ -306,6 +306,11 @@
|
|
|
306
306
|
position: absolute;
|
|
307
307
|
font-size: 14px;
|
|
308
308
|
}
|
|
309
|
+
.e-image-editor .e-ie-drop-area .e-ie-min-drop-content {
|
|
310
|
+
left: calc(50% - 120px);
|
|
311
|
+
top: 50%;
|
|
312
|
+
font-size: 14px;
|
|
313
|
+
}
|
|
309
314
|
.e-image-editor .e-toolbar {
|
|
310
315
|
border: none;
|
|
311
316
|
height: 40px !important; /* stylelint-disable-line declaration-no-important */
|
package/styles/bootstrap5.css
CHANGED
|
@@ -306,6 +306,11 @@
|
|
|
306
306
|
position: absolute;
|
|
307
307
|
font-size: 14px;
|
|
308
308
|
}
|
|
309
|
+
.e-image-editor .e-ie-drop-area .e-ie-min-drop-content {
|
|
310
|
+
left: calc(50% - 120px);
|
|
311
|
+
top: 50%;
|
|
312
|
+
font-size: 14px;
|
|
313
|
+
}
|
|
309
314
|
.e-image-editor .e-toolbar {
|
|
310
315
|
border: none;
|
|
311
316
|
height: 40px !important; /* stylelint-disable-line declaration-no-important */
|
package/styles/fabric-dark.css
CHANGED
|
@@ -294,6 +294,11 @@
|
|
|
294
294
|
position: absolute;
|
|
295
295
|
font-size: 14px;
|
|
296
296
|
}
|
|
297
|
+
.e-image-editor .e-ie-drop-area .e-ie-min-drop-content {
|
|
298
|
+
left: calc(50% - 120px);
|
|
299
|
+
top: 50%;
|
|
300
|
+
font-size: 14px;
|
|
301
|
+
}
|
|
297
302
|
.e-image-editor .e-toolbar {
|
|
298
303
|
border: none;
|
|
299
304
|
height: 40px !important; /* stylelint-disable-line declaration-no-important */
|
package/styles/fabric.css
CHANGED
|
@@ -294,6 +294,11 @@
|
|
|
294
294
|
position: absolute;
|
|
295
295
|
font-size: 14px;
|
|
296
296
|
}
|
|
297
|
+
.e-image-editor .e-ie-drop-area .e-ie-min-drop-content {
|
|
298
|
+
left: calc(50% - 120px);
|
|
299
|
+
top: 50%;
|
|
300
|
+
font-size: 14px;
|
|
301
|
+
}
|
|
297
302
|
.e-image-editor .e-toolbar {
|
|
298
303
|
border: none;
|
|
299
304
|
height: 40px !important; /* stylelint-disable-line declaration-no-important */
|
package/styles/fluent-dark.css
CHANGED
|
@@ -302,6 +302,11 @@
|
|
|
302
302
|
position: absolute;
|
|
303
303
|
font-size: 14px;
|
|
304
304
|
}
|
|
305
|
+
.e-image-editor .e-ie-drop-area .e-ie-min-drop-content {
|
|
306
|
+
left: calc(50% - 120px);
|
|
307
|
+
top: 50%;
|
|
308
|
+
font-size: 14px;
|
|
309
|
+
}
|
|
305
310
|
.e-image-editor .e-toolbar {
|
|
306
311
|
border: none;
|
|
307
312
|
height: 40px !important; /* stylelint-disable-line declaration-no-important */
|
package/styles/fluent.css
CHANGED
|
@@ -302,6 +302,11 @@
|
|
|
302
302
|
position: absolute;
|
|
303
303
|
font-size: 14px;
|
|
304
304
|
}
|
|
305
|
+
.e-image-editor .e-ie-drop-area .e-ie-min-drop-content {
|
|
306
|
+
left: calc(50% - 120px);
|
|
307
|
+
top: 50%;
|
|
308
|
+
font-size: 14px;
|
|
309
|
+
}
|
|
305
310
|
.e-image-editor .e-toolbar {
|
|
306
311
|
border: none;
|
|
307
312
|
height: 40px !important; /* stylelint-disable-line declaration-no-important */
|
|
@@ -293,6 +293,11 @@
|
|
|
293
293
|
position: absolute;
|
|
294
294
|
font-size: 14px;
|
|
295
295
|
}
|
|
296
|
+
.e-image-editor .e-ie-drop-area .e-ie-min-drop-content {
|
|
297
|
+
left: calc(50% - 120px);
|
|
298
|
+
top: 50%;
|
|
299
|
+
font-size: 14px;
|
|
300
|
+
}
|
|
296
301
|
.e-image-editor .e-toolbar {
|
|
297
302
|
border: none;
|
|
298
303
|
height: 38px !important; /* stylelint-disable-line declaration-no-important */
|
package/styles/highcontrast.css
CHANGED
|
@@ -293,6 +293,11 @@
|
|
|
293
293
|
position: absolute;
|
|
294
294
|
font-size: 14px;
|
|
295
295
|
}
|
|
296
|
+
.e-image-editor .e-ie-drop-area .e-ie-min-drop-content {
|
|
297
|
+
left: calc(50% - 120px);
|
|
298
|
+
top: 50%;
|
|
299
|
+
font-size: 14px;
|
|
300
|
+
}
|
|
296
301
|
.e-image-editor .e-toolbar {
|
|
297
302
|
border: none;
|
|
298
303
|
height: 38px !important; /* stylelint-disable-line declaration-no-important */
|
|
@@ -294,6 +294,11 @@
|
|
|
294
294
|
position: absolute;
|
|
295
295
|
font-size: 14px;
|
|
296
296
|
}
|
|
297
|
+
.e-image-editor .e-ie-drop-area .e-ie-min-drop-content {
|
|
298
|
+
left: calc(50% - 120px);
|
|
299
|
+
top: 50%;
|
|
300
|
+
font-size: 14px;
|
|
301
|
+
}
|
|
297
302
|
.e-image-editor .e-toolbar {
|
|
298
303
|
border: none;
|
|
299
304
|
height: 42px !important; /* stylelint-disable-line declaration-no-important */
|
|
@@ -294,6 +294,11 @@
|
|
|
294
294
|
position: absolute;
|
|
295
295
|
font-size: 14px;
|
|
296
296
|
}
|
|
297
|
+
.e-image-editor .e-ie-drop-area .e-ie-min-drop-content {
|
|
298
|
+
left: calc(50% - 120px);
|
|
299
|
+
top: 50%;
|
|
300
|
+
font-size: 14px;
|
|
301
|
+
}
|
|
297
302
|
.e-image-editor .e-toolbar {
|
|
298
303
|
border: none;
|
|
299
304
|
height: 42px !important; /* stylelint-disable-line declaration-no-important */
|
|
@@ -293,6 +293,11 @@
|
|
|
293
293
|
position: absolute;
|
|
294
294
|
font-size: 14px;
|
|
295
295
|
}
|
|
296
|
+
.e-image-editor .e-ie-drop-area .e-ie-min-drop-content {
|
|
297
|
+
left: calc(50% - 120px);
|
|
298
|
+
top: 50%;
|
|
299
|
+
font-size: 14px;
|
|
300
|
+
}
|
|
296
301
|
.e-image-editor .e-toolbar {
|
|
297
302
|
border: none;
|
|
298
303
|
height: 40px !important; /* stylelint-disable-line declaration-no-important */
|
|
@@ -306,6 +306,11 @@
|
|
|
306
306
|
position: absolute;
|
|
307
307
|
font-size: 14px;
|
|
308
308
|
}
|
|
309
|
+
.e-image-editor .e-ie-drop-area .e-ie-min-drop-content {
|
|
310
|
+
left: calc(50% - 120px);
|
|
311
|
+
top: 50%;
|
|
312
|
+
font-size: 14px;
|
|
313
|
+
}
|
|
309
314
|
.e-image-editor .e-toolbar {
|
|
310
315
|
border: none;
|
|
311
316
|
height: 40px !important; /* stylelint-disable-line declaration-no-important */
|
|
@@ -306,6 +306,11 @@
|
|
|
306
306
|
position: absolute;
|
|
307
307
|
font-size: 14px;
|
|
308
308
|
}
|
|
309
|
+
.e-image-editor .e-ie-drop-area .e-ie-min-drop-content {
|
|
310
|
+
left: calc(50% - 120px);
|
|
311
|
+
top: 50%;
|
|
312
|
+
font-size: 14px;
|
|
313
|
+
}
|
|
309
314
|
.e-image-editor .e-toolbar {
|
|
310
315
|
border: none;
|
|
311
316
|
height: 40px !important; /* stylelint-disable-line declaration-no-important */
|
|
@@ -294,6 +294,11 @@
|
|
|
294
294
|
position: absolute;
|
|
295
295
|
font-size: 14px;
|
|
296
296
|
}
|
|
297
|
+
.e-image-editor .e-ie-drop-area .e-ie-min-drop-content {
|
|
298
|
+
left: calc(50% - 120px);
|
|
299
|
+
top: 50%;
|
|
300
|
+
font-size: 14px;
|
|
301
|
+
}
|
|
297
302
|
.e-image-editor .e-toolbar {
|
|
298
303
|
border: none;
|
|
299
304
|
height: 40px !important; /* stylelint-disable-line declaration-no-important */
|
|
@@ -294,6 +294,11 @@
|
|
|
294
294
|
position: absolute;
|
|
295
295
|
font-size: 14px;
|
|
296
296
|
}
|
|
297
|
+
.e-image-editor .e-ie-drop-area .e-ie-min-drop-content {
|
|
298
|
+
left: calc(50% - 120px);
|
|
299
|
+
top: 50%;
|
|
300
|
+
font-size: 14px;
|
|
301
|
+
}
|
|
297
302
|
.e-image-editor .e-toolbar {
|
|
298
303
|
border: none;
|
|
299
304
|
height: 40px !important; /* stylelint-disable-line declaration-no-important */
|
|
@@ -302,6 +302,11 @@
|
|
|
302
302
|
position: absolute;
|
|
303
303
|
font-size: 14px;
|
|
304
304
|
}
|
|
305
|
+
.e-image-editor .e-ie-drop-area .e-ie-min-drop-content {
|
|
306
|
+
left: calc(50% - 120px);
|
|
307
|
+
top: 50%;
|
|
308
|
+
font-size: 14px;
|
|
309
|
+
}
|
|
305
310
|
.e-image-editor .e-toolbar {
|
|
306
311
|
border: none;
|
|
307
312
|
height: 40px !important; /* stylelint-disable-line declaration-no-important */
|
|
@@ -302,6 +302,11 @@
|
|
|
302
302
|
position: absolute;
|
|
303
303
|
font-size: 14px;
|
|
304
304
|
}
|
|
305
|
+
.e-image-editor .e-ie-drop-area .e-ie-min-drop-content {
|
|
306
|
+
left: calc(50% - 120px);
|
|
307
|
+
top: 50%;
|
|
308
|
+
font-size: 14px;
|
|
309
|
+
}
|
|
305
310
|
.e-image-editor .e-toolbar {
|
|
306
311
|
border: none;
|
|
307
312
|
height: 40px !important; /* stylelint-disable-line declaration-no-important */
|
|
@@ -293,6 +293,11 @@
|
|
|
293
293
|
position: absolute;
|
|
294
294
|
font-size: 14px;
|
|
295
295
|
}
|
|
296
|
+
.e-image-editor .e-ie-drop-area .e-ie-min-drop-content {
|
|
297
|
+
left: calc(50% - 120px);
|
|
298
|
+
top: 50%;
|
|
299
|
+
font-size: 14px;
|
|
300
|
+
}
|
|
296
301
|
.e-image-editor .e-toolbar {
|
|
297
302
|
border: none;
|
|
298
303
|
height: 38px !important; /* stylelint-disable-line declaration-no-important */
|
|
@@ -293,6 +293,11 @@
|
|
|
293
293
|
position: absolute;
|
|
294
294
|
font-size: 14px;
|
|
295
295
|
}
|
|
296
|
+
.e-image-editor .e-ie-drop-area .e-ie-min-drop-content {
|
|
297
|
+
left: calc(50% - 120px);
|
|
298
|
+
top: 50%;
|
|
299
|
+
font-size: 14px;
|
|
300
|
+
}
|
|
296
301
|
.e-image-editor .e-toolbar {
|
|
297
302
|
border: none;
|
|
298
303
|
height: 38px !important; /* stylelint-disable-line declaration-no-important */
|
|
@@ -302,6 +302,11 @@
|
|
|
302
302
|
position: absolute;
|
|
303
303
|
font-size: 14px;
|
|
304
304
|
}
|
|
305
|
+
.e-image-editor .e-ie-drop-area .e-ie-min-drop-content {
|
|
306
|
+
left: calc(50% - 120px);
|
|
307
|
+
top: 50%;
|
|
308
|
+
font-size: 14px;
|
|
309
|
+
}
|
|
305
310
|
.e-image-editor .e-toolbar {
|
|
306
311
|
border: none;
|
|
307
312
|
height: 40px !important; /* stylelint-disable-line declaration-no-important */
|
|
@@ -307,6 +307,11 @@
|
|
|
307
307
|
position: absolute;
|
|
308
308
|
font-size: 14px;
|
|
309
309
|
}
|
|
310
|
+
.e-image-editor .e-ie-drop-area .e-ie-min-drop-content {
|
|
311
|
+
left: calc(50% - 120px);
|
|
312
|
+
top: 50%;
|
|
313
|
+
font-size: 14px;
|
|
314
|
+
}
|
|
310
315
|
.e-image-editor .e-toolbar {
|
|
311
316
|
border: none;
|
|
312
317
|
height: 40px !important; /* stylelint-disable-line declaration-no-important */
|