@leafer/interface 1.0.0-rc.22 → 1.0.0-rc.23
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/app/ILeafer.ts +0 -1
- package/src/display/ILeaf.ts +165 -27
- package/src/display/module/ILeafBounds.ts +1 -0
- package/src/display/module/ILeafEventer.ts +1 -1
- package/src/index.ts +3 -3
- package/src/layout/ILeafLayout.ts +15 -8
- package/src/math/IMath.ts +16 -3
- package/src/selector/ISelector.ts +6 -0
- package/types/index.d.ts +145 -30
package/package.json
CHANGED
package/src/app/ILeafer.ts
CHANGED
package/src/display/ILeaf.ts
CHANGED
|
@@ -4,8 +4,8 @@ import { IEventer } from '../event/IEventer'
|
|
|
4
4
|
import { ILeaferCanvas, IHitCanvas } from '../canvas/ILeaferCanvas'
|
|
5
5
|
import { IRenderOptions } from '../renderer/IRenderer'
|
|
6
6
|
|
|
7
|
-
import { IObject, INumber, IBoolean, IValue, IString, IPathString } from '../data/IData'
|
|
8
|
-
import { IMatrixWithBoundsData, IMatrix, IPointData, IBoundsData, IRadiusPointData, ILayoutAttr, ILayoutBoundsData, IMatrixData, IMatrixWithBoundsScaleData, IMatrixWithScaleData } from '../math/IMath'
|
|
7
|
+
import { IObject, INumber, IBoolean, IValue, IString, IPathString, IFourNumber } from '../data/IData'
|
|
8
|
+
import { IMatrixWithBoundsData, IMatrix, IPointData, IBoundsData, IRadiusPointData, ILayoutAttr, ILayoutBoundsData, IMatrixData, IMatrixWithBoundsScaleData, IMatrixWithScaleData, IAutoBoxData, IUnitPointData } from '../math/IMath'
|
|
9
9
|
import { IFunction } from '../function/IFunction'
|
|
10
10
|
|
|
11
11
|
import { ILeafDataProxy } from './module/ILeafDataProxy'
|
|
@@ -41,9 +41,9 @@ export interface ILeafAttrData {
|
|
|
41
41
|
locked: IBoolean
|
|
42
42
|
zIndex: INumber
|
|
43
43
|
|
|
44
|
-
mask:
|
|
44
|
+
mask: IMaskType
|
|
45
45
|
maskType: IMaskType
|
|
46
|
-
eraser:
|
|
46
|
+
eraser: IEraserType
|
|
47
47
|
|
|
48
48
|
// layout data
|
|
49
49
|
x: INumber
|
|
@@ -57,20 +57,43 @@ export interface ILeafAttrData {
|
|
|
57
57
|
skewY: INumber
|
|
58
58
|
|
|
59
59
|
scale: INumber | IPointData // helper
|
|
60
|
-
|
|
60
|
+
|
|
61
|
+
offsetX: INumber
|
|
62
|
+
offsetY: INumber
|
|
63
|
+
scrollX: INumber
|
|
64
|
+
scrollY: INumber
|
|
65
|
+
|
|
66
|
+
origin: IAlign | IUnitPointData
|
|
67
|
+
around: IAlign | IUnitPointData
|
|
61
68
|
|
|
62
69
|
lazy: IBoolean
|
|
63
70
|
pixelRatio: INumber
|
|
64
71
|
|
|
65
|
-
draggable: IBoolean | 'x' | 'y'
|
|
66
|
-
dragBounds?: IBoundsData | 'parent'
|
|
67
|
-
|
|
68
72
|
path: IPathCommandData | IPathString
|
|
69
73
|
windingRule: IWindingRule
|
|
70
74
|
closed: boolean
|
|
71
75
|
|
|
76
|
+
// auto layout
|
|
77
|
+
flow: IFlowType
|
|
78
|
+
padding: IFourNumber
|
|
79
|
+
gap: IGap | IPointGap
|
|
80
|
+
align: IFlowAlign | IFlowAxisAlign
|
|
81
|
+
wrap: IWrap
|
|
82
|
+
itemBox: IFlowBoxType
|
|
83
|
+
|
|
84
|
+
inFlow: IBoolean
|
|
85
|
+
autoWidth: IAutoSize
|
|
86
|
+
autoHeight: IAutoSize
|
|
87
|
+
autoBox: IAutoBoxData | IConstraint
|
|
88
|
+
|
|
89
|
+
widthRange: IRangeSize
|
|
90
|
+
heightRange: IRangeSize
|
|
91
|
+
|
|
92
|
+
// interactive
|
|
93
|
+
draggable: IBoolean | IAxis
|
|
94
|
+
dragBounds?: IBoundsData | 'parent'
|
|
95
|
+
|
|
72
96
|
editable: IBoolean
|
|
73
|
-
editSize: IEditSize
|
|
74
97
|
|
|
75
98
|
hittable: IBoolean
|
|
76
99
|
hitFill: IHitType
|
|
@@ -90,6 +113,48 @@ export interface ILeafAttrData {
|
|
|
90
113
|
disabledStyle: ILeafInputData
|
|
91
114
|
}
|
|
92
115
|
|
|
116
|
+
|
|
117
|
+
export type IAxis = 'x' | 'y'
|
|
118
|
+
|
|
119
|
+
export type IAxisReverse = 'x-reverse' | 'y-reverse'
|
|
120
|
+
|
|
121
|
+
export type IFlowType = boolean | IAxis | IAxisReverse
|
|
122
|
+
|
|
123
|
+
export type IFlowBoxType = 'box' | 'stroke'
|
|
124
|
+
|
|
125
|
+
export type IGap = INumber | 'auto' | 'fit'
|
|
126
|
+
|
|
127
|
+
export interface IPointGap { x?: IGap, y?: IGap }
|
|
128
|
+
|
|
129
|
+
export type IAxisAlign = 'from' | 'center' | 'to'
|
|
130
|
+
|
|
131
|
+
export interface IFlowAxisAlign { content?: IFlowAlign, rowX?: IAxisAlign, rowY?: IAxisAlign }
|
|
132
|
+
|
|
133
|
+
export type IWrap = boolean | 'reverse'
|
|
134
|
+
|
|
135
|
+
export type IAutoSize = IBoolean | INumber | IPercentData
|
|
136
|
+
|
|
137
|
+
export interface IRangeSize {
|
|
138
|
+
min?: number
|
|
139
|
+
max?: number
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export interface IUnitData {
|
|
143
|
+
type: 'percent' | 'px'
|
|
144
|
+
value: number
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export interface IPercentData extends IUnitData {
|
|
148
|
+
type: 'percent'
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export interface IConstraint {
|
|
152
|
+
x: IConstraintType
|
|
153
|
+
y: IConstraintType
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export type IConstraintType = 'from' | 'center' | 'to' | 'from-to' | 'scale'
|
|
157
|
+
|
|
93
158
|
export type IHitType =
|
|
94
159
|
| 'path'
|
|
95
160
|
| 'pixel'
|
|
@@ -97,10 +162,16 @@ export type IHitType =
|
|
|
97
162
|
| 'none'
|
|
98
163
|
|
|
99
164
|
export type IMaskType =
|
|
165
|
+
| boolean
|
|
100
166
|
| 'path'
|
|
101
167
|
| 'pixel'
|
|
102
168
|
| 'clipping'
|
|
103
169
|
|
|
170
|
+
export type IEraserType =
|
|
171
|
+
| boolean
|
|
172
|
+
| 'path'
|
|
173
|
+
| 'pixel'
|
|
174
|
+
|
|
104
175
|
export type IBlendMode =
|
|
105
176
|
| 'pass-through'
|
|
106
177
|
| 'normal'
|
|
@@ -138,19 +209,31 @@ export interface IImageCursor {
|
|
|
138
209
|
}
|
|
139
210
|
|
|
140
211
|
export type IDirection =
|
|
141
|
-
| '
|
|
212
|
+
| 'top-left'
|
|
142
213
|
| 'top'
|
|
143
|
-
| '
|
|
214
|
+
| 'top-right'
|
|
144
215
|
| 'right'
|
|
145
|
-
| '
|
|
216
|
+
| 'bottom-right'
|
|
146
217
|
| 'bottom'
|
|
147
|
-
| '
|
|
218
|
+
| 'bottom-left'
|
|
148
219
|
| 'left'
|
|
149
220
|
| 'center'
|
|
150
221
|
|
|
222
|
+
export type IAlign = IDirection
|
|
223
|
+
|
|
224
|
+
export type IBaseLineAlign =
|
|
225
|
+
| 'baseline-left'
|
|
226
|
+
| 'baseline-center'
|
|
227
|
+
| 'baseline-right'
|
|
228
|
+
|
|
229
|
+
export type IFlowAlign =
|
|
230
|
+
| IAlign
|
|
231
|
+
| IBaseLineAlign
|
|
232
|
+
|
|
233
|
+
|
|
151
234
|
export type IAround =
|
|
152
|
-
|
|
|
153
|
-
|
|
|
235
|
+
| IAlign
|
|
236
|
+
| IUnitPointData
|
|
154
237
|
|
|
155
238
|
export type ICursorType =
|
|
156
239
|
| IImageCursor
|
|
@@ -215,9 +298,9 @@ export interface ILeafInputData {
|
|
|
215
298
|
locked?: IBoolean
|
|
216
299
|
zIndex?: INumber
|
|
217
300
|
|
|
218
|
-
mask?:
|
|
301
|
+
mask?: IMaskType
|
|
219
302
|
maskType?: IMaskType
|
|
220
|
-
eraser?:
|
|
303
|
+
eraser?: IEraserType
|
|
221
304
|
|
|
222
305
|
// layout data
|
|
223
306
|
x?: INumber
|
|
@@ -231,20 +314,43 @@ export interface ILeafInputData {
|
|
|
231
314
|
skewY?: INumber
|
|
232
315
|
|
|
233
316
|
scale?: INumber | IPointData // helper
|
|
234
|
-
|
|
317
|
+
|
|
318
|
+
offsetX?: INumber
|
|
319
|
+
offsetY?: INumber
|
|
320
|
+
scrollX?: INumber
|
|
321
|
+
scrollY?: INumber
|
|
322
|
+
|
|
323
|
+
origin?: IAlign | IUnitPointData
|
|
324
|
+
around?: IAlign | IUnitPointData
|
|
235
325
|
|
|
236
326
|
lazy?: IBoolean
|
|
237
327
|
pixelRatio?: INumber
|
|
238
328
|
|
|
239
|
-
draggable?: IBoolean | 'x' | 'y'
|
|
240
|
-
dragBounds?: IBoundsData | 'parent'
|
|
241
|
-
|
|
242
329
|
path?: IPathCommandData | IPathString
|
|
243
330
|
windingRule?: IWindingRule
|
|
244
331
|
closed?: boolean
|
|
245
332
|
|
|
333
|
+
// auto layout
|
|
334
|
+
flow?: IFlowType
|
|
335
|
+
padding?: IFourNumber
|
|
336
|
+
gap?: IGap | IPointGap
|
|
337
|
+
align?: IFlowAlign | IFlowAxisAlign
|
|
338
|
+
wrap?: IWrap
|
|
339
|
+
itemBox?: IFlowBoxType
|
|
340
|
+
|
|
341
|
+
inFlow?: IBoolean
|
|
342
|
+
autoWidth?: IAutoSize
|
|
343
|
+
autoHeight?: IAutoSize
|
|
344
|
+
autoBox?: IAutoBoxData | IConstraint
|
|
345
|
+
|
|
346
|
+
widthRange?: IRangeSize
|
|
347
|
+
heightRange?: IRangeSize
|
|
348
|
+
|
|
349
|
+
// interactive
|
|
350
|
+
draggable?: IBoolean | IAxis
|
|
351
|
+
dragBounds?: IBoundsData | 'parent'
|
|
352
|
+
|
|
246
353
|
editable?: IBoolean
|
|
247
|
-
editSize?: IEditSize
|
|
248
354
|
|
|
249
355
|
hittable?: IBoolean
|
|
250
356
|
hitFill?: IHitType
|
|
@@ -282,9 +388,9 @@ export interface ILeafComputedData {
|
|
|
282
388
|
locked?: boolean
|
|
283
389
|
zIndex?: number
|
|
284
390
|
|
|
285
|
-
mask?: boolean
|
|
391
|
+
mask?: boolean | IMaskType
|
|
286
392
|
maskType?: IMaskType
|
|
287
|
-
eraser?:
|
|
393
|
+
eraser?: IEraserType
|
|
288
394
|
|
|
289
395
|
// layout data
|
|
290
396
|
x?: number
|
|
@@ -297,7 +403,13 @@ export interface ILeafComputedData {
|
|
|
297
403
|
skewX?: number
|
|
298
404
|
skewY?: number
|
|
299
405
|
|
|
300
|
-
|
|
406
|
+
offsetX?: number
|
|
407
|
+
offsetY?: number
|
|
408
|
+
scrollX?: number
|
|
409
|
+
scrollY?: number
|
|
410
|
+
|
|
411
|
+
origin?: IAlign | IUnitPointData
|
|
412
|
+
around?: IAlign | IUnitPointData
|
|
301
413
|
|
|
302
414
|
lazy?: boolean
|
|
303
415
|
pixelRatio?: number
|
|
@@ -306,11 +418,27 @@ export interface ILeafComputedData {
|
|
|
306
418
|
windingRule?: IWindingRule
|
|
307
419
|
closed?: boolean
|
|
308
420
|
|
|
309
|
-
|
|
421
|
+
// auto layout
|
|
422
|
+
flow?: IFlowType
|
|
423
|
+
padding?: IFourNumber
|
|
424
|
+
gap?: IGap | IPointGap
|
|
425
|
+
align?: IFlowAlign | IFlowAxisAlign
|
|
426
|
+
wrap?: IWrap
|
|
427
|
+
itemBox?: IFlowBoxType
|
|
428
|
+
|
|
429
|
+
inFlow?: boolean
|
|
430
|
+
autoWidth?: IAutoSize
|
|
431
|
+
autoHeight?: IAutoSize
|
|
432
|
+
autoBox?: IAutoBoxData | IConstraint
|
|
433
|
+
|
|
434
|
+
widthRange?: IRangeSize
|
|
435
|
+
heightRange?: IRangeSize
|
|
436
|
+
|
|
437
|
+
// interactive
|
|
438
|
+
draggable?: boolean | IAxis
|
|
310
439
|
dragBounds?: IBoundsData | 'parent'
|
|
311
440
|
|
|
312
441
|
editable?: boolean
|
|
313
|
-
editSize?: IEditSize
|
|
314
442
|
|
|
315
443
|
hittable?: boolean
|
|
316
444
|
hitFill?: IHitType
|
|
@@ -404,6 +532,11 @@ export interface ILeaf extends ILeafRender, ILeafHit, ILeafBounds, ILeafMatrix,
|
|
|
404
532
|
__hasEraser?: boolean
|
|
405
533
|
__hitCanvas?: IHitCanvas
|
|
406
534
|
|
|
535
|
+
__flowBounds?: IBoundsData // localBoxBounds or localStrokeBounds
|
|
536
|
+
__widthGrow?: number
|
|
537
|
+
__heightGrow?: number
|
|
538
|
+
__hasGrow?: boolean
|
|
539
|
+
|
|
407
540
|
readonly __onlyHitMask: boolean
|
|
408
541
|
readonly __ignoreHitWorld: boolean
|
|
409
542
|
|
|
@@ -439,7 +572,9 @@ export interface ILeaf extends ILeafRender, ILeafHit, ILeafBounds, ILeafMatrix,
|
|
|
439
572
|
|
|
440
573
|
// find
|
|
441
574
|
find(condition: number | string | IFindMethod, options?: any): ILeaf[]
|
|
575
|
+
findTag(tag: string | string[]): ILeaf[]
|
|
442
576
|
findOne(condition: number | string | IFindMethod, options?: any): ILeaf
|
|
577
|
+
findId(id: number | string): ILeaf
|
|
443
578
|
|
|
444
579
|
focus(value?: boolean): void
|
|
445
580
|
forceUpdate(attrName?: string): void
|
|
@@ -458,11 +593,13 @@ export interface ILeaf extends ILeafRender, ILeafHit, ILeafBounds, ILeafMatrix,
|
|
|
458
593
|
__updateLocalStrokeBounds(): void
|
|
459
594
|
__updateLocalRenderBounds(): void
|
|
460
595
|
|
|
596
|
+
__updateContentBounds(): void
|
|
461
597
|
__updateBoxBounds(): void
|
|
462
598
|
__updateStrokeBounds(): void
|
|
463
599
|
__updateRenderBounds(): void
|
|
464
600
|
|
|
465
601
|
__updateAutoLayout(): void
|
|
602
|
+
__updateFlowLayout(): void
|
|
466
603
|
__updateNaturalSize(): void
|
|
467
604
|
|
|
468
605
|
__updateStrokeSpread(): number
|
|
@@ -474,6 +611,7 @@ export interface ILeaf extends ILeafRender, ILeafHit, ILeafBounds, ILeafMatrix,
|
|
|
474
611
|
__updateEraser(value?: boolean): void
|
|
475
612
|
__updateMask(value?: boolean): void
|
|
476
613
|
__renderMask(canvas: ILeaferCanvas, options: IRenderOptions): void
|
|
614
|
+
__renderEraser(canvas: ILeaferCanvas, options: IRenderOptions): void
|
|
477
615
|
|
|
478
616
|
// convert
|
|
479
617
|
__getNowWorld(options: IRenderOptions): IMatrixWithBoundsScaleData // when render use other matrix
|
|
@@ -8,7 +8,7 @@ export type ILeafEventerModule = ILeafEventer & ThisType<ILeaf>
|
|
|
8
8
|
|
|
9
9
|
export interface ILeafEventer {
|
|
10
10
|
on?(type: string | string[], listener: IEventListener, options?: IEventListenerOptions | boolean): void
|
|
11
|
-
off?(type
|
|
11
|
+
off?(type?: string | string[], listener?: IEventListener, options?: IEventListenerOptions | boolean): void
|
|
12
12
|
on_?(type: string | string[], listener: IEventListener, bind?: IObject, options?: IEventListenerOptions | boolean): IEventListenerId
|
|
13
13
|
off_?(id: IEventListenerId | IEventListenerId[]): void
|
|
14
14
|
once?(type: string | string[], listener: IEventListener, capture?: boolean): void
|
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, IDirection, IAround, ILeafAttrDescriptor, ILeafAttrDescriptorFn } from './display/ILeaf'
|
|
3
|
+
export { ILeaf, ILeafAttrData, ILeafComputedData, ILeafInputData, ICachedLeaf, IFlowType, IFlowBoxType, IAlign, IAxisAlign, IFlowAlign, IFlowAxisAlign, IAxis, IGap, IPointGap, IAxisReverse, IBaseLineAlign, IWrap, IAutoSize, IRangeSize, IPercentData, IUnitData, IConstraint, IConstraintType, IHitType, IMaskType, IEraserType, 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, IPickBottom, IAnswer } from './selector/ISelector'
|
|
22
|
+
export { ISelector, ISelectorConfig, ISelectorProxy, IFindCondition, IFindMethod, IPickResult, IPickOptions, IPickBottom, IAnswer } from './selector/ISelector'
|
|
23
23
|
|
|
24
24
|
export { ICanvasManager } from './canvas/ICanvasManager'
|
|
25
25
|
export { IHitCanvasManager } from './canvas/IHitCanvasManager'
|
|
@@ -52,5 +52,5 @@ export { IInteraction, IInteractionCanvas, IInteractionConfig, IWheelConfig, IPo
|
|
|
52
52
|
|
|
53
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
|
-
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'
|
|
55
|
+
export { IPoint, IPointData, IUnitPointData, IScrollPointData, IRadiusPointData, ISize, ISizeData, IScreenSizeData, IBounds, IBoundsData, IBoundsDataFn, IOffsetBoundsData, ITwoPointBoundsData, IAutoBounds, IAutoBoxData, IAutoBoundsData, IMatrix, IMatrixData, IMatrixWithBoundsData, IMatrixWithScaleData, IMatrixWithOptionScaleData, IMatrixWithBoundsScaleData, IMatrixWithLayoutData, IScaleRotationData, IScaleData, ISkewData, ILayoutBoundsData, ILayoutData, ILayoutAttr } from './math/IMath'
|
|
56
56
|
export { IFunction, IStringFunction, INumberFunction, IObjectFunction, IPointDataFunction, IAttrDecorator } from './function/IFunction'
|
|
@@ -2,7 +2,7 @@ import { IBoundsData, IMatrixData, ILayoutBoundsData, IPointData } from '../math
|
|
|
2
2
|
import { ILeaf } from '../display/ILeaf'
|
|
3
3
|
|
|
4
4
|
export type ILocationType = 'world' | 'page' | 'local' | 'inner'
|
|
5
|
-
export type IBoundsType = 'content' | 'box' | 'stroke' | '
|
|
5
|
+
export type IBoundsType = 'content' | 'box' | 'stroke' | 'render'
|
|
6
6
|
|
|
7
7
|
export interface ILeafLayout {
|
|
8
8
|
|
|
@@ -12,19 +12,24 @@ export interface ILeafLayout {
|
|
|
12
12
|
|
|
13
13
|
// inner
|
|
14
14
|
|
|
15
|
+
contentBounds: IBoundsData // | content |
|
|
15
16
|
boxBounds: IBoundsData // | content + padding |
|
|
16
17
|
strokeBounds: IBoundsData // | boxBounds + border |
|
|
17
18
|
renderBounds: IBoundsData // | strokeBounds + shadow |
|
|
18
19
|
|
|
19
|
-
// auto layout
|
|
20
|
-
marginBounds: IBoundsData // | strokeBounds + margin |
|
|
21
|
-
contentBounds: IBoundsData // | content |
|
|
22
|
-
|
|
23
20
|
// local
|
|
24
21
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
localContentBounds: IBoundsData
|
|
23
|
+
// localBoxBounds: IBoundsData // use leaf.__localBoxBounds
|
|
24
|
+
localStrokeBounds: IBoundsData
|
|
25
|
+
localRenderBounds: IBoundsData
|
|
26
|
+
|
|
27
|
+
// world
|
|
28
|
+
|
|
29
|
+
worldContentBounds: IBoundsData
|
|
30
|
+
worldBoxBounds: IBoundsData
|
|
31
|
+
worldStrokeBounds: IBoundsData
|
|
32
|
+
// worldRenderBounds: IBoundsData // use leaf.__world
|
|
28
33
|
|
|
29
34
|
// state
|
|
30
35
|
resized: boolean
|
|
@@ -84,8 +89,10 @@ export interface ILeafLayout {
|
|
|
84
89
|
getLayoutPoints(type?: IBoundsType, relative?: ILocationType | ILeaf): IPointData[]
|
|
85
90
|
|
|
86
91
|
// 独立 / 引用 boxBounds
|
|
92
|
+
shrinkContent(): void
|
|
87
93
|
spreadStroke(): void
|
|
88
94
|
spreadRender(): void
|
|
95
|
+
shrinkContentCancel(): void
|
|
89
96
|
spreadStrokeCancel(): void
|
|
90
97
|
spreadRenderCancel(): void
|
|
91
98
|
|
package/src/math/IMath.ts
CHANGED
|
@@ -5,6 +5,17 @@ export interface IPointData {
|
|
|
5
5
|
y: number
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
+
export interface IUnitPointData {
|
|
9
|
+
type?: 'percent' | 'px'
|
|
10
|
+
x: number
|
|
11
|
+
y: number
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface IScrollPointData {
|
|
15
|
+
scrollX: number
|
|
16
|
+
scrollY: number
|
|
17
|
+
}
|
|
18
|
+
|
|
8
19
|
export interface IPoint extends IPointData {
|
|
9
20
|
set(x?: number | IPointData, y?: number): IPoint
|
|
10
21
|
get(): IPointData
|
|
@@ -70,7 +81,7 @@ export interface IBounds extends IBoundsData, ITwoPointBoundsData {
|
|
|
70
81
|
toInnerOf(matrix: IMatrixData, to?: IBoundsData): IBounds
|
|
71
82
|
getFitMatrix(put: IBoundsData, baseScale?: number): IMatrix
|
|
72
83
|
|
|
73
|
-
spread(fourNumber: IFourNumber
|
|
84
|
+
spread(fourNumber: IFourNumber): IBounds
|
|
74
85
|
shrink(fourNumber: IFourNumber): IBounds
|
|
75
86
|
ceil(): IBounds
|
|
76
87
|
unsign(): IBounds
|
|
@@ -106,13 +117,15 @@ export interface ITwoPointBoundsData {
|
|
|
106
117
|
maxY: number
|
|
107
118
|
}
|
|
108
119
|
|
|
109
|
-
|
|
110
|
-
export interface IAutoBoundsData {
|
|
120
|
+
export interface IAutoBoxData {
|
|
111
121
|
top?: number
|
|
112
122
|
right?: number
|
|
113
123
|
bottom?: number
|
|
114
124
|
left?: number
|
|
125
|
+
}
|
|
126
|
+
|
|
115
127
|
|
|
128
|
+
export interface IAutoBoundsData extends IAutoBoxData {
|
|
116
129
|
width?: number
|
|
117
130
|
height?: number
|
|
118
131
|
}
|
|
@@ -31,6 +31,12 @@ export interface ISelectorConfig {
|
|
|
31
31
|
|
|
32
32
|
export type IAnswer = 0 | 1 | 2 | 3
|
|
33
33
|
|
|
34
|
+
export interface IFindCondition {
|
|
35
|
+
id?: number | string,
|
|
36
|
+
className?: string,
|
|
37
|
+
tag?: string | string[]
|
|
38
|
+
}
|
|
39
|
+
|
|
34
40
|
export interface IFindMethod {
|
|
35
41
|
(leaf: ILeaf, options?: any): IAnswer
|
|
36
42
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -4,6 +4,15 @@ interface IPointData {
|
|
|
4
4
|
x: number;
|
|
5
5
|
y: number;
|
|
6
6
|
}
|
|
7
|
+
interface IUnitPointData {
|
|
8
|
+
type?: 'percent' | 'px';
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
}
|
|
12
|
+
interface IScrollPointData {
|
|
13
|
+
scrollX: number;
|
|
14
|
+
scrollY: number;
|
|
15
|
+
}
|
|
7
16
|
interface IPoint extends IPointData {
|
|
8
17
|
set(x?: number | IPointData, y?: number): IPoint;
|
|
9
18
|
get(): IPointData;
|
|
@@ -55,7 +64,7 @@ interface IBounds extends IBoundsData, ITwoPointBoundsData {
|
|
|
55
64
|
toOuterOf(matrix: IMatrixData, to?: IBoundsData): IBounds;
|
|
56
65
|
toInnerOf(matrix: IMatrixData, to?: IBoundsData): IBounds;
|
|
57
66
|
getFitMatrix(put: IBoundsData, baseScale?: number): IMatrix;
|
|
58
|
-
spread(fourNumber: IFourNumber
|
|
67
|
+
spread(fourNumber: IFourNumber): IBounds;
|
|
59
68
|
shrink(fourNumber: IFourNumber): IBounds;
|
|
60
69
|
ceil(): IBounds;
|
|
61
70
|
unsign(): IBounds;
|
|
@@ -84,11 +93,13 @@ interface ITwoPointBoundsData {
|
|
|
84
93
|
maxX: number;
|
|
85
94
|
maxY: number;
|
|
86
95
|
}
|
|
87
|
-
interface
|
|
96
|
+
interface IAutoBoxData {
|
|
88
97
|
top?: number;
|
|
89
98
|
right?: number;
|
|
90
99
|
bottom?: number;
|
|
91
100
|
left?: number;
|
|
101
|
+
}
|
|
102
|
+
interface IAutoBoundsData extends IAutoBoxData {
|
|
92
103
|
width?: number;
|
|
93
104
|
height?: number;
|
|
94
105
|
}
|
|
@@ -368,7 +379,7 @@ interface IKeepTouchData {
|
|
|
368
379
|
type ILeafEventerModule = ILeafEventer & ThisType<ILeaf>;
|
|
369
380
|
interface ILeafEventer {
|
|
370
381
|
on?(type: string | string[], listener: IEventListener, options?: IEventListenerOptions | boolean): void;
|
|
371
|
-
off?(type
|
|
382
|
+
off?(type?: string | string[], listener?: IEventListener, options?: IEventListenerOptions | boolean): void;
|
|
372
383
|
on_?(type: string | string[], listener: IEventListener, bind?: IObject, options?: IEventListenerOptions | boolean): IEventListenerId;
|
|
373
384
|
off_?(id: IEventListenerId | IEventListenerId[]): void;
|
|
374
385
|
once?(type: string | string[], listener: IEventListener, capture?: boolean): void;
|
|
@@ -786,17 +797,20 @@ type IExportImageType = 'jpg' | 'png' | 'webp';
|
|
|
786
797
|
type IExportFileType = IExportImageType | 'svg' | 'pdf' | 'json';
|
|
787
798
|
|
|
788
799
|
type ILocationType = 'world' | 'page' | 'local' | 'inner';
|
|
789
|
-
type IBoundsType = 'content' | 'box' | 'stroke' | '
|
|
800
|
+
type IBoundsType = 'content' | 'box' | 'stroke' | 'render';
|
|
790
801
|
interface ILeafLayout {
|
|
791
802
|
leaf: ILeaf;
|
|
792
803
|
proxyZoom: boolean;
|
|
804
|
+
contentBounds: IBoundsData;
|
|
793
805
|
boxBounds: IBoundsData;
|
|
794
806
|
strokeBounds: IBoundsData;
|
|
795
807
|
renderBounds: IBoundsData;
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
808
|
+
localContentBounds: IBoundsData;
|
|
809
|
+
localStrokeBounds: IBoundsData;
|
|
810
|
+
localRenderBounds: IBoundsData;
|
|
811
|
+
worldContentBounds: IBoundsData;
|
|
812
|
+
worldBoxBounds: IBoundsData;
|
|
813
|
+
worldStrokeBounds: IBoundsData;
|
|
800
814
|
resized: boolean;
|
|
801
815
|
waitAutoLayout: boolean;
|
|
802
816
|
matrixChanged: boolean;
|
|
@@ -834,8 +848,10 @@ interface ILeafLayout {
|
|
|
834
848
|
getBounds(type?: IBoundsType, relative?: ILocationType | ILeaf): IBoundsData;
|
|
835
849
|
getLayoutBounds(type?: IBoundsType, relative?: ILocationType | ILeaf, unscale?: boolean): ILayoutBoundsData;
|
|
836
850
|
getLayoutPoints(type?: IBoundsType, relative?: ILocationType | ILeaf): IPointData[];
|
|
851
|
+
shrinkContent(): void;
|
|
837
852
|
spreadStroke(): void;
|
|
838
853
|
spreadRender(): void;
|
|
854
|
+
shrinkContentCancel(): void;
|
|
839
855
|
spreadStrokeCancel(): void;
|
|
840
856
|
spreadRenderCancel(): void;
|
|
841
857
|
boxChange(): void;
|
|
@@ -1084,6 +1100,7 @@ interface ILeafBounds {
|
|
|
1084
1100
|
__updateStrokeBounds?(): void;
|
|
1085
1101
|
__updateRenderBounds?(): void;
|
|
1086
1102
|
__updateAutoLayout?(): void;
|
|
1103
|
+
__updateFlowLayout?(): void;
|
|
1087
1104
|
__updateNaturalSize?(): void;
|
|
1088
1105
|
__updateStrokeSpread?(): number;
|
|
1089
1106
|
__updateRenderSpread?(): number;
|
|
@@ -1166,6 +1183,11 @@ interface IPickBottom {
|
|
|
1166
1183
|
interface ISelectorConfig {
|
|
1167
1184
|
}
|
|
1168
1185
|
type IAnswer = 0 | 1 | 2 | 3;
|
|
1186
|
+
interface IFindCondition {
|
|
1187
|
+
id?: number | string;
|
|
1188
|
+
className?: string;
|
|
1189
|
+
tag?: string | string[];
|
|
1190
|
+
}
|
|
1169
1191
|
interface IFindMethod {
|
|
1170
1192
|
(leaf: ILeaf, options?: any): IAnswer;
|
|
1171
1193
|
}
|
|
@@ -1202,9 +1224,9 @@ interface ILeafAttrData {
|
|
|
1202
1224
|
disabled: IBoolean;
|
|
1203
1225
|
locked: IBoolean;
|
|
1204
1226
|
zIndex: INumber;
|
|
1205
|
-
mask:
|
|
1227
|
+
mask: IMaskType;
|
|
1206
1228
|
maskType: IMaskType;
|
|
1207
|
-
eraser:
|
|
1229
|
+
eraser: IEraserType;
|
|
1208
1230
|
x: INumber;
|
|
1209
1231
|
y: INumber;
|
|
1210
1232
|
width: INumber;
|
|
@@ -1215,16 +1237,32 @@ interface ILeafAttrData {
|
|
|
1215
1237
|
skewX: INumber;
|
|
1216
1238
|
skewY: INumber;
|
|
1217
1239
|
scale: INumber | IPointData;
|
|
1218
|
-
|
|
1240
|
+
offsetX: INumber;
|
|
1241
|
+
offsetY: INumber;
|
|
1242
|
+
scrollX: INumber;
|
|
1243
|
+
scrollY: INumber;
|
|
1244
|
+
origin: IAlign | IUnitPointData;
|
|
1245
|
+
around: IAlign | IUnitPointData;
|
|
1219
1246
|
lazy: IBoolean;
|
|
1220
1247
|
pixelRatio: INumber;
|
|
1221
|
-
draggable: IBoolean | 'x' | 'y';
|
|
1222
|
-
dragBounds?: IBoundsData | 'parent';
|
|
1223
1248
|
path: IPathCommandData | IPathString;
|
|
1224
1249
|
windingRule: IWindingRule;
|
|
1225
1250
|
closed: boolean;
|
|
1251
|
+
flow: IFlowType;
|
|
1252
|
+
padding: IFourNumber;
|
|
1253
|
+
gap: IGap | IPointGap;
|
|
1254
|
+
align: IFlowAlign | IFlowAxisAlign;
|
|
1255
|
+
wrap: IWrap;
|
|
1256
|
+
itemBox: IFlowBoxType;
|
|
1257
|
+
inFlow: IBoolean;
|
|
1258
|
+
autoWidth: IAutoSize;
|
|
1259
|
+
autoHeight: IAutoSize;
|
|
1260
|
+
autoBox: IAutoBoxData | IConstraint;
|
|
1261
|
+
widthRange: IRangeSize;
|
|
1262
|
+
heightRange: IRangeSize;
|
|
1263
|
+
draggable: IBoolean | IAxis;
|
|
1264
|
+
dragBounds?: IBoundsData | 'parent';
|
|
1226
1265
|
editable: IBoolean;
|
|
1227
|
-
editSize: IEditSize;
|
|
1228
1266
|
hittable: IBoolean;
|
|
1229
1267
|
hitFill: IHitType;
|
|
1230
1268
|
hitStroke: IHitType;
|
|
@@ -1240,8 +1278,42 @@ interface ILeafAttrData {
|
|
|
1240
1278
|
selectedStyle: ILeafInputData;
|
|
1241
1279
|
disabledStyle: ILeafInputData;
|
|
1242
1280
|
}
|
|
1281
|
+
type IAxis = 'x' | 'y';
|
|
1282
|
+
type IAxisReverse = 'x-reverse' | 'y-reverse';
|
|
1283
|
+
type IFlowType = boolean | IAxis | IAxisReverse;
|
|
1284
|
+
type IFlowBoxType = 'box' | 'stroke';
|
|
1285
|
+
type IGap = INumber | 'auto' | 'fit';
|
|
1286
|
+
interface IPointGap {
|
|
1287
|
+
x?: IGap;
|
|
1288
|
+
y?: IGap;
|
|
1289
|
+
}
|
|
1290
|
+
type IAxisAlign = 'from' | 'center' | 'to';
|
|
1291
|
+
interface IFlowAxisAlign {
|
|
1292
|
+
content?: IFlowAlign;
|
|
1293
|
+
rowX?: IAxisAlign;
|
|
1294
|
+
rowY?: IAxisAlign;
|
|
1295
|
+
}
|
|
1296
|
+
type IWrap = boolean | 'reverse';
|
|
1297
|
+
type IAutoSize = IBoolean | INumber | IPercentData;
|
|
1298
|
+
interface IRangeSize {
|
|
1299
|
+
min?: number;
|
|
1300
|
+
max?: number;
|
|
1301
|
+
}
|
|
1302
|
+
interface IUnitData {
|
|
1303
|
+
type: 'percent' | 'px';
|
|
1304
|
+
value: number;
|
|
1305
|
+
}
|
|
1306
|
+
interface IPercentData extends IUnitData {
|
|
1307
|
+
type: 'percent';
|
|
1308
|
+
}
|
|
1309
|
+
interface IConstraint {
|
|
1310
|
+
x: IConstraintType;
|
|
1311
|
+
y: IConstraintType;
|
|
1312
|
+
}
|
|
1313
|
+
type IConstraintType = 'from' | 'center' | 'to' | 'from-to' | 'scale';
|
|
1243
1314
|
type IHitType = 'path' | 'pixel' | 'all' | 'none';
|
|
1244
|
-
type IMaskType = 'path' | 'pixel' | 'clipping';
|
|
1315
|
+
type IMaskType = boolean | 'path' | 'pixel' | 'clipping';
|
|
1316
|
+
type IEraserType = boolean | 'path' | 'pixel';
|
|
1245
1317
|
type IBlendMode = 'pass-through' | 'normal' | 'multiply' | 'screen' | 'overlay' | 'darken' | 'lighten' | 'color-dodge' | 'color-burn' | 'hard-light' | 'soft-light' | 'difference' | 'exclusion' | 'hue' | 'saturation' | 'color' | 'luminosity' | 'source-over' | 'source-in' | 'source-out' | 'source-atop' | 'destination-over' | 'destination-in' | 'destination-out' | 'destination-atop' | 'xor';
|
|
1246
1318
|
type IEditSize = 'size' | 'scale';
|
|
1247
1319
|
interface IImageCursor {
|
|
@@ -1250,8 +1322,11 @@ interface IImageCursor {
|
|
|
1250
1322
|
y?: number;
|
|
1251
1323
|
rotation?: number;
|
|
1252
1324
|
}
|
|
1253
|
-
type IDirection = '
|
|
1254
|
-
type
|
|
1325
|
+
type IDirection = 'top-left' | 'top' | 'top-right' | 'right' | 'bottom-right' | 'bottom' | 'bottom-left' | 'left' | 'center';
|
|
1326
|
+
type IAlign = IDirection;
|
|
1327
|
+
type IBaseLineAlign = 'baseline-left' | 'baseline-center' | 'baseline-right';
|
|
1328
|
+
type IFlowAlign = IAlign | IBaseLineAlign;
|
|
1329
|
+
type IAround = IAlign | IUnitPointData;
|
|
1255
1330
|
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';
|
|
1256
1331
|
type IStateStyleType = 'hoverStyle' | 'pressStyle' | 'focusStyle' | 'selectedStyle' | 'disabledStyle';
|
|
1257
1332
|
interface ILeafInputData {
|
|
@@ -1266,9 +1341,9 @@ interface ILeafInputData {
|
|
|
1266
1341
|
disabled?: IBoolean;
|
|
1267
1342
|
locked?: IBoolean;
|
|
1268
1343
|
zIndex?: INumber;
|
|
1269
|
-
mask?:
|
|
1344
|
+
mask?: IMaskType;
|
|
1270
1345
|
maskType?: IMaskType;
|
|
1271
|
-
eraser?:
|
|
1346
|
+
eraser?: IEraserType;
|
|
1272
1347
|
x?: INumber;
|
|
1273
1348
|
y?: INumber;
|
|
1274
1349
|
width?: INumber;
|
|
@@ -1279,16 +1354,32 @@ interface ILeafInputData {
|
|
|
1279
1354
|
skewX?: INumber;
|
|
1280
1355
|
skewY?: INumber;
|
|
1281
1356
|
scale?: INumber | IPointData;
|
|
1282
|
-
|
|
1357
|
+
offsetX?: INumber;
|
|
1358
|
+
offsetY?: INumber;
|
|
1359
|
+
scrollX?: INumber;
|
|
1360
|
+
scrollY?: INumber;
|
|
1361
|
+
origin?: IAlign | IUnitPointData;
|
|
1362
|
+
around?: IAlign | IUnitPointData;
|
|
1283
1363
|
lazy?: IBoolean;
|
|
1284
1364
|
pixelRatio?: INumber;
|
|
1285
|
-
draggable?: IBoolean | 'x' | 'y';
|
|
1286
|
-
dragBounds?: IBoundsData | 'parent';
|
|
1287
1365
|
path?: IPathCommandData | IPathString;
|
|
1288
1366
|
windingRule?: IWindingRule;
|
|
1289
1367
|
closed?: boolean;
|
|
1368
|
+
flow?: IFlowType;
|
|
1369
|
+
padding?: IFourNumber;
|
|
1370
|
+
gap?: IGap | IPointGap;
|
|
1371
|
+
align?: IFlowAlign | IFlowAxisAlign;
|
|
1372
|
+
wrap?: IWrap;
|
|
1373
|
+
itemBox?: IFlowBoxType;
|
|
1374
|
+
inFlow?: IBoolean;
|
|
1375
|
+
autoWidth?: IAutoSize;
|
|
1376
|
+
autoHeight?: IAutoSize;
|
|
1377
|
+
autoBox?: IAutoBoxData | IConstraint;
|
|
1378
|
+
widthRange?: IRangeSize;
|
|
1379
|
+
heightRange?: IRangeSize;
|
|
1380
|
+
draggable?: IBoolean | IAxis;
|
|
1381
|
+
dragBounds?: IBoundsData | 'parent';
|
|
1290
1382
|
editable?: IBoolean;
|
|
1291
|
-
editSize?: IEditSize;
|
|
1292
1383
|
hittable?: IBoolean;
|
|
1293
1384
|
hitFill?: IHitType;
|
|
1294
1385
|
hitStroke?: IHitType;
|
|
@@ -1317,9 +1408,9 @@ interface ILeafComputedData {
|
|
|
1317
1408
|
disabled?: boolean;
|
|
1318
1409
|
locked?: boolean;
|
|
1319
1410
|
zIndex?: number;
|
|
1320
|
-
mask?: boolean;
|
|
1411
|
+
mask?: boolean | IMaskType;
|
|
1321
1412
|
maskType?: IMaskType;
|
|
1322
|
-
eraser?:
|
|
1413
|
+
eraser?: IEraserType;
|
|
1323
1414
|
x?: number;
|
|
1324
1415
|
y?: number;
|
|
1325
1416
|
width?: number;
|
|
@@ -1329,16 +1420,32 @@ interface ILeafComputedData {
|
|
|
1329
1420
|
rotation?: number;
|
|
1330
1421
|
skewX?: number;
|
|
1331
1422
|
skewY?: number;
|
|
1332
|
-
|
|
1423
|
+
offsetX?: number;
|
|
1424
|
+
offsetY?: number;
|
|
1425
|
+
scrollX?: number;
|
|
1426
|
+
scrollY?: number;
|
|
1427
|
+
origin?: IAlign | IUnitPointData;
|
|
1428
|
+
around?: IAlign | IUnitPointData;
|
|
1333
1429
|
lazy?: boolean;
|
|
1334
1430
|
pixelRatio?: number;
|
|
1335
1431
|
path?: IPathCommandData;
|
|
1336
1432
|
windingRule?: IWindingRule;
|
|
1337
1433
|
closed?: boolean;
|
|
1338
|
-
|
|
1434
|
+
flow?: IFlowType;
|
|
1435
|
+
padding?: IFourNumber;
|
|
1436
|
+
gap?: IGap | IPointGap;
|
|
1437
|
+
align?: IFlowAlign | IFlowAxisAlign;
|
|
1438
|
+
wrap?: IWrap;
|
|
1439
|
+
itemBox?: IFlowBoxType;
|
|
1440
|
+
inFlow?: boolean;
|
|
1441
|
+
autoWidth?: IAutoSize;
|
|
1442
|
+
autoHeight?: IAutoSize;
|
|
1443
|
+
autoBox?: IAutoBoxData | IConstraint;
|
|
1444
|
+
widthRange?: IRangeSize;
|
|
1445
|
+
heightRange?: IRangeSize;
|
|
1446
|
+
draggable?: boolean | IAxis;
|
|
1339
1447
|
dragBounds?: IBoundsData | 'parent';
|
|
1340
1448
|
editable?: boolean;
|
|
1341
|
-
editSize?: IEditSize;
|
|
1342
1449
|
hittable?: boolean;
|
|
1343
1450
|
hitFill?: IHitType;
|
|
1344
1451
|
hitStroke?: IHitType;
|
|
@@ -1406,6 +1513,10 @@ interface ILeaf extends ILeafRender, ILeafHit, ILeafBounds, ILeafMatrix, ILeafDa
|
|
|
1406
1513
|
__hasMask?: boolean;
|
|
1407
1514
|
__hasEraser?: boolean;
|
|
1408
1515
|
__hitCanvas?: IHitCanvas;
|
|
1516
|
+
__flowBounds?: IBoundsData;
|
|
1517
|
+
__widthGrow?: number;
|
|
1518
|
+
__heightGrow?: number;
|
|
1519
|
+
__hasGrow?: boolean;
|
|
1409
1520
|
readonly __onlyHitMask: boolean;
|
|
1410
1521
|
readonly __ignoreHitWorld: boolean;
|
|
1411
1522
|
readonly pathInputed: boolean;
|
|
@@ -1430,7 +1541,9 @@ interface ILeaf extends ILeafRender, ILeafHit, ILeafBounds, ILeafMatrix, ILeafDa
|
|
|
1430
1541
|
setProxyAttr(name: string, newValue: IValue): void;
|
|
1431
1542
|
getProxyAttr(name: string): IValue;
|
|
1432
1543
|
find(condition: number | string | IFindMethod, options?: any): ILeaf[];
|
|
1544
|
+
findTag(tag: string | string[]): ILeaf[];
|
|
1433
1545
|
findOne(condition: number | string | IFindMethod, options?: any): ILeaf;
|
|
1546
|
+
findId(id: number | string): ILeaf;
|
|
1434
1547
|
focus(value?: boolean): void;
|
|
1435
1548
|
forceUpdate(attrName?: string): void;
|
|
1436
1549
|
updateLayout(): void;
|
|
@@ -1441,10 +1554,12 @@ interface ILeaf extends ILeafRender, ILeafHit, ILeafBounds, ILeafMatrix, ILeafDa
|
|
|
1441
1554
|
__updateLocalBoxBounds(): void;
|
|
1442
1555
|
__updateLocalStrokeBounds(): void;
|
|
1443
1556
|
__updateLocalRenderBounds(): void;
|
|
1557
|
+
__updateContentBounds(): void;
|
|
1444
1558
|
__updateBoxBounds(): void;
|
|
1445
1559
|
__updateStrokeBounds(): void;
|
|
1446
1560
|
__updateRenderBounds(): void;
|
|
1447
1561
|
__updateAutoLayout(): void;
|
|
1562
|
+
__updateFlowLayout(): void;
|
|
1448
1563
|
__updateNaturalSize(): void;
|
|
1449
1564
|
__updateStrokeSpread(): number;
|
|
1450
1565
|
__updateRenderSpread(): number;
|
|
@@ -1452,6 +1567,7 @@ interface ILeaf extends ILeafRender, ILeafHit, ILeafBounds, ILeafMatrix, ILeafDa
|
|
|
1452
1567
|
__updateEraser(value?: boolean): void;
|
|
1453
1568
|
__updateMask(value?: boolean): void;
|
|
1454
1569
|
__renderMask(canvas: ILeaferCanvas, options: IRenderOptions): void;
|
|
1570
|
+
__renderEraser(canvas: ILeaferCanvas, options: IRenderOptions): void;
|
|
1455
1571
|
__getNowWorld(options: IRenderOptions): IMatrixWithBoundsScaleData;
|
|
1456
1572
|
getWorld(attrName: ILayoutAttr): number;
|
|
1457
1573
|
getTransform(relative?: ILocationType | ILeaf): IMatrixData;
|
|
@@ -1765,7 +1881,6 @@ interface ILeaferAttrData {
|
|
|
1765
1881
|
stop(): void;
|
|
1766
1882
|
unlockLayout(): void;
|
|
1767
1883
|
lockLayout(): void;
|
|
1768
|
-
forceFullRender(): void;
|
|
1769
1884
|
forceRender(bounds?: IBoundsData): void;
|
|
1770
1885
|
updateCursor(cursor?: ICursorType): void;
|
|
1771
1886
|
resize(size: IScreenSizeData): void;
|
|
@@ -1980,4 +2095,4 @@ interface ICursorRotateMap {
|
|
|
1980
2095
|
[name: string]: ICursorRotate;
|
|
1981
2096
|
}
|
|
1982
2097
|
|
|
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 };
|
|
2098
|
+
export type { ACommandData, ArcCommandData, ArcToCommandData, CCommandData, CanvasPathCommand, EllipseCommandData, HCommandData, IAlign, IAnimateEvent, IAnswer, IAppBase, IAround, IAttrDecorator, IAutoBounds, IAutoBoundsData, IAutoBoxData, IAutoSize, IAxis, IAxisAlign, IAxisReverse, IBaseLineAlign, IBlendMode, IBlob, IBlobFunction, IBoolean, IBooleanMap, IBounds, IBoundsData, IBoundsDataFn, IBoundsType, IBranch, IBranchRender, IBranchRenderModule, ICachedLeaf, ICanvasAttr, ICanvasCacheOptions, ICanvasContext2D, ICanvasContext2DSettings, ICanvasManager, ICanvasPattern, ICanvasStrokeOptions, ICanvasType, IChildEvent, IConstraint, IConstraintType, IControl, ICreator, ICursorRotate, ICursorRotateMap, ICursorType, ICursorTypeMap, IDataProcessor, IDataTypeHandle, IDirection, IDragEvent, IDropEvent, IEditSize, IEraserType, IEvent, IEventListener, IEventListenerId, IEventListenerItem, IEventListenerMap, IEventListenerOptions, IEventTarget, IEventer, IExportFileType, IExportImageType, IExportOnCanvasFunction, IExportOptions, IExportResult, IExportResultFunction, IFindCondition, IFindMethod, IFlowAlign, IFlowAxisAlign, IFlowBoxType, IFlowType, IFourNumber, IFunction, IGap, 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, IPercentData, IPickBottom, IPickOptions, IPickResult, IPlatform, IPlugin, IPoint, IPointData, IPointDataFunction, IPointDataMap, IPointGap, IPointerConfig, IPointerEvent, IPropertyEvent, IRadiusPointData, IRangeSize, IRenderEvent, IRenderOptions, IRenderer, IRendererConfig, IResizeEvent, IResizeEventListener, IRotateEvent, IScaleData, IScaleRotationData, IScreenSizeData, IScrollPointData, ISelector, ISelectorConfig, ISelectorProxy, ISize, ISizeData, ISkewData, ISkiaCanvas, ISkiaCanvasExportConfig, ISkiaNAPICanvas, IStateStyleType, IString, IStringFunction, IStringMap, ISwipeEvent, ITaskItem, ITaskOptions, ITaskProcessor, ITaskProcessorConfig, ITextMetrics, ITimer, ITwoPointBoundsData, IUICreator, IUIEvent, IUnitData, IUnitPointData, IUpdateEvent, IValue, IWatchEvent, IWatchEventData, IWatcher, IWatcherConfig, IWheelConfig, IWindingRule, IWrap, IZoomEvent, IZoomType, IZoomView, InnerId, LCommandData, MCommandData, PointerType, QCommandData, RectCommandData, RoundRectCommandData, SCommandData, TCommandData, VCommandData, ZCommandData };
|