@syncfusion/ej2-image-editor 25.2.4 → 26.1.38
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/.eslintrc.json +3 -2
- 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 +2691 -830
- package/dist/es6/ej2-image-editor.es2015.js.map +1 -1
- package/dist/es6/ej2-image-editor.es5.js +2788 -887
- 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 +13 -12
- package/src/image-editor/action/crop.d.ts +0 -1
- package/src/image-editor/action/crop.js +35 -77
- package/src/image-editor/action/draw.d.ts +3 -0
- package/src/image-editor/action/draw.js +198 -83
- package/src/image-editor/action/export.d.ts +3 -0
- package/src/image-editor/action/export.js +99 -41
- package/src/image-editor/action/filter.d.ts +0 -1
- package/src/image-editor/action/filter.js +4 -24
- package/src/image-editor/action/freehand-draw.js +30 -8
- package/src/image-editor/action/selection.d.ts +10 -0
- package/src/image-editor/action/selection.js +444 -99
- package/src/image-editor/action/shape.d.ts +11 -1
- package/src/image-editor/action/shape.js +520 -127
- package/src/image-editor/action/transform.d.ts +0 -1
- package/src/image-editor/action/transform.js +53 -69
- package/src/image-editor/action/undo-redo.d.ts +2 -0
- package/src/image-editor/action/undo-redo.js +114 -29
- package/src/image-editor/base/enum.d.ts +5 -1
- package/src/image-editor/base/enum.js +4 -0
- package/src/image-editor/base/image-editor-model.d.ts +8 -6
- package/src/image-editor/base/image-editor.d.ts +116 -7
- package/src/image-editor/base/image-editor.js +385 -53
- package/src/image-editor/base/interface.d.ts +17 -0
- package/src/image-editor/base/interface.js +0 -1
- package/src/image-editor/renderer/toolbar.d.ts +14 -1
- package/src/image-editor/renderer/toolbar.js +831 -191
- package/styles/bootstrap-dark.css +279 -97
- package/styles/bootstrap-dark.scss +13 -1
- package/styles/bootstrap.css +282 -98
- package/styles/bootstrap.scss +13 -1
- package/styles/bootstrap4.css +280 -97
- package/styles/bootstrap4.scss +13 -1
- package/styles/bootstrap5-dark.css +280 -101
- package/styles/bootstrap5-dark.scss +13 -1
- package/styles/bootstrap5.css +280 -101
- package/styles/bootstrap5.scss +13 -1
- package/styles/fabric-dark.css +281 -97
- package/styles/fabric-dark.scss +13 -1
- package/styles/fabric.css +284 -97
- package/styles/fabric.scss +13 -1
- package/styles/fluent-dark.css +287 -101
- package/styles/fluent-dark.scss +13 -1
- package/styles/fluent.css +287 -101
- package/styles/fluent.scss +13 -1
- package/styles/fluent2.css +1852 -0
- package/styles/fluent2.scss +13 -0
- package/styles/highcontrast-light.css +279 -97
- package/styles/highcontrast-light.scss +13 -1
- package/styles/highcontrast.css +284 -97
- package/styles/highcontrast.scss +13 -1
- package/styles/image-editor/_bds-definition.scss +5 -0
- package/styles/image-editor/_bootstrap-dark-definition.scss +5 -0
- package/styles/image-editor/_bootstrap-definition.scss +5 -0
- package/styles/image-editor/_bootstrap4-definition.scss +5 -0
- package/styles/image-editor/_bootstrap5-definition.scss +5 -0
- package/styles/image-editor/_bootstrap5.3-definition.scss +26 -0
- package/styles/image-editor/_fabric-dark-definition.scss +5 -0
- package/styles/image-editor/_fabric-definition.scss +5 -0
- package/styles/image-editor/_fluent-definition.scss +5 -0
- package/styles/image-editor/_fluent2-definition.scss +26 -0
- package/styles/image-editor/_fusionnew-definition.scss +5 -0
- package/styles/image-editor/_highcontrast-definition.scss +5 -0
- package/styles/image-editor/_highcontrast-light-definition.scss +5 -0
- package/styles/image-editor/_layout.scss +355 -13
- package/styles/image-editor/_material-dark-definition.scss +5 -0
- package/styles/image-editor/_material-definition.scss +5 -0
- package/styles/image-editor/_material3-definition.scss +5 -0
- package/styles/image-editor/_tailwind-definition.scss +5 -0
- package/styles/image-editor/bootstrap-dark.css +279 -97
- package/styles/image-editor/bootstrap.css +282 -98
- package/styles/image-editor/bootstrap4.css +280 -97
- package/styles/image-editor/bootstrap5-dark.css +280 -101
- package/styles/image-editor/bootstrap5.css +280 -101
- package/styles/image-editor/fabric-dark.css +281 -97
- package/styles/image-editor/fabric.css +284 -97
- package/styles/image-editor/fluent-dark.css +287 -101
- package/styles/image-editor/fluent.css +287 -101
- package/styles/image-editor/fluent2.css +1852 -0
- package/styles/image-editor/fluent2.scss +13 -0
- package/styles/image-editor/highcontrast-light.css +279 -97
- package/styles/image-editor/highcontrast.css +284 -97
- package/styles/image-editor/icons/_bds.scss +1 -162
- package/styles/image-editor/icons/_bootstrap-dark.scss +1 -162
- package/styles/image-editor/icons/_bootstrap.scss +1 -162
- package/styles/image-editor/icons/_bootstrap4.scss +1 -162
- package/styles/image-editor/icons/_bootstrap5.3.scss +250 -0
- package/styles/image-editor/icons/_bootstrap5.scss +1 -168
- package/styles/image-editor/icons/_fabric-dark.scss +1 -162
- package/styles/image-editor/icons/_fabric.scss +1 -162
- package/styles/image-editor/icons/_fluent.scss +1 -168
- package/styles/image-editor/icons/_fluent2.scss +256 -0
- package/styles/image-editor/icons/_fusionnew.scss +1 -138
- package/styles/image-editor/icons/_highcontrast-light.scss +1 -162
- package/styles/image-editor/icons/_highcontrast.scss +1 -162
- package/styles/image-editor/icons/_material-dark.scss +2 -163
- package/styles/image-editor/icons/_material.scss +1 -162
- package/styles/image-editor/icons/_material3.scss +2 -169
- package/styles/image-editor/icons/_tailwind.scss +1 -162
- package/styles/image-editor/material-dark.css +299 -100
- package/styles/image-editor/material.css +302 -100
- package/styles/image-editor/material3-dark.css +314 -103
- package/styles/image-editor/material3.css +314 -103
- package/styles/image-editor/tailwind-dark.css +284 -97
- package/styles/image-editor/tailwind.css +284 -97
- package/styles/material-dark.css +299 -100
- package/styles/material-dark.scss +13 -1
- package/styles/material.css +302 -100
- package/styles/material.scss +13 -1
- package/styles/material3-dark.css +314 -103
- package/styles/material3-dark.scss +13 -1
- package/styles/material3.css +314 -103
- package/styles/material3.scss +13 -1
- package/styles/tailwind-dark.css +284 -97
- package/styles/tailwind-dark.scss +13 -1
- package/styles/tailwind.css +284 -97
- package/styles/tailwind.scss +13 -1
- package/CHANGELOG.md +0 -289
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, NotifyPropertyChanges, INotifyPropertyChanged, Property, addClass, removeClass, ModuleDeclaration, extend } from '@syncfusion/ej2-base';
|
|
1
|
+
import { Component, NotifyPropertyChanges, INotifyPropertyChanged, Property, addClass, removeClass, ModuleDeclaration, extend } from '@syncfusion/ej2-base';
|
|
2
2
|
import {ComponentModel} from '@syncfusion/ej2-base';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -265,6 +265,7 @@ export interface ImageEditorModel extends ComponentModel{
|
|
|
265
265
|
* - `MaterialDark`
|
|
266
266
|
* - `FabricDark`
|
|
267
267
|
* - `HighContrastDark`
|
|
268
|
+
* - `Fluent2`
|
|
268
269
|
*
|
|
269
270
|
* The default value is set to `Theme.Bootstrap5`.
|
|
270
271
|
*
|
|
@@ -618,8 +619,9 @@ export interface ImageEditorModel extends ComponentModel{
|
|
|
618
619
|
click?: EmitType<ImageEditorClickEventArgs>
|
|
619
620
|
|
|
620
621
|
/**
|
|
621
|
-
* Event callback that is raised after shape changing action is performed in an image editor.
|
|
622
|
-
*
|
|
622
|
+
* Event callback that is raised after shape changing action is performed in an image editor.
|
|
623
|
+
*
|
|
624
|
+
* @remarks
|
|
623
625
|
* This event is triggered after changing stroke color, fill Color, and stroke width property for the shapes and after the shape is applied to the canvas while clicking the OK button in toolbar.
|
|
624
626
|
*
|
|
625
627
|
* @event shapeChange
|
|
@@ -656,10 +658,10 @@ export interface ImageEditorModel extends ComponentModel{
|
|
|
656
658
|
quickAccessToolbarOpen?: EmitType<QuickAccessToolbarEventArgs>
|
|
657
659
|
|
|
658
660
|
/**
|
|
659
|
-
* Event callback that is raised while resizing an image.
|
|
661
|
+
* Event callback that is raised while resizing an image.
|
|
660
662
|
*
|
|
661
|
-
* @event resizing
|
|
662
|
-
*/
|
|
663
|
+
* @event resizing
|
|
664
|
+
*/
|
|
663
665
|
resizing?: EmitType<ResizeEventArgs>
|
|
664
666
|
|
|
665
667
|
/**
|
|
@@ -3,7 +3,7 @@ import { EmitType } from '@syncfusion/ej2-base';
|
|
|
3
3
|
import { ItemModel, ClickEventArgs } from '@syncfusion/ej2-navigations';
|
|
4
4
|
import { ChildProperty } from '@syncfusion/ej2-base';
|
|
5
5
|
import { ImageEditorModel, FinetuneSettingsModel, ZoomSettingsModel, SelectionSettingsModel, FontFamilyModel } from './image-editor-model';
|
|
6
|
-
import { SelectionChangeEventArgs, Transition, ArrowheadType, ResizeEventArgs, FrameType, FrameLineStyle, FrameChangeEventArgs } from './../index';
|
|
6
|
+
import { SelectionChangeEventArgs, Transition, ArrowheadType, ResizeEventArgs, FrameType, FrameLineStyle, FrameChangeEventArgs, ShapeType } from './../index';
|
|
7
7
|
import { ZoomEventArgs, PanEventArgs, CropEventArgs, RotateEventArgs, FlipEventArgs, ShapeChangeEventArgs } from './../index';
|
|
8
8
|
import { ToolbarEventArgs, OpenEventArgs, SaveEventArgs, BeforeSaveEventArgs, Point, ShapeSettings, ImageFilterEventArgs } from './../index';
|
|
9
9
|
import { FinetuneEventArgs, QuickAccessToolbarEventArgs, CurrentObject, ImageDimension, TransformValue, PanPoint } from './../index';
|
|
@@ -362,6 +362,18 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
|
|
|
362
362
|
curFrameObjEvent: object;
|
|
363
363
|
/** @hidden */
|
|
364
364
|
isChangesSaved: boolean;
|
|
365
|
+
/** @hidden */
|
|
366
|
+
drawingShape: string;
|
|
367
|
+
/** @hidden */
|
|
368
|
+
isShapeDrawing: boolean;
|
|
369
|
+
/** @hidden */
|
|
370
|
+
noPushUndo: boolean;
|
|
371
|
+
/** @hidden */
|
|
372
|
+
isUndoRedoStack: boolean;
|
|
373
|
+
/** @hidden */
|
|
374
|
+
shapeColl: any;
|
|
375
|
+
/** @hidden */
|
|
376
|
+
imgSrc: string;
|
|
365
377
|
private lowerContext;
|
|
366
378
|
private upperContext;
|
|
367
379
|
private inMemoryContext;
|
|
@@ -412,6 +424,7 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
|
|
|
412
424
|
* - `MaterialDark`
|
|
413
425
|
* - `FabricDark`
|
|
414
426
|
* - `HighContrastDark`
|
|
427
|
+
* - `Fluent2`
|
|
415
428
|
*
|
|
416
429
|
* The default value is set to `Theme.Bootstrap5`.
|
|
417
430
|
*
|
|
@@ -734,6 +747,7 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
|
|
|
734
747
|
click: EmitType<ImageEditorClickEventArgs>;
|
|
735
748
|
/**
|
|
736
749
|
* Event callback that is raised after shape changing action is performed in an image editor.
|
|
750
|
+
*
|
|
737
751
|
* @remarks
|
|
738
752
|
* This event is triggered after changing stroke color, fill Color, and stroke width property for the shapes and after the shape is applied to the canvas while clicking the OK button in toolbar.
|
|
739
753
|
*
|
|
@@ -1119,10 +1133,11 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
|
|
|
1119
1133
|
* @param {boolean} italic - Specifies whether the text is italic or not.
|
|
1120
1134
|
* @param {string} color - Specifies font color of the text.
|
|
1121
1135
|
* @param {boolean} isSelected - Specifies to show the text in the selected state.
|
|
1136
|
+
* @param {number} degree - Specifies the degree to rotate the text.
|
|
1122
1137
|
* @returns {boolean}.
|
|
1123
1138
|
*
|
|
1124
1139
|
*/
|
|
1125
|
-
drawText(x?: number, y?: number, text?: string, fontFamily?: string, fontSize?: number, bold?: boolean, italic?: boolean, color?: string, isSelected?: boolean): boolean;
|
|
1140
|
+
drawText(x?: number, y?: number, text?: string, fontFamily?: string, fontSize?: number, bold?: boolean, italic?: boolean, color?: string, isSelected?: boolean, degree?: number): boolean;
|
|
1126
1141
|
/**
|
|
1127
1142
|
* Draw an image as annotation on an image.
|
|
1128
1143
|
*
|
|
@@ -1320,6 +1335,79 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
|
|
|
1320
1335
|
*
|
|
1321
1336
|
*/
|
|
1322
1337
|
canRedo(): boolean;
|
|
1338
|
+
/**
|
|
1339
|
+
* Applies the operations performed in the Image Editor, such as annotation drawings.
|
|
1340
|
+
*
|
|
1341
|
+
* @returns{void}
|
|
1342
|
+
* @remarks
|
|
1343
|
+
* This method applies the actions performed after enabling annotation drawings, ensuring that the drawn annotations are applied to the image.
|
|
1344
|
+
*/
|
|
1345
|
+
apply(): void;
|
|
1346
|
+
/**
|
|
1347
|
+
* Discards the operations performed in the Image Editor, such as annotation drawings.
|
|
1348
|
+
*
|
|
1349
|
+
* @returns{void}
|
|
1350
|
+
* @remarks
|
|
1351
|
+
* This method discards the actions performed after enabling annotation drawings, ensuring that the drawn annotations are not applied to the image.
|
|
1352
|
+
*/
|
|
1353
|
+
discard(): void;
|
|
1354
|
+
/**
|
|
1355
|
+
* Enable or disable a shape drawing option in an Image Editor.
|
|
1356
|
+
*
|
|
1357
|
+
* @param {ShapeType} shapeType - Specifies the type of shape to be enabled or disabled for drawing.
|
|
1358
|
+
* @param {boolean} isEnabled - Optional. Specifies a value to indicate whether to enable or disable shape drawing. The default value is true.
|
|
1359
|
+
*
|
|
1360
|
+
* @remarks This function allows the user to toggle the shape drawing feature in the Image Editor. When enabled, users can draw shapes on the image. When disabled, the shape drawing functionality is not available.
|
|
1361
|
+
*
|
|
1362
|
+
* @returns {void}.
|
|
1363
|
+
*/
|
|
1364
|
+
enableShapeDrawing(shapeType: ShapeType, isEnabled: boolean): void;
|
|
1365
|
+
/**
|
|
1366
|
+
* Moves a shape to the front of all other shapes based on the given shape id.
|
|
1367
|
+
* Use 'getShapeSettings' method to get the shape id which is then passed to perform moving.
|
|
1368
|
+
*
|
|
1369
|
+
* @param {string} shapeId - Specifies the shape id to move the shape on an image.
|
|
1370
|
+
* @returns {void}.
|
|
1371
|
+
*
|
|
1372
|
+
*/
|
|
1373
|
+
bringToFront(shapeId: string): void;
|
|
1374
|
+
/**
|
|
1375
|
+
* Moves a shape to ahead of one shape based on the given shape id.
|
|
1376
|
+
* Use 'getShapeSettings' method to get the shape id which is then passed to perform moving.
|
|
1377
|
+
*
|
|
1378
|
+
* @param {string} shapeId - Specifies the shape id to move the shape on an image.
|
|
1379
|
+
* @returns {void}.
|
|
1380
|
+
*
|
|
1381
|
+
*/
|
|
1382
|
+
bringForward(shapeId: string): void;
|
|
1383
|
+
/**
|
|
1384
|
+
* Moves a shape to behind all other shapes based on the given shape id.
|
|
1385
|
+
* Use 'getShapeSettings' method to get the shape id which is then passed to perform moving.
|
|
1386
|
+
*
|
|
1387
|
+
* @param {string} shapeId - Specifies the shape id to move the shape on an image.
|
|
1388
|
+
* @returns {void}.
|
|
1389
|
+
*
|
|
1390
|
+
*/
|
|
1391
|
+
sendToBack(shapeId: string): void;
|
|
1392
|
+
/**
|
|
1393
|
+
* Moves a shape to behind one shape based on the given shape id.
|
|
1394
|
+
* Use 'getShapeSettings' method to get the shape id which is then passed to perform moving.
|
|
1395
|
+
*
|
|
1396
|
+
* @param {string} shapeId - Specifies the shape id to move the shape on an image.
|
|
1397
|
+
* @returns {void}.
|
|
1398
|
+
*
|
|
1399
|
+
*/
|
|
1400
|
+
sendBackward(shapeId: string): void;
|
|
1401
|
+
/**
|
|
1402
|
+
* Clears the loaded image in the Image Editor.
|
|
1403
|
+
*
|
|
1404
|
+
* @returns{void}
|
|
1405
|
+
* @remarks
|
|
1406
|
+
* This method clears the loaded image and updates the component's user interface to its initial state (the initial user interface without a loaded image).
|
|
1407
|
+
*/
|
|
1408
|
+
clearImage(): void;
|
|
1409
|
+
private applyShapes;
|
|
1410
|
+
private closeOverlayTbar;
|
|
1323
1411
|
private toolbarTemplateFn;
|
|
1324
1412
|
private quickAccessToolbarTemplateFn;
|
|
1325
1413
|
private templateParser;
|
|
@@ -1359,10 +1447,19 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
|
|
|
1359
1447
|
* Handles the OK button operation
|
|
1360
1448
|
*
|
|
1361
1449
|
* @param { boolean } isMouseDown - Specifies whether it is a mouse down.
|
|
1450
|
+
* @param { boolean } isFinalApply - Specifies whether it is a final apply.
|
|
1362
1451
|
* @hidden
|
|
1363
1452
|
* @returns {void}.
|
|
1364
1453
|
*/
|
|
1365
|
-
okBtn(isMouseDown?: boolean): void;
|
|
1454
|
+
okBtn(isMouseDown?: boolean, isFinalApply?: boolean): void;
|
|
1455
|
+
/**
|
|
1456
|
+
* Handles the OK button operation
|
|
1457
|
+
*
|
|
1458
|
+
* @param { string } id - Specifies shape id to return.
|
|
1459
|
+
* @hidden
|
|
1460
|
+
* @returns {SelectionPoint | Object}.
|
|
1461
|
+
*/
|
|
1462
|
+
getObjFromId(id: string): SelectionPoint | Object;
|
|
1366
1463
|
/**
|
|
1367
1464
|
* Set the temporary filter properties.
|
|
1368
1465
|
*
|
|
@@ -1514,7 +1611,6 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
|
|
|
1514
1611
|
* Apply rotate image.
|
|
1515
1612
|
*
|
|
1516
1613
|
* @param { string } rotate - Specifies the direction of rotation.
|
|
1517
|
-
* @param { boolean } isPreventURC - Specifies to update undo redo collection.
|
|
1518
1614
|
* @hidden
|
|
1519
1615
|
* @returns {void}.
|
|
1520
1616
|
*/
|
|
@@ -1553,10 +1649,11 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
|
|
|
1553
1649
|
/**
|
|
1554
1650
|
* Performs Straightening action.
|
|
1555
1651
|
*
|
|
1652
|
+
* @param { number } value - Specifies the degree of straightening.
|
|
1556
1653
|
* @hidden
|
|
1557
|
-
* @returns {void}.
|
|
1654
|
+
* @returns {void} .
|
|
1558
1655
|
*/
|
|
1559
|
-
setStraighten(value: number
|
|
1656
|
+
setStraighten(value: number): void;
|
|
1560
1657
|
private duplicateImage;
|
|
1561
1658
|
private performStraighten;
|
|
1562
1659
|
/**
|
|
@@ -1569,10 +1666,22 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
|
|
|
1569
1666
|
/**
|
|
1570
1667
|
* Returns rotated canvas dimension.
|
|
1571
1668
|
*
|
|
1669
|
+
* @param { number } width - Specifies the width of the canvas.
|
|
1670
|
+
* @param { number } height - Specifies the height of the canvas.
|
|
1671
|
+
* @param { number } angle - Specifies the angle of rotation in degrees.
|
|
1572
1672
|
* @hidden
|
|
1573
|
-
* @returns {void}.
|
|
1673
|
+
* @returns {void} .
|
|
1574
1674
|
*/
|
|
1575
1675
|
getRotatedCanvasDim(width: number, height: number, angle: number): Dimension;
|
|
1676
|
+
/**
|
|
1677
|
+
* Apply Shape order.
|
|
1678
|
+
*
|
|
1679
|
+
* @param { string } id - Specifies the id of the shape to change the order.
|
|
1680
|
+
* @param { string } value - Specifies the order of the shapes.
|
|
1681
|
+
* @hidden
|
|
1682
|
+
* @returns {void}.
|
|
1683
|
+
*/
|
|
1684
|
+
updateShapeOrder(id: string, value: string): void;
|
|
1576
1685
|
private getStraightenFlipState;
|
|
1577
1686
|
private initializeZoomSettings;
|
|
1578
1687
|
private initializeThemeColl;
|