@leafer/interface 1.0.0-rc.21 → 1.0.0-rc.22
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/package.json +1 -1
- package/src/data/IData.ts +6 -0
- package/src/display/ILeaf.ts +14 -9
- package/src/function/IFunction.ts +9 -0
- package/src/index.ts +4 -4
- package/src/interaction/IInteraction.ts +3 -1
- package/src/selector/ISelector.ts +6 -0
- package/types/index.d.ts +117 -100
package/package.json
CHANGED
package/src/data/IData.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { IPointData } from '../math/IMath'
|
|
2
|
+
|
|
1
3
|
export type INumber = number // number | string will convert to number
|
|
2
4
|
export type IBoolean = boolean // boolean | string will convert to boolean
|
|
3
5
|
export type IString = string // string | other will convert to string
|
|
@@ -24,6 +26,10 @@ export interface IStringMap {
|
|
|
24
26
|
[name: string]: string
|
|
25
27
|
}
|
|
26
28
|
|
|
29
|
+
export interface IPointDataMap {
|
|
30
|
+
[name: string]: IPointData
|
|
31
|
+
}
|
|
32
|
+
|
|
27
33
|
export interface IDataTypeHandle {
|
|
28
34
|
(target: any): void
|
|
29
35
|
}
|
package/src/display/ILeaf.ts
CHANGED
|
@@ -62,7 +62,8 @@ export interface ILeafAttrData {
|
|
|
62
62
|
lazy: IBoolean
|
|
63
63
|
pixelRatio: INumber
|
|
64
64
|
|
|
65
|
-
draggable: IBoolean
|
|
65
|
+
draggable: IBoolean | 'x' | 'y'
|
|
66
|
+
dragBounds?: IBoundsData | 'parent'
|
|
66
67
|
|
|
67
68
|
path: IPathCommandData | IPathString
|
|
68
69
|
windingRule: IWindingRule
|
|
@@ -70,7 +71,6 @@ export interface ILeafAttrData {
|
|
|
70
71
|
|
|
71
72
|
editable: IBoolean
|
|
72
73
|
editSize: IEditSize
|
|
73
|
-
editorStyle: IObject
|
|
74
74
|
|
|
75
75
|
hittable: IBoolean
|
|
76
76
|
hitFill: IHitType
|
|
@@ -137,7 +137,7 @@ export interface IImageCursor {
|
|
|
137
137
|
rotation?: number
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
export type
|
|
140
|
+
export type IDirection =
|
|
141
141
|
| 'topLeft'
|
|
142
142
|
| 'top'
|
|
143
143
|
| 'topRight'
|
|
@@ -147,6 +147,9 @@ export type IAround =
|
|
|
147
147
|
| 'bottomLeft'
|
|
148
148
|
| 'left'
|
|
149
149
|
| 'center'
|
|
150
|
+
|
|
151
|
+
export type IAround =
|
|
152
|
+
| IDirection
|
|
150
153
|
| IPointData
|
|
151
154
|
|
|
152
155
|
export type ICursorType =
|
|
@@ -233,7 +236,8 @@ export interface ILeafInputData {
|
|
|
233
236
|
lazy?: IBoolean
|
|
234
237
|
pixelRatio?: INumber
|
|
235
238
|
|
|
236
|
-
draggable?: IBoolean
|
|
239
|
+
draggable?: IBoolean | 'x' | 'y'
|
|
240
|
+
dragBounds?: IBoundsData | 'parent'
|
|
237
241
|
|
|
238
242
|
path?: IPathCommandData | IPathString
|
|
239
243
|
windingRule?: IWindingRule
|
|
@@ -241,7 +245,6 @@ export interface ILeafInputData {
|
|
|
241
245
|
|
|
242
246
|
editable?: IBoolean
|
|
243
247
|
editSize?: IEditSize
|
|
244
|
-
editorStyle?: IObject
|
|
245
248
|
|
|
246
249
|
hittable?: IBoolean
|
|
247
250
|
hitFill?: IHitType
|
|
@@ -303,11 +306,11 @@ export interface ILeafComputedData {
|
|
|
303
306
|
windingRule?: IWindingRule
|
|
304
307
|
closed?: boolean
|
|
305
308
|
|
|
306
|
-
draggable?: boolean
|
|
309
|
+
draggable?: boolean | 'x' | 'y'
|
|
310
|
+
dragBounds?: IBoundsData | 'parent'
|
|
307
311
|
|
|
308
312
|
editable?: boolean
|
|
309
313
|
editSize?: IEditSize
|
|
310
|
-
editorStyle?: IObject
|
|
311
314
|
|
|
312
315
|
hittable?: boolean
|
|
313
316
|
hitFill?: IHitType
|
|
@@ -365,6 +368,8 @@ export interface ILeaf extends ILeafRender, ILeafHit, ILeafBounds, ILeafMatrix,
|
|
|
365
368
|
proxyData?: ILeafInputData
|
|
366
369
|
__proxyData?: ILeafInputData
|
|
367
370
|
|
|
371
|
+
syncEventer?: ILeaf // 同步触发一样事件的元素
|
|
372
|
+
|
|
368
373
|
__layout: ILeafLayout
|
|
369
374
|
|
|
370
375
|
__world: IMatrixWithBoundsScaleData
|
|
@@ -500,13 +505,13 @@ export interface ILeaf extends ILeafRender, ILeafHit, ILeafBounds, ILeafMatrix,
|
|
|
500
505
|
setTransform(transform?: IMatrixData, resize?: boolean): void
|
|
501
506
|
transform(transform?: IMatrixData, resize?: boolean): void
|
|
502
507
|
|
|
503
|
-
move(x: number, y?: number): void
|
|
508
|
+
move(x: number | IPointData, y?: number): void
|
|
504
509
|
scaleOf(origin: IPointData, scaleX: number, scaleY?: number, resize?: boolean): void
|
|
505
510
|
rotateOf(origin: IPointData, rotation: number): void
|
|
506
511
|
skewOf(origin: IPointData, skewX: number, skewY?: number, resize?: boolean): void
|
|
507
512
|
|
|
508
513
|
transformWorld(worldTransform?: IMatrixData, resize?: boolean): void
|
|
509
|
-
moveWorld(x: number, y?: number): void
|
|
514
|
+
moveWorld(x: number | IPointData, y?: number): void
|
|
510
515
|
scaleOfWorld(worldOrigin: IPointData, scaleX: number, scaleY?: number, resize?: boolean): void
|
|
511
516
|
rotateOfWorld(worldOrigin: IPointData, rotation: number): void
|
|
512
517
|
skewOfWorld(worldOrigin: IPointData, skewX: number, skewY?: number, resize?: boolean): void
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IObject } from '../data/IData'
|
|
1
2
|
import { IPointData } from '../math/IMath'
|
|
2
3
|
|
|
3
4
|
export interface IFunction {
|
|
@@ -8,6 +9,14 @@ export interface INumberFunction {
|
|
|
8
9
|
(...arg: any): number
|
|
9
10
|
}
|
|
10
11
|
|
|
12
|
+
export interface IStringFunction {
|
|
13
|
+
(...arg: any): string
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface IObjectFunction {
|
|
17
|
+
(...arg: any): IObject
|
|
18
|
+
}
|
|
19
|
+
|
|
11
20
|
export interface IPointDataFunction {
|
|
12
21
|
(...arg: any): IPointData
|
|
13
22
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { IAppBase } from './app/IApp'
|
|
2
2
|
export { ILeaferBase, ILeaferAttrData, ILeaferType, ILeaferTypeCreator, ILeaferTypeFunction, ILeaferTypeList, ILeaferConfig, ICreator, IUICreator, IZoomType } from './app/ILeafer'
|
|
3
|
-
export { ILeaf, ILeafAttrData, ILeafComputedData, ILeafInputData, ICachedLeaf, IHitType, IMaskType, IBlendMode, IEditSize, IImageCursor, ICursorType, IStateStyleType, IAround, ILeafAttrDescriptor, ILeafAttrDescriptorFn } from './display/ILeaf'
|
|
3
|
+
export { ILeaf, ILeafAttrData, ILeafComputedData, ILeafInputData, ICachedLeaf, IHitType, IMaskType, IBlendMode, IEditSize, IImageCursor, ICursorType, IStateStyleType, IDirection, IAround, ILeafAttrDescriptor, ILeafAttrDescriptorFn } from './display/ILeaf'
|
|
4
4
|
export { IBranch } from './display/IBranch'
|
|
5
5
|
export { IZoomView } from './display/IView'
|
|
6
6
|
|
|
@@ -19,7 +19,7 @@ export { IBranchRender, IBranchRenderModule } from './display/module/IBranchRend
|
|
|
19
19
|
export { IRenderer, IRendererConfig, IRenderOptions } from './renderer/IRenderer'
|
|
20
20
|
export { IWatcher, IWatchEventData, IWatcherConfig } from './watcher/IWatcher'
|
|
21
21
|
export { ILayouter, ILayoutChangedData, ILayoutBlockData, ILayouterConfig, IPartLayoutConfig } from './layouter/ILayouter'
|
|
22
|
-
export { ISelector, ISelectorConfig, ISelectorProxy, IFindMethod, IPickResult, IPickOptions, IAnswer } from './selector/ISelector'
|
|
22
|
+
export { ISelector, ISelectorConfig, ISelectorProxy, IFindMethod, IPickResult, IPickOptions, IPickBottom, IAnswer } from './selector/ISelector'
|
|
23
23
|
|
|
24
24
|
export { ICanvasManager } from './canvas/ICanvasManager'
|
|
25
25
|
export { IHitCanvasManager } from './canvas/IHitCanvasManager'
|
|
@@ -50,7 +50,7 @@ export { ICursorTypeMap, ICursorRotate, ICursorRotateMap } from './interaction/I
|
|
|
50
50
|
export { IInteraction, IInteractionCanvas, IInteractionConfig, IWheelConfig, IPointerConfig } from './interaction/IInteraction'
|
|
51
51
|
|
|
52
52
|
|
|
53
|
-
export { INumber, IBoolean, IString, IValue, IFourNumber, IPathString, ITimer, IObject, INumberMap, IStringMap, IBooleanMap, IDataTypeHandle } from './data/IData'
|
|
53
|
+
export { INumber, IBoolean, IString, IValue, IFourNumber, IPathString, ITimer, IObject, INumberMap, IStringMap, IBooleanMap, IPointDataMap, IDataTypeHandle } from './data/IData'
|
|
54
54
|
export { ILeafList, ILeafArrayMap, ILeafMap, ILeafLevelList, ILeafListItemCallback } from './data/IList'
|
|
55
55
|
export { IPoint, IPointData, IRadiusPointData, ISize, ISizeData, IScreenSizeData, IBounds, IBoundsData, IBoundsDataFn, IOffsetBoundsData, ITwoPointBoundsData, IAutoBounds, IAutoBoundsData, IMatrix, IMatrixData, IMatrixWithBoundsData, IMatrixWithScaleData, IMatrixWithOptionScaleData, IMatrixWithBoundsScaleData, IMatrixWithLayoutData, IScaleRotationData, IScaleData, ISkewData, ILayoutBoundsData, ILayoutData, ILayoutAttr } from './math/IMath'
|
|
56
|
-
export { IFunction, IAttrDecorator } from './function/IFunction'
|
|
56
|
+
export { IFunction, IStringFunction, INumberFunction, IObjectFunction, IPointDataFunction, IAttrDecorator } from './function/IFunction'
|
|
@@ -3,7 +3,7 @@ import { IPointerEvent, IMoveEvent, IZoomEvent, IRotateEvent, IUIEvent, IKeyEven
|
|
|
3
3
|
import { ILeaf, ICursorType } from '../display/ILeaf'
|
|
4
4
|
import { ILeafList } from '../data/IList'
|
|
5
5
|
import { IPointData } from '../math/IMath'
|
|
6
|
-
import { ISelector, IPickOptions } from '../selector/ISelector'
|
|
6
|
+
import { ISelector, IPickOptions, IPickBottom } from '../selector/ISelector'
|
|
7
7
|
import { IBounds } from '../math/IMath'
|
|
8
8
|
import { IControl } from '../control/IControl'
|
|
9
9
|
import { IKeepTouchData } from '../event/IEvent'
|
|
@@ -26,6 +26,8 @@ export interface IInteraction extends IControl {
|
|
|
26
26
|
cursor: ICursorType | ICursorType[]
|
|
27
27
|
readonly hitRadius: number
|
|
28
28
|
|
|
29
|
+
bottomList?: IPickBottom[] // 底部可拾取的虚拟元素
|
|
30
|
+
|
|
29
31
|
shrinkCanvasBounds: IBounds
|
|
30
32
|
|
|
31
33
|
downData: IPointerEvent
|
|
@@ -15,10 +15,16 @@ export interface IPickOptions {
|
|
|
15
15
|
through?: boolean
|
|
16
16
|
target?: IBranch
|
|
17
17
|
findList?: ILeaf[]
|
|
18
|
+
bottomList?: IPickBottom[] // 底部可拾取的虚拟元素
|
|
18
19
|
exclude?: ILeafList
|
|
19
20
|
ignoreHittable?: boolean
|
|
20
21
|
}
|
|
21
22
|
|
|
23
|
+
export interface IPickBottom {
|
|
24
|
+
target: ILeaf
|
|
25
|
+
proxy?: ILeaf
|
|
26
|
+
}
|
|
27
|
+
|
|
22
28
|
export interface ISelectorConfig {
|
|
23
29
|
|
|
24
30
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -1,95 +1,5 @@
|
|
|
1
1
|
import { ILeaferCanvas as ILeaferCanvas$1, IScreenSizeData as IScreenSizeData$1 } from '@leafer/interface';
|
|
2
2
|
|
|
3
|
-
type INumber = number;
|
|
4
|
-
type IBoolean = boolean;
|
|
5
|
-
type IString = string;
|
|
6
|
-
type IValue = INumber | IBoolean | IString | IObject;
|
|
7
|
-
type ITimer = any;
|
|
8
|
-
type IPathString = string;
|
|
9
|
-
type IFourNumber = number | number[];
|
|
10
|
-
interface IObject {
|
|
11
|
-
[name: string]: any;
|
|
12
|
-
}
|
|
13
|
-
interface IBooleanMap {
|
|
14
|
-
[name: string]: boolean;
|
|
15
|
-
}
|
|
16
|
-
interface INumberMap {
|
|
17
|
-
[name: string]: number;
|
|
18
|
-
}
|
|
19
|
-
interface IStringMap {
|
|
20
|
-
[name: string]: string;
|
|
21
|
-
}
|
|
22
|
-
interface IDataTypeHandle {
|
|
23
|
-
(target: any): void;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
interface ILeafMap {
|
|
27
|
-
[name: string]: ILeaf;
|
|
28
|
-
}
|
|
29
|
-
interface ILeafArrayMap {
|
|
30
|
-
[name: string]: ILeaf[];
|
|
31
|
-
}
|
|
32
|
-
type ILeafListItemCallback = (item: ILeaf, index?: number) => void;
|
|
33
|
-
interface ILeafList {
|
|
34
|
-
list: ILeaf[];
|
|
35
|
-
keys: INumberMap;
|
|
36
|
-
readonly length: number;
|
|
37
|
-
has(leaf: ILeaf): boolean;
|
|
38
|
-
indexAt(index: number): ILeaf;
|
|
39
|
-
indexOf(leaf: ILeaf): number;
|
|
40
|
-
add(leaf: ILeaf): void;
|
|
41
|
-
addAt(leaf: ILeaf, index: number): void;
|
|
42
|
-
addList(list: ILeaf[]): void;
|
|
43
|
-
remove(leaf: ILeaf): void;
|
|
44
|
-
forEach(itemCallback: ILeafListItemCallback): void;
|
|
45
|
-
sort(reverse?: boolean): void;
|
|
46
|
-
clone(): ILeafList;
|
|
47
|
-
update(): void;
|
|
48
|
-
reset(): void;
|
|
49
|
-
destroy(): void;
|
|
50
|
-
}
|
|
51
|
-
interface ILeafLevelList {
|
|
52
|
-
levelMap: ILeafArrayMap;
|
|
53
|
-
keys: INumberMap;
|
|
54
|
-
levels: number[];
|
|
55
|
-
readonly length: number;
|
|
56
|
-
has(leaf: ILeaf): boolean;
|
|
57
|
-
without(leaf: ILeaf): boolean;
|
|
58
|
-
sort(reverse?: boolean): void;
|
|
59
|
-
addList(list: ILeaf[]): void;
|
|
60
|
-
add(leaf: ILeaf): void;
|
|
61
|
-
forEach(itemCallback: ILeafListItemCallback): void;
|
|
62
|
-
reset(): void;
|
|
63
|
-
destroy(): void;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
interface IControl {
|
|
67
|
-
start(): void;
|
|
68
|
-
stop(): void;
|
|
69
|
-
destroy(): void;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
interface IWatchEventData {
|
|
73
|
-
updatedList: ILeafList;
|
|
74
|
-
}
|
|
75
|
-
interface IWatcherConfig {
|
|
76
|
-
}
|
|
77
|
-
interface IWatcher extends IControl {
|
|
78
|
-
target: ILeaf;
|
|
79
|
-
totalTimes: number;
|
|
80
|
-
disabled: boolean;
|
|
81
|
-
running: boolean;
|
|
82
|
-
changed: boolean;
|
|
83
|
-
hasVisible: boolean;
|
|
84
|
-
hasAdd: boolean;
|
|
85
|
-
hasRemove: boolean;
|
|
86
|
-
readonly childrenChanged: boolean;
|
|
87
|
-
config: IWatcherConfig;
|
|
88
|
-
updatedList: ILeafList;
|
|
89
|
-
disable(): void;
|
|
90
|
-
update(): void;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
3
|
interface IPointData {
|
|
94
4
|
x: number;
|
|
95
5
|
y: number;
|
|
@@ -254,6 +164,99 @@ interface IMatrixWithBoundsScaleData extends IMatrixData, IBoundsData, IScaleDat
|
|
|
254
164
|
interface IMatrixWithLayoutData extends IMatrixData, ILayoutBoundsData {
|
|
255
165
|
}
|
|
256
166
|
|
|
167
|
+
type INumber = number;
|
|
168
|
+
type IBoolean = boolean;
|
|
169
|
+
type IString = string;
|
|
170
|
+
type IValue = INumber | IBoolean | IString | IObject;
|
|
171
|
+
type ITimer = any;
|
|
172
|
+
type IPathString = string;
|
|
173
|
+
type IFourNumber = number | number[];
|
|
174
|
+
interface IObject {
|
|
175
|
+
[name: string]: any;
|
|
176
|
+
}
|
|
177
|
+
interface IBooleanMap {
|
|
178
|
+
[name: string]: boolean;
|
|
179
|
+
}
|
|
180
|
+
interface INumberMap {
|
|
181
|
+
[name: string]: number;
|
|
182
|
+
}
|
|
183
|
+
interface IStringMap {
|
|
184
|
+
[name: string]: string;
|
|
185
|
+
}
|
|
186
|
+
interface IPointDataMap {
|
|
187
|
+
[name: string]: IPointData;
|
|
188
|
+
}
|
|
189
|
+
interface IDataTypeHandle {
|
|
190
|
+
(target: any): void;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
interface ILeafMap {
|
|
194
|
+
[name: string]: ILeaf;
|
|
195
|
+
}
|
|
196
|
+
interface ILeafArrayMap {
|
|
197
|
+
[name: string]: ILeaf[];
|
|
198
|
+
}
|
|
199
|
+
type ILeafListItemCallback = (item: ILeaf, index?: number) => void;
|
|
200
|
+
interface ILeafList {
|
|
201
|
+
list: ILeaf[];
|
|
202
|
+
keys: INumberMap;
|
|
203
|
+
readonly length: number;
|
|
204
|
+
has(leaf: ILeaf): boolean;
|
|
205
|
+
indexAt(index: number): ILeaf;
|
|
206
|
+
indexOf(leaf: ILeaf): number;
|
|
207
|
+
add(leaf: ILeaf): void;
|
|
208
|
+
addAt(leaf: ILeaf, index: number): void;
|
|
209
|
+
addList(list: ILeaf[]): void;
|
|
210
|
+
remove(leaf: ILeaf): void;
|
|
211
|
+
forEach(itemCallback: ILeafListItemCallback): void;
|
|
212
|
+
sort(reverse?: boolean): void;
|
|
213
|
+
clone(): ILeafList;
|
|
214
|
+
update(): void;
|
|
215
|
+
reset(): void;
|
|
216
|
+
destroy(): void;
|
|
217
|
+
}
|
|
218
|
+
interface ILeafLevelList {
|
|
219
|
+
levelMap: ILeafArrayMap;
|
|
220
|
+
keys: INumberMap;
|
|
221
|
+
levels: number[];
|
|
222
|
+
readonly length: number;
|
|
223
|
+
has(leaf: ILeaf): boolean;
|
|
224
|
+
without(leaf: ILeaf): boolean;
|
|
225
|
+
sort(reverse?: boolean): void;
|
|
226
|
+
addList(list: ILeaf[]): void;
|
|
227
|
+
add(leaf: ILeaf): void;
|
|
228
|
+
forEach(itemCallback: ILeafListItemCallback): void;
|
|
229
|
+
reset(): void;
|
|
230
|
+
destroy(): void;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
interface IControl {
|
|
234
|
+
start(): void;
|
|
235
|
+
stop(): void;
|
|
236
|
+
destroy(): void;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
interface IWatchEventData {
|
|
240
|
+
updatedList: ILeafList;
|
|
241
|
+
}
|
|
242
|
+
interface IWatcherConfig {
|
|
243
|
+
}
|
|
244
|
+
interface IWatcher extends IControl {
|
|
245
|
+
target: ILeaf;
|
|
246
|
+
totalTimes: number;
|
|
247
|
+
disabled: boolean;
|
|
248
|
+
running: boolean;
|
|
249
|
+
changed: boolean;
|
|
250
|
+
hasVisible: boolean;
|
|
251
|
+
hasAdd: boolean;
|
|
252
|
+
hasRemove: boolean;
|
|
253
|
+
readonly childrenChanged: boolean;
|
|
254
|
+
config: IWatcherConfig;
|
|
255
|
+
updatedList: ILeafList;
|
|
256
|
+
disable(): void;
|
|
257
|
+
update(): void;
|
|
258
|
+
}
|
|
259
|
+
|
|
257
260
|
interface ILayoutChangedData {
|
|
258
261
|
matrixList: ILeaf[];
|
|
259
262
|
boundsList: ILeaf[];
|
|
@@ -380,6 +383,12 @@ interface IFunction {
|
|
|
380
383
|
interface INumberFunction {
|
|
381
384
|
(...arg: any): number;
|
|
382
385
|
}
|
|
386
|
+
interface IStringFunction {
|
|
387
|
+
(...arg: any): string;
|
|
388
|
+
}
|
|
389
|
+
interface IObjectFunction {
|
|
390
|
+
(...arg: any): IObject;
|
|
391
|
+
}
|
|
383
392
|
interface IPointDataFunction {
|
|
384
393
|
(...arg: any): IPointData;
|
|
385
394
|
}
|
|
@@ -1146,9 +1155,14 @@ interface IPickOptions {
|
|
|
1146
1155
|
through?: boolean;
|
|
1147
1156
|
target?: IBranch;
|
|
1148
1157
|
findList?: ILeaf[];
|
|
1158
|
+
bottomList?: IPickBottom[];
|
|
1149
1159
|
exclude?: ILeafList;
|
|
1150
1160
|
ignoreHittable?: boolean;
|
|
1151
1161
|
}
|
|
1162
|
+
interface IPickBottom {
|
|
1163
|
+
target: ILeaf;
|
|
1164
|
+
proxy?: ILeaf;
|
|
1165
|
+
}
|
|
1152
1166
|
interface ISelectorConfig {
|
|
1153
1167
|
}
|
|
1154
1168
|
type IAnswer = 0 | 1 | 2 | 3;
|
|
@@ -1204,13 +1218,13 @@ interface ILeafAttrData {
|
|
|
1204
1218
|
around: IAround;
|
|
1205
1219
|
lazy: IBoolean;
|
|
1206
1220
|
pixelRatio: INumber;
|
|
1207
|
-
draggable: IBoolean;
|
|
1221
|
+
draggable: IBoolean | 'x' | 'y';
|
|
1222
|
+
dragBounds?: IBoundsData | 'parent';
|
|
1208
1223
|
path: IPathCommandData | IPathString;
|
|
1209
1224
|
windingRule: IWindingRule;
|
|
1210
1225
|
closed: boolean;
|
|
1211
1226
|
editable: IBoolean;
|
|
1212
1227
|
editSize: IEditSize;
|
|
1213
|
-
editorStyle: IObject;
|
|
1214
1228
|
hittable: IBoolean;
|
|
1215
1229
|
hitFill: IHitType;
|
|
1216
1230
|
hitStroke: IHitType;
|
|
@@ -1236,7 +1250,8 @@ interface IImageCursor {
|
|
|
1236
1250
|
y?: number;
|
|
1237
1251
|
rotation?: number;
|
|
1238
1252
|
}
|
|
1239
|
-
type
|
|
1253
|
+
type IDirection = 'topLeft' | 'top' | 'topRight' | 'right' | 'bottomRight' | 'bottom' | 'bottomLeft' | 'left' | 'center';
|
|
1254
|
+
type IAround = IDirection | IPointData;
|
|
1240
1255
|
type ICursorType = IImageCursor | '' | 'auto' | 'default' | 'none' | 'context-menu' | 'help' | 'pointer' | 'progress' | 'wait' | 'cell' | 'crosshair' | 'text' | 'vertical-text' | 'alias' | 'copy' | 'move' | 'no-drop' | 'not-allowed' | 'grab' | 'grabbing' | 'e-resize' | 'n-resize' | 'ne-resize' | 'nw-resize' | 's-resize' | 'se-resize' | 'sw-resize' | 'w-resize' | 'ew-resize' | 'ns-resize' | 'nesw-resize' | 'nwse-resize' | 'col-resize' | 'row-resize' | 'all-scroll' | 'zoom-in' | 'zoom-out';
|
|
1241
1256
|
type IStateStyleType = 'hoverStyle' | 'pressStyle' | 'focusStyle' | 'selectedStyle' | 'disabledStyle';
|
|
1242
1257
|
interface ILeafInputData {
|
|
@@ -1267,13 +1282,13 @@ interface ILeafInputData {
|
|
|
1267
1282
|
around?: IAround;
|
|
1268
1283
|
lazy?: IBoolean;
|
|
1269
1284
|
pixelRatio?: INumber;
|
|
1270
|
-
draggable?: IBoolean;
|
|
1285
|
+
draggable?: IBoolean | 'x' | 'y';
|
|
1286
|
+
dragBounds?: IBoundsData | 'parent';
|
|
1271
1287
|
path?: IPathCommandData | IPathString;
|
|
1272
1288
|
windingRule?: IWindingRule;
|
|
1273
1289
|
closed?: boolean;
|
|
1274
1290
|
editable?: IBoolean;
|
|
1275
1291
|
editSize?: IEditSize;
|
|
1276
|
-
editorStyle?: IObject;
|
|
1277
1292
|
hittable?: IBoolean;
|
|
1278
1293
|
hitFill?: IHitType;
|
|
1279
1294
|
hitStroke?: IHitType;
|
|
@@ -1320,10 +1335,10 @@ interface ILeafComputedData {
|
|
|
1320
1335
|
path?: IPathCommandData;
|
|
1321
1336
|
windingRule?: IWindingRule;
|
|
1322
1337
|
closed?: boolean;
|
|
1323
|
-
draggable?: boolean;
|
|
1338
|
+
draggable?: boolean | 'x' | 'y';
|
|
1339
|
+
dragBounds?: IBoundsData | 'parent';
|
|
1324
1340
|
editable?: boolean;
|
|
1325
1341
|
editSize?: IEditSize;
|
|
1326
|
-
editorStyle?: IObject;
|
|
1327
1342
|
hittable?: boolean;
|
|
1328
1343
|
hitFill?: IHitType;
|
|
1329
1344
|
hitStroke?: IHitType;
|
|
@@ -1367,6 +1382,7 @@ interface ILeaf extends ILeafRender, ILeafHit, ILeafBounds, ILeafMatrix, ILeafDa
|
|
|
1367
1382
|
__: ILeafData;
|
|
1368
1383
|
proxyData?: ILeafInputData;
|
|
1369
1384
|
__proxyData?: ILeafInputData;
|
|
1385
|
+
syncEventer?: ILeaf;
|
|
1370
1386
|
__layout: ILeafLayout;
|
|
1371
1387
|
__world: IMatrixWithBoundsScaleData;
|
|
1372
1388
|
__local?: IMatrixWithBoundsData;
|
|
@@ -1456,12 +1472,12 @@ interface ILeaf extends ILeafRender, ILeafHit, ILeafBounds, ILeafMatrix, ILeafDa
|
|
|
1456
1472
|
getWorldPointByPage(page: IPointData, relative?: ILeaf, distance?: boolean, change?: boolean): IPointData;
|
|
1457
1473
|
setTransform(transform?: IMatrixData, resize?: boolean): void;
|
|
1458
1474
|
transform(transform?: IMatrixData, resize?: boolean): void;
|
|
1459
|
-
move(x: number, y?: number): void;
|
|
1475
|
+
move(x: number | IPointData, y?: number): void;
|
|
1460
1476
|
scaleOf(origin: IPointData, scaleX: number, scaleY?: number, resize?: boolean): void;
|
|
1461
1477
|
rotateOf(origin: IPointData, rotation: number): void;
|
|
1462
1478
|
skewOf(origin: IPointData, skewX: number, skewY?: number, resize?: boolean): void;
|
|
1463
1479
|
transformWorld(worldTransform?: IMatrixData, resize?: boolean): void;
|
|
1464
|
-
moveWorld(x: number, y?: number): void;
|
|
1480
|
+
moveWorld(x: number | IPointData, y?: number): void;
|
|
1465
1481
|
scaleOfWorld(worldOrigin: IPointData, scaleX: number, scaleY?: number, resize?: boolean): void;
|
|
1466
1482
|
rotateOfWorld(worldOrigin: IPointData, rotation: number): void;
|
|
1467
1483
|
skewOfWorld(worldOrigin: IPointData, skewX: number, skewY?: number, resize?: boolean): void;
|
|
@@ -1614,6 +1630,7 @@ interface IInteraction extends IControl {
|
|
|
1614
1630
|
config: IInteractionConfig;
|
|
1615
1631
|
cursor: ICursorType | ICursorType[];
|
|
1616
1632
|
readonly hitRadius: number;
|
|
1633
|
+
bottomList?: IPickBottom[];
|
|
1617
1634
|
shrinkCanvasBounds: IBounds;
|
|
1618
1635
|
downData: IPointerEvent;
|
|
1619
1636
|
hoverData: IPointerEvent;
|
|
@@ -1963,4 +1980,4 @@ interface ICursorRotateMap {
|
|
|
1963
1980
|
[name: string]: ICursorRotate;
|
|
1964
1981
|
}
|
|
1965
1982
|
|
|
1966
|
-
export type { ACommandData, ArcCommandData, ArcToCommandData, CCommandData, CanvasPathCommand, EllipseCommandData, HCommandData, IAnimateEvent, IAnswer, IAppBase, IAround, IAttrDecorator, IAutoBounds, IAutoBoundsData, IBlendMode, IBlob, IBlobFunction, IBoolean, IBooleanMap, IBounds, IBoundsData, IBoundsDataFn, IBoundsType, IBranch, IBranchRender, IBranchRenderModule, ICachedLeaf, ICanvasAttr, ICanvasCacheOptions, ICanvasContext2D, ICanvasContext2DSettings, ICanvasManager, ICanvasPattern, ICanvasStrokeOptions, ICanvasType, IChildEvent, IControl, ICreator, ICursorRotate, ICursorRotateMap, ICursorType, ICursorTypeMap, IDataProcessor, IDataTypeHandle, IDragEvent, IDropEvent, IEditSize, IEvent, IEventListener, IEventListenerId, IEventListenerItem, IEventListenerMap, IEventListenerOptions, IEventTarget, IEventer, IExportFileType, IExportImageType, IExportOnCanvasFunction, IExportOptions, IExportResult, IExportResultFunction, IFindMethod, IFourNumber, IFunction, IHitCanvas, IHitCanvasConfig, IHitCanvasManager, IHitType, IImageCursor, IImageEvent, IImageManager, IInteraction, IInteractionCanvas, IInteractionConfig, IKeepTouchData, IKeyEvent, ILayoutAttr, ILayoutBlockData, ILayoutBoundsData, ILayoutChangedData, ILayoutData, ILayoutEvent, ILayouter, ILayouterConfig, ILeaf, ILeafArrayMap, ILeafAttrData, ILeafAttrDescriptor, ILeafAttrDescriptorFn, ILeafBounds, ILeafBoundsModule, ILeafComputedData, ILeafData, ILeafDataOptions, ILeafDataProxy, ILeafDataProxyModule, ILeafEventer, ILeafEventerModule, ILeafHit, ILeafHitModule, ILeafInputData, ILeafLayout, ILeafLevelList, ILeafList, ILeafListItemCallback, ILeafMap, ILeafMatrix, ILeafMatrixModule, ILeafRender, ILeafRenderModule, ILeaferAttrData, ILeaferBase, ILeaferCanvas, ILeaferCanvasConfig, ILeaferCanvasView, ILeaferConfig, ILeaferEvent, ILeaferImage, ILeaferImageCacheCanvas, ILeaferImageConfig, ILeaferImageOnError, ILeaferImageOnLoaded, ILeaferImagePatternPaint, ILeaferType, ILeaferTypeCreator, ILeaferTypeFunction, ILeaferTypeList, ILocationType, IMaskType, IMatrix, IMatrixData, IMatrixWithBoundsData, IMatrixWithBoundsScaleData, IMatrixWithLayoutData, IMatrixWithOptionScaleData, IMatrixWithScaleData, IMiniapp, IMiniappSelect, IMiniappSizeView, IMoveEvent, IMultiTouchData, INumber, INumberMap, IObject, IOffsetBoundsData, IPartLayoutConfig, IPath2D, IPathCommandData, IPathCreator, IPathDrawer, IPathString, IPickOptions, IPickResult, IPlatform, IPlugin, IPoint, IPointData, IPointerConfig, IPointerEvent, IPropertyEvent, IRadiusPointData, IRenderEvent, IRenderOptions, IRenderer, IRendererConfig, IResizeEvent, IResizeEventListener, IRotateEvent, IScaleData, IScaleRotationData, IScreenSizeData, ISelector, ISelectorConfig, ISelectorProxy, ISize, ISizeData, ISkewData, ISkiaCanvas, ISkiaCanvasExportConfig, ISkiaNAPICanvas, IStateStyleType, IString, IStringMap, ISwipeEvent, ITaskItem, ITaskOptions, ITaskProcessor, ITaskProcessorConfig, ITextMetrics, ITimer, ITwoPointBoundsData, IUICreator, IUIEvent, IUpdateEvent, IValue, IWatchEvent, IWatchEventData, IWatcher, IWatcherConfig, IWheelConfig, IWindingRule, IZoomEvent, IZoomType, IZoomView, InnerId, LCommandData, MCommandData, PointerType, QCommandData, RectCommandData, RoundRectCommandData, SCommandData, TCommandData, VCommandData, ZCommandData };
|
|
1983
|
+
export type { ACommandData, ArcCommandData, ArcToCommandData, CCommandData, CanvasPathCommand, EllipseCommandData, HCommandData, IAnimateEvent, IAnswer, IAppBase, IAround, IAttrDecorator, IAutoBounds, IAutoBoundsData, IBlendMode, IBlob, IBlobFunction, IBoolean, IBooleanMap, IBounds, IBoundsData, IBoundsDataFn, IBoundsType, IBranch, IBranchRender, IBranchRenderModule, ICachedLeaf, ICanvasAttr, ICanvasCacheOptions, ICanvasContext2D, ICanvasContext2DSettings, ICanvasManager, ICanvasPattern, ICanvasStrokeOptions, ICanvasType, IChildEvent, IControl, ICreator, ICursorRotate, ICursorRotateMap, ICursorType, ICursorTypeMap, IDataProcessor, IDataTypeHandle, IDirection, IDragEvent, IDropEvent, IEditSize, IEvent, IEventListener, IEventListenerId, IEventListenerItem, IEventListenerMap, IEventListenerOptions, IEventTarget, IEventer, IExportFileType, IExportImageType, IExportOnCanvasFunction, IExportOptions, IExportResult, IExportResultFunction, IFindMethod, IFourNumber, IFunction, IHitCanvas, IHitCanvasConfig, IHitCanvasManager, IHitType, IImageCursor, IImageEvent, IImageManager, IInteraction, IInteractionCanvas, IInteractionConfig, IKeepTouchData, IKeyEvent, ILayoutAttr, ILayoutBlockData, ILayoutBoundsData, ILayoutChangedData, ILayoutData, ILayoutEvent, ILayouter, ILayouterConfig, ILeaf, ILeafArrayMap, ILeafAttrData, ILeafAttrDescriptor, ILeafAttrDescriptorFn, ILeafBounds, ILeafBoundsModule, ILeafComputedData, ILeafData, ILeafDataOptions, ILeafDataProxy, ILeafDataProxyModule, ILeafEventer, ILeafEventerModule, ILeafHit, ILeafHitModule, ILeafInputData, ILeafLayout, ILeafLevelList, ILeafList, ILeafListItemCallback, ILeafMap, ILeafMatrix, ILeafMatrixModule, ILeafRender, ILeafRenderModule, ILeaferAttrData, ILeaferBase, ILeaferCanvas, ILeaferCanvasConfig, ILeaferCanvasView, ILeaferConfig, ILeaferEvent, ILeaferImage, ILeaferImageCacheCanvas, ILeaferImageConfig, ILeaferImageOnError, ILeaferImageOnLoaded, ILeaferImagePatternPaint, ILeaferType, ILeaferTypeCreator, ILeaferTypeFunction, ILeaferTypeList, ILocationType, IMaskType, IMatrix, IMatrixData, IMatrixWithBoundsData, IMatrixWithBoundsScaleData, IMatrixWithLayoutData, IMatrixWithOptionScaleData, IMatrixWithScaleData, IMiniapp, IMiniappSelect, IMiniappSizeView, IMoveEvent, IMultiTouchData, INumber, INumberFunction, INumberMap, IObject, IObjectFunction, IOffsetBoundsData, IPartLayoutConfig, IPath2D, IPathCommandData, IPathCreator, IPathDrawer, IPathString, IPickBottom, IPickOptions, IPickResult, IPlatform, IPlugin, IPoint, IPointData, IPointDataFunction, IPointDataMap, IPointerConfig, IPointerEvent, IPropertyEvent, IRadiusPointData, IRenderEvent, IRenderOptions, IRenderer, IRendererConfig, IResizeEvent, IResizeEventListener, IRotateEvent, IScaleData, IScaleRotationData, IScreenSizeData, ISelector, ISelectorConfig, ISelectorProxy, ISize, ISizeData, ISkewData, ISkiaCanvas, ISkiaCanvasExportConfig, ISkiaNAPICanvas, IStateStyleType, IString, IStringFunction, IStringMap, ISwipeEvent, ITaskItem, ITaskOptions, ITaskProcessor, ITaskProcessorConfig, ITextMetrics, ITimer, ITwoPointBoundsData, IUICreator, IUIEvent, IUpdateEvent, IValue, IWatchEvent, IWatchEventData, IWatcher, IWatcherConfig, IWheelConfig, IWindingRule, IZoomEvent, IZoomType, IZoomView, InnerId, LCommandData, MCommandData, PointerType, QCommandData, RectCommandData, RoundRectCommandData, SCommandData, TCommandData, VCommandData, ZCommandData };
|