@leafer-in/editor 1.4.2 → 1.5.0

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/types/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { IBounds, ILeafList, IUI, IFunction, IEventListenerId, ILeaf, IPointerEvent, ILeaferCanvas, IRenderOptions, IGroup, IObject, IPointData, ILayoutBoundsData, IGroupInputData, IEditSize, IAlign, IAxis, IMatrix, IBox, IBoundsData, IEditorConfig as IEditorConfig$1, IBoxInputData, IKeyEvent, IRect, IRectInputData, IMatrixData, IDragEvent, IAround } from '@leafer-ui/interface';
1
+ import { IBounds, ILeafList, IUI, IFunction, IEventListenerId, ILeaf, IPointerEvent, ILeaferCanvas, IRenderOptions, IGroup, IObject, IGroupInputData, IEditSize, IPointData, IAlign, IAxis, IMatrix, IBox, IEditorDragStartData, IBoundsData, IEditorConfig as IEditorConfig$1, IBoxInputData, IKeyEvent, IRect, IRectInputData, IMatrixData, IDragEvent, IAround, ILayoutBoundsData } from '@leafer-ui/interface';
2
2
  import { Group, UI, Direction9, Event, Box } from '@leafer-ui/draw';
3
3
  import { PointerEvent, DragEvent, MoveEvent, ZoomEvent, RotateEvent } from '@leafer-ui/core';
4
- import { IEditSelect, IEditor, IStroker, ISelectArea, IEditorConfig, ISimulateElement, IEditBox, IEditTool, IInnerEditor, IEditorScaleEvent, IEditorEvent, IEditPoint, IEditPointType, IEditorMoveEvent, IEditorRotateEvent, IEditorSkewEvent, IEditorGroupEvent, IInnerEditorEvent, IUI as IUI$1, IDragEvent as IDragEvent$1, IPointData as IPointData$1, IPathCommandData, IFromToData, IAround as IAround$1 } from '@leafer-in/interface';
4
+ import { IEditSelect, IEditor, IStroker, ISelectArea, IEditorConfig, IEditPoint, ISimulateElement, IEditBox, IEditTool, IInnerEditor, IEditorScaleEvent, IEditorEvent, IEditPointType, IEditorMoveEvent, IEditorRotateEvent, IEditorSkewEvent, IEditorGroupEvent, IInnerEditorEvent, IUI as IUI$1, IDragEvent as IDragEvent$1, IPointData as IPointData$1, IPathCommandData, IFromToData, IAround as IAround$1 } from '@leafer-in/interface';
5
5
 
6
6
  declare class EditSelect extends Group implements IEditSelect {
7
7
  editor: IEditor;
@@ -63,6 +63,7 @@ declare class Editor extends Group implements IEditor {
63
63
  get single(): boolean;
64
64
  get dragging(): boolean;
65
65
  get moving(): boolean;
66
+ get dragPoint(): IEditPoint;
66
67
  get element(): ISimulateElement;
67
68
  simulateTarget: ISimulateElement;
68
69
  editBox: IEditBox;
@@ -72,8 +73,6 @@ declare class Editor extends Group implements IEditor {
72
73
  editToolList: IObject;
73
74
  selector: EditSelect;
74
75
  editMask: EditMask;
75
- dragStartPoint: IPointData;
76
- dragStartBounds: ILayoutBoundsData;
77
76
  targetEventIds: IEventListenerId[];
78
77
  constructor(userConfig?: IEditorConfig, data?: IGroupInputData);
79
78
  select(target: IUI | IUI[]): void;
@@ -105,7 +104,7 @@ declare class Editor extends Group implements IEditor {
105
104
  closeGroup(group: IGroup): void;
106
105
  checkOpenedGroups(): void;
107
106
  checkDeepSelect(): void;
108
- emitGroupEvent(type: string, group: IGroup): void;
107
+ emitGroupEvent(type: string, group?: IGroup): void;
109
108
  openInnerEditor(target?: IUI, select?: boolean): void;
110
109
  closeInnerEditor(): void;
111
110
  emitInnerEvent(type: string): void;
@@ -143,11 +142,13 @@ declare class EditBox extends Group implements IEditBox {
143
142
  resizePoints: IEditPoint[];
144
143
  rotatePoints: IEditPoint[];
145
144
  resizeLines: IEditPoint[];
145
+ enterPoint: IEditPoint;
146
+ dragPoint: IEditPoint;
147
+ dragStartData: IEditorDragStartData;
146
148
  get flipped(): boolean;
147
149
  get flippedX(): boolean;
148
150
  get flippedY(): boolean;
149
151
  get flippedOne(): boolean;
150
- enterPoint: IEditPoint;
151
152
  protected __eventIds: IEventListenerId[];
152
153
  constructor(editor: IEditor);
153
154
  create(): void;
@@ -198,6 +199,7 @@ declare class Stroker extends UI implements IStroker {
198
199
  }
199
200
 
200
201
  declare class EditorMoveEvent extends EditorEvent implements IEditorMoveEvent {
202
+ static BEFORE_MOVE: string;
201
203
  static MOVE: string;
202
204
  readonly moveX: number;
203
205
  readonly moveY: number;
@@ -205,6 +207,7 @@ declare class EditorMoveEvent extends EditorEvent implements IEditorMoveEvent {
205
207
  }
206
208
 
207
209
  declare class EditorScaleEvent extends EditorEvent implements IEditorScaleEvent {
210
+ static BEFORE_SCALE: string;
208
211
  static SCALE: string;
209
212
  readonly scaleX: number;
210
213
  readonly scaleY: number;
@@ -217,12 +220,14 @@ declare class EditorScaleEvent extends EditorEvent implements IEditorScaleEvent
217
220
  }
218
221
 
219
222
  declare class EditorRotateEvent extends EditorEvent implements IEditorRotateEvent {
223
+ static BEFORE_ROTATE: string;
220
224
  static ROTATE: string;
221
225
  readonly rotation: number;
222
226
  constructor(type: string, data?: IEditorRotateEvent);
223
227
  }
224
228
 
225
229
  declare class EditorSkewEvent extends EditorEvent implements IEditorSkewEvent {
230
+ static BEFORE_SKEW: string;
226
231
  static SKEW: string;
227
232
  readonly skewX: number;
228
233
  readonly skewY: number;
@@ -230,10 +235,13 @@ declare class EditorSkewEvent extends EditorEvent implements IEditorSkewEvent {
230
235
  }
231
236
 
232
237
  declare class EditorGroupEvent extends EditorEvent implements IEditorGroupEvent {
238
+ static BEFORE_GROUP: string;
233
239
  static GROUP: string;
234
240
  static BEFORE_UNGROUP: string;
235
241
  static UNGROUP: string;
242
+ static BEFORE_OPEN: string;
236
243
  static OPEN: string;
244
+ static BEFORE_CLOSE: string;
237
245
  static CLOSE: string;
238
246
  readonly editTarget: IGroup;
239
247
  constructor(type: string, data?: IEditorGroupEvent);