@leafer/interface 1.0.0-rc.23 → 1.0.0-rc.25
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 +4 -1
- package/src/canvas/ILeaferCanvas.ts +1 -0
- package/src/display/ILeaf.ts +26 -22
- package/src/event/IEventer.ts +1 -1
- package/src/index.ts +2 -2
- package/src/interaction/IInteraction.ts +3 -1
- package/src/layout/ILeafLayout.ts +2 -2
- package/src/math/IMath.ts +10 -0
- package/types/index.d.ts +41 -26
package/package.json
CHANGED
package/src/app/ILeafer.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { ILayouter, ILayouterConfig } from '../layouter/ILayouter'
|
|
|
5
5
|
import { ISelector, ISelectorConfig } from '../selector/ISelector'
|
|
6
6
|
import { IInteraction, IInteractionCanvas, IInteractionConfig } from '../interaction/IInteraction'
|
|
7
7
|
import { IWatcher, IWatcherConfig } from '../watcher/IWatcher'
|
|
8
|
-
import { IAutoBounds, IBoundsData, IPointData, IScreenSizeData, IBounds } from '../math/IMath'
|
|
8
|
+
import { IAutoBounds, IBoundsData, IPointData, IScreenSizeData, IBounds, IClientPointData } from '../math/IMath'
|
|
9
9
|
import { ICanvasManager } from '../canvas/ICanvasManager'
|
|
10
10
|
import { IHitCanvasManager } from '../canvas/IHitCanvasManager'
|
|
11
11
|
import { IEventListenerId } from '../event/IEventer'
|
|
@@ -56,6 +56,7 @@ export interface ILeaferAttrData {
|
|
|
56
56
|
config: ILeaferConfig
|
|
57
57
|
|
|
58
58
|
readonly cursorPoint: IPointData
|
|
59
|
+
readonly clientBounds: IBoundsData
|
|
59
60
|
leafs: number
|
|
60
61
|
|
|
61
62
|
__eventIds: IEventListenerId[]
|
|
@@ -80,6 +81,8 @@ export interface ILeaferAttrData {
|
|
|
80
81
|
zoom(zoomType: IZoomType, padding?: IFourNumber, fixedScale?: boolean): IBoundsData
|
|
81
82
|
getValidMove(moveX: number, moveY: number): IPointData
|
|
82
83
|
getValidScale(changeScale: number): number
|
|
84
|
+
|
|
85
|
+
getWorldPointByClient(clientPoint: IClientPointData, updateClient?: boolean): IPointData
|
|
83
86
|
}
|
|
84
87
|
|
|
85
88
|
export type IZoomType = 'in' | 'out' | 'fit' | 'fit-width' | 'fit-height' | number | ILeaf | ILeaf[] | IBoundsData
|
|
@@ -189,6 +189,7 @@ export interface ILeaferCanvas extends ICanvasAttr, ICanvasMethod, IPathDrawer {
|
|
|
189
189
|
resize(size: IScreenSizeData): void
|
|
190
190
|
updateViewSize(): void
|
|
191
191
|
updateClientBounds(): void
|
|
192
|
+
getClientBounds(update?: boolean): IBoundsData
|
|
192
193
|
|
|
193
194
|
// other
|
|
194
195
|
isSameSize(options: ILeaferCanvasConfig): boolean
|
package/src/display/ILeaf.ts
CHANGED
|
@@ -35,15 +35,14 @@ export interface ILeafAttrData {
|
|
|
35
35
|
|
|
36
36
|
blendMode: IBlendMode
|
|
37
37
|
opacity: INumber
|
|
38
|
-
visible: IBoolean
|
|
38
|
+
visible: IBoolean | 0 // 0 = display: none
|
|
39
39
|
selected: IBoolean
|
|
40
40
|
disabled: IBoolean
|
|
41
41
|
locked: IBoolean
|
|
42
42
|
zIndex: INumber
|
|
43
43
|
|
|
44
|
-
mask: IMaskType
|
|
45
|
-
|
|
46
|
-
eraser: IEraserType
|
|
44
|
+
mask: IBoolean | IMaskType
|
|
45
|
+
eraser: IBoolean | IEraserType
|
|
47
46
|
|
|
48
47
|
// layout data
|
|
49
48
|
x: INumber
|
|
@@ -77,8 +76,8 @@ export interface ILeafAttrData {
|
|
|
77
76
|
flow: IFlowType
|
|
78
77
|
padding: IFourNumber
|
|
79
78
|
gap: IGap | IPointGap
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
flowAlign: IFlowAlign | IFlowAxisAlign
|
|
80
|
+
flowWrap: IFlowWrap
|
|
82
81
|
itemBox: IFlowBoxType
|
|
83
82
|
|
|
84
83
|
inFlow: IBoolean
|
|
@@ -128,9 +127,9 @@ export interface IPointGap { x?: IGap, y?: IGap }
|
|
|
128
127
|
|
|
129
128
|
export type IAxisAlign = 'from' | 'center' | 'to'
|
|
130
129
|
|
|
131
|
-
export interface IFlowAxisAlign { content?: IFlowAlign,
|
|
130
|
+
export interface IFlowAxisAlign { content?: IFlowAlign, x?: IAxisAlign, y?: IAxisAlign }
|
|
132
131
|
|
|
133
|
-
export type
|
|
132
|
+
export type IFlowWrap = boolean | 'reverse'
|
|
134
133
|
|
|
135
134
|
export type IAutoSize = IBoolean | INumber | IPercentData
|
|
136
135
|
|
|
@@ -162,13 +161,11 @@ export type IHitType =
|
|
|
162
161
|
| 'none'
|
|
163
162
|
|
|
164
163
|
export type IMaskType =
|
|
165
|
-
| boolean
|
|
166
164
|
| 'path'
|
|
167
165
|
| 'pixel'
|
|
168
166
|
| 'clipping'
|
|
169
167
|
|
|
170
168
|
export type IEraserType =
|
|
171
|
-
| boolean
|
|
172
169
|
| 'path'
|
|
173
170
|
| 'pixel'
|
|
174
171
|
|
|
@@ -200,7 +197,7 @@ export type IBlendMode =
|
|
|
200
197
|
| 'destination-atop'
|
|
201
198
|
| 'xor'
|
|
202
199
|
|
|
203
|
-
export type IEditSize = 'size' | 'scale'
|
|
200
|
+
export type IEditSize = 'size' | 'font-size' | 'scale'
|
|
204
201
|
export interface IImageCursor {
|
|
205
202
|
url: string
|
|
206
203
|
x?: number
|
|
@@ -292,15 +289,14 @@ export interface ILeafInputData {
|
|
|
292
289
|
|
|
293
290
|
blendMode?: IBlendMode
|
|
294
291
|
opacity?: INumber
|
|
295
|
-
visible?: IBoolean
|
|
292
|
+
visible?: IBoolean | 0
|
|
296
293
|
selected?: IBoolean
|
|
297
294
|
disabled?: IBoolean
|
|
298
295
|
locked?: IBoolean
|
|
299
296
|
zIndex?: INumber
|
|
300
297
|
|
|
301
|
-
mask?: IMaskType
|
|
302
|
-
|
|
303
|
-
eraser?: IEraserType
|
|
298
|
+
mask?: IBoolean | IMaskType
|
|
299
|
+
eraser?: IBoolean | IEraserType
|
|
304
300
|
|
|
305
301
|
// layout data
|
|
306
302
|
x?: INumber
|
|
@@ -334,8 +330,8 @@ export interface ILeafInputData {
|
|
|
334
330
|
flow?: IFlowType
|
|
335
331
|
padding?: IFourNumber
|
|
336
332
|
gap?: IGap | IPointGap
|
|
337
|
-
|
|
338
|
-
|
|
333
|
+
flowAlign?: IFlowAlign | IFlowAxisAlign
|
|
334
|
+
flowWrap?: IFlowWrap
|
|
339
335
|
itemBox?: IFlowBoxType
|
|
340
336
|
|
|
341
337
|
inFlow?: IBoolean
|
|
@@ -382,15 +378,14 @@ export interface ILeafComputedData {
|
|
|
382
378
|
|
|
383
379
|
blendMode?: IBlendMode
|
|
384
380
|
opacity?: number
|
|
385
|
-
visible?: boolean
|
|
381
|
+
visible?: boolean | 0
|
|
386
382
|
selected?: boolean
|
|
387
383
|
disabled?: boolean
|
|
388
384
|
locked?: boolean
|
|
389
385
|
zIndex?: number
|
|
390
386
|
|
|
391
387
|
mask?: boolean | IMaskType
|
|
392
|
-
|
|
393
|
-
eraser?: IEraserType
|
|
388
|
+
eraser?: boolean | IEraserType
|
|
394
389
|
|
|
395
390
|
// layout data
|
|
396
391
|
x?: number
|
|
@@ -422,8 +417,8 @@ export interface ILeafComputedData {
|
|
|
422
417
|
flow?: IFlowType
|
|
423
418
|
padding?: IFourNumber
|
|
424
419
|
gap?: IGap | IPointGap
|
|
425
|
-
|
|
426
|
-
|
|
420
|
+
flowAlign?: IFlowAlign | IFlowAxisAlign
|
|
421
|
+
flowWrap?: IFlowWrap
|
|
427
422
|
itemBox?: IFlowBoxType
|
|
428
423
|
|
|
429
424
|
inFlow?: boolean
|
|
@@ -460,8 +455,17 @@ export interface ILeafComputedData {
|
|
|
460
455
|
// other
|
|
461
456
|
__childBranchNumber?: number // 存在子分支的个数
|
|
462
457
|
__complex?: boolean // 外观是否复杂
|
|
458
|
+
|
|
463
459
|
__naturalWidth?: number
|
|
464
460
|
__naturalHeight?: number
|
|
461
|
+
|
|
462
|
+
readonly __autoWidth?: boolean
|
|
463
|
+
readonly __autoHeight?: boolean
|
|
464
|
+
readonly __autoSide?: boolean
|
|
465
|
+
readonly __autoSize?: boolean
|
|
466
|
+
|
|
467
|
+
readonly __useNaturalRatio: boolean // 宽高存在一个值时,另一个自动值是否采用natural尺寸比例
|
|
468
|
+
readonly __isLinePath: boolean
|
|
465
469
|
readonly __blendMode: string
|
|
466
470
|
|
|
467
471
|
__useArrow?: boolean
|
package/src/event/IEventer.ts
CHANGED
|
@@ -36,7 +36,7 @@ export interface IEventer extends ILeafEventer {
|
|
|
36
36
|
__bubbleMap?: IEventListenerMap
|
|
37
37
|
|
|
38
38
|
on(type: string | string[], listener: IEventListener, options?: IEventListenerOptions | boolean): void
|
|
39
|
-
off(type
|
|
39
|
+
off(type?: string | string[], listener?: IEventListener, options?: IEventListenerOptions | boolean): void
|
|
40
40
|
on_(type: string | string[], listener: IEventListener, bind?: IObject, options?: IEventListenerOptions | boolean): IEventListenerId
|
|
41
41
|
off_(id: IEventListenerId | IEventListenerId[]): void
|
|
42
42
|
once(type: string | string[], listener: IEventListener): 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, IFlowType, IFlowBoxType, IAlign, IAxisAlign, IFlowAlign, IFlowAxisAlign, IAxis, IGap, IPointGap, IAxisReverse, IBaseLineAlign,
|
|
3
|
+
export { ILeaf, ILeafAttrData, ILeafComputedData, ILeafInputData, ICachedLeaf, IFlowType, IFlowBoxType, IAlign, IAxisAlign, IFlowAlign, IFlowAxisAlign, IAxis, IGap, IPointGap, IAxisReverse, IBaseLineAlign, IFlowWrap, 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
|
|
|
@@ -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, 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'
|
|
55
|
+
export { IPoint, IPointData, IFromToData, IUnitPointData, IScrollPointData, IClientPointData, 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 { INumberFunction, IPointDataFunction } from '../function/IFunction'
|
|
|
2
2
|
import { IPointerEvent, IMoveEvent, IZoomEvent, IRotateEvent, IUIEvent, IKeyEvent } from '../event/IUIEvent'
|
|
3
3
|
import { ILeaf, ICursorType } from '../display/ILeaf'
|
|
4
4
|
import { ILeafList } from '../data/IList'
|
|
5
|
-
import { IPointData } from '../math/IMath'
|
|
5
|
+
import { IClientPointData, IPointData } from '../math/IMath'
|
|
6
6
|
import { ISelector, IPickOptions, IPickBottom } from '../selector/ISelector'
|
|
7
7
|
import { IBounds } from '../math/IMath'
|
|
8
8
|
import { IControl } from '../control/IControl'
|
|
@@ -70,6 +70,8 @@ export interface IInteraction extends IControl {
|
|
|
70
70
|
updateCursor(hoverData?: IPointerEvent): void
|
|
71
71
|
setCursor(cursor: ICursorType | ICursorType[]): void
|
|
72
72
|
|
|
73
|
+
getLocal(clientPoint: IClientPointData, updateClient?: boolean): IPointData
|
|
74
|
+
|
|
73
75
|
emit(type: string, data: IUIEvent, path?: ILeafList, excludePath?: ILeafList): void
|
|
74
76
|
}
|
|
75
77
|
|
|
@@ -63,8 +63,8 @@ export interface ILeafLayout {
|
|
|
63
63
|
affectChildrenSort?: boolean
|
|
64
64
|
|
|
65
65
|
strokeSpread: number
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
strokeBoxSpread: number // 用于生成strokeBounds
|
|
67
|
+
renderSpread: number // -1 表示需监视变化,不影响实际renderBounds,目前用在Box上
|
|
68
68
|
renderShapeSpread: number
|
|
69
69
|
|
|
70
70
|
// temp local
|
package/src/math/IMath.ts
CHANGED
|
@@ -11,11 +11,21 @@ export interface IUnitPointData {
|
|
|
11
11
|
y: number
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
export interface IFromToData {
|
|
15
|
+
from: IPointData
|
|
16
|
+
to: IPointData
|
|
17
|
+
}
|
|
18
|
+
|
|
14
19
|
export interface IScrollPointData {
|
|
15
20
|
scrollX: number
|
|
16
21
|
scrollY: number
|
|
17
22
|
}
|
|
18
23
|
|
|
24
|
+
export interface IClientPointData {
|
|
25
|
+
clientX: number
|
|
26
|
+
clientY: number
|
|
27
|
+
}
|
|
28
|
+
|
|
19
29
|
export interface IPoint extends IPointData {
|
|
20
30
|
set(x?: number | IPointData, y?: number): IPoint
|
|
21
31
|
get(): IPointData
|
package/types/index.d.ts
CHANGED
|
@@ -9,10 +9,18 @@ interface IUnitPointData {
|
|
|
9
9
|
x: number;
|
|
10
10
|
y: number;
|
|
11
11
|
}
|
|
12
|
+
interface IFromToData {
|
|
13
|
+
from: IPointData;
|
|
14
|
+
to: IPointData;
|
|
15
|
+
}
|
|
12
16
|
interface IScrollPointData {
|
|
13
17
|
scrollX: number;
|
|
14
18
|
scrollY: number;
|
|
15
19
|
}
|
|
20
|
+
interface IClientPointData {
|
|
21
|
+
clientX: number;
|
|
22
|
+
clientY: number;
|
|
23
|
+
}
|
|
16
24
|
interface IPoint extends IPointData {
|
|
17
25
|
set(x?: number | IPointData, y?: number): IPoint;
|
|
18
26
|
get(): IPointData;
|
|
@@ -433,7 +441,7 @@ interface IEventer extends ILeafEventer {
|
|
|
433
441
|
__captureMap?: IEventListenerMap;
|
|
434
442
|
__bubbleMap?: IEventListenerMap;
|
|
435
443
|
on(type: string | string[], listener: IEventListener, options?: IEventListenerOptions | boolean): void;
|
|
436
|
-
off(type
|
|
444
|
+
off(type?: string | string[], listener?: IEventListener, options?: IEventListenerOptions | boolean): void;
|
|
437
445
|
on_(type: string | string[], listener: IEventListener, bind?: IObject, options?: IEventListenerOptions | boolean): IEventListenerId;
|
|
438
446
|
off_(id: IEventListenerId | IEventListenerId[]): void;
|
|
439
447
|
once(type: string | string[], listener: IEventListener): void;
|
|
@@ -829,8 +837,8 @@ interface ILeafLayout {
|
|
|
829
837
|
affectRotation: boolean;
|
|
830
838
|
affectChildrenSort?: boolean;
|
|
831
839
|
strokeSpread: number;
|
|
832
|
-
renderSpread: number;
|
|
833
840
|
strokeBoxSpread: number;
|
|
841
|
+
renderSpread: number;
|
|
834
842
|
renderShapeSpread: number;
|
|
835
843
|
a: number;
|
|
836
844
|
b: number;
|
|
@@ -1021,6 +1029,7 @@ interface ILeaferCanvas extends ICanvasAttr, ICanvasMethod, IPathDrawer {
|
|
|
1021
1029
|
resize(size: IScreenSizeData): void;
|
|
1022
1030
|
updateViewSize(): void;
|
|
1023
1031
|
updateClientBounds(): void;
|
|
1032
|
+
getClientBounds(update?: boolean): IBoundsData;
|
|
1024
1033
|
isSameSize(options: ILeaferCanvasConfig): boolean;
|
|
1025
1034
|
getSameCanvas(useSameWorldTransform?: boolean, useSameSmooth?: boolean): ILeaferCanvas;
|
|
1026
1035
|
recycle(clearBounds?: IBoundsData): void;
|
|
@@ -1219,14 +1228,13 @@ interface ILeafAttrData {
|
|
|
1219
1228
|
className: IString;
|
|
1220
1229
|
blendMode: IBlendMode;
|
|
1221
1230
|
opacity: INumber;
|
|
1222
|
-
visible: IBoolean;
|
|
1231
|
+
visible: IBoolean | 0;
|
|
1223
1232
|
selected: IBoolean;
|
|
1224
1233
|
disabled: IBoolean;
|
|
1225
1234
|
locked: IBoolean;
|
|
1226
1235
|
zIndex: INumber;
|
|
1227
|
-
mask: IMaskType;
|
|
1228
|
-
|
|
1229
|
-
eraser: IEraserType;
|
|
1236
|
+
mask: IBoolean | IMaskType;
|
|
1237
|
+
eraser: IBoolean | IEraserType;
|
|
1230
1238
|
x: INumber;
|
|
1231
1239
|
y: INumber;
|
|
1232
1240
|
width: INumber;
|
|
@@ -1251,8 +1259,8 @@ interface ILeafAttrData {
|
|
|
1251
1259
|
flow: IFlowType;
|
|
1252
1260
|
padding: IFourNumber;
|
|
1253
1261
|
gap: IGap | IPointGap;
|
|
1254
|
-
|
|
1255
|
-
|
|
1262
|
+
flowAlign: IFlowAlign | IFlowAxisAlign;
|
|
1263
|
+
flowWrap: IFlowWrap;
|
|
1256
1264
|
itemBox: IFlowBoxType;
|
|
1257
1265
|
inFlow: IBoolean;
|
|
1258
1266
|
autoWidth: IAutoSize;
|
|
@@ -1290,10 +1298,10 @@ interface IPointGap {
|
|
|
1290
1298
|
type IAxisAlign = 'from' | 'center' | 'to';
|
|
1291
1299
|
interface IFlowAxisAlign {
|
|
1292
1300
|
content?: IFlowAlign;
|
|
1293
|
-
|
|
1294
|
-
|
|
1301
|
+
x?: IAxisAlign;
|
|
1302
|
+
y?: IAxisAlign;
|
|
1295
1303
|
}
|
|
1296
|
-
type
|
|
1304
|
+
type IFlowWrap = boolean | 'reverse';
|
|
1297
1305
|
type IAutoSize = IBoolean | INumber | IPercentData;
|
|
1298
1306
|
interface IRangeSize {
|
|
1299
1307
|
min?: number;
|
|
@@ -1312,10 +1320,10 @@ interface IConstraint {
|
|
|
1312
1320
|
}
|
|
1313
1321
|
type IConstraintType = 'from' | 'center' | 'to' | 'from-to' | 'scale';
|
|
1314
1322
|
type IHitType = 'path' | 'pixel' | 'all' | 'none';
|
|
1315
|
-
type IMaskType =
|
|
1316
|
-
type IEraserType =
|
|
1323
|
+
type IMaskType = 'path' | 'pixel' | 'clipping';
|
|
1324
|
+
type IEraserType = 'path' | 'pixel';
|
|
1317
1325
|
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';
|
|
1318
|
-
type IEditSize = 'size' | 'scale';
|
|
1326
|
+
type IEditSize = 'size' | 'font-size' | 'scale';
|
|
1319
1327
|
interface IImageCursor {
|
|
1320
1328
|
url: string;
|
|
1321
1329
|
x?: number;
|
|
@@ -1336,14 +1344,13 @@ interface ILeafInputData {
|
|
|
1336
1344
|
className?: IString;
|
|
1337
1345
|
blendMode?: IBlendMode;
|
|
1338
1346
|
opacity?: INumber;
|
|
1339
|
-
visible?: IBoolean;
|
|
1347
|
+
visible?: IBoolean | 0;
|
|
1340
1348
|
selected?: IBoolean;
|
|
1341
1349
|
disabled?: IBoolean;
|
|
1342
1350
|
locked?: IBoolean;
|
|
1343
1351
|
zIndex?: INumber;
|
|
1344
|
-
mask?: IMaskType;
|
|
1345
|
-
|
|
1346
|
-
eraser?: IEraserType;
|
|
1352
|
+
mask?: IBoolean | IMaskType;
|
|
1353
|
+
eraser?: IBoolean | IEraserType;
|
|
1347
1354
|
x?: INumber;
|
|
1348
1355
|
y?: INumber;
|
|
1349
1356
|
width?: INumber;
|
|
@@ -1368,8 +1375,8 @@ interface ILeafInputData {
|
|
|
1368
1375
|
flow?: IFlowType;
|
|
1369
1376
|
padding?: IFourNumber;
|
|
1370
1377
|
gap?: IGap | IPointGap;
|
|
1371
|
-
|
|
1372
|
-
|
|
1378
|
+
flowAlign?: IFlowAlign | IFlowAxisAlign;
|
|
1379
|
+
flowWrap?: IFlowWrap;
|
|
1373
1380
|
itemBox?: IFlowBoxType;
|
|
1374
1381
|
inFlow?: IBoolean;
|
|
1375
1382
|
autoWidth?: IAutoSize;
|
|
@@ -1403,14 +1410,13 @@ interface ILeafComputedData {
|
|
|
1403
1410
|
className?: string;
|
|
1404
1411
|
blendMode?: IBlendMode;
|
|
1405
1412
|
opacity?: number;
|
|
1406
|
-
visible?: boolean;
|
|
1413
|
+
visible?: boolean | 0;
|
|
1407
1414
|
selected?: boolean;
|
|
1408
1415
|
disabled?: boolean;
|
|
1409
1416
|
locked?: boolean;
|
|
1410
1417
|
zIndex?: number;
|
|
1411
1418
|
mask?: boolean | IMaskType;
|
|
1412
|
-
|
|
1413
|
-
eraser?: IEraserType;
|
|
1419
|
+
eraser?: boolean | IEraserType;
|
|
1414
1420
|
x?: number;
|
|
1415
1421
|
y?: number;
|
|
1416
1422
|
width?: number;
|
|
@@ -1434,8 +1440,8 @@ interface ILeafComputedData {
|
|
|
1434
1440
|
flow?: IFlowType;
|
|
1435
1441
|
padding?: IFourNumber;
|
|
1436
1442
|
gap?: IGap | IPointGap;
|
|
1437
|
-
|
|
1438
|
-
|
|
1443
|
+
flowAlign?: IFlowAlign | IFlowAxisAlign;
|
|
1444
|
+
flowWrap?: IFlowWrap;
|
|
1439
1445
|
itemBox?: IFlowBoxType;
|
|
1440
1446
|
inFlow?: boolean;
|
|
1441
1447
|
autoWidth?: IAutoSize;
|
|
@@ -1464,6 +1470,12 @@ interface ILeafComputedData {
|
|
|
1464
1470
|
__complex?: boolean;
|
|
1465
1471
|
__naturalWidth?: number;
|
|
1466
1472
|
__naturalHeight?: number;
|
|
1473
|
+
readonly __autoWidth?: boolean;
|
|
1474
|
+
readonly __autoHeight?: boolean;
|
|
1475
|
+
readonly __autoSide?: boolean;
|
|
1476
|
+
readonly __autoSize?: boolean;
|
|
1477
|
+
readonly __useNaturalRatio: boolean;
|
|
1478
|
+
readonly __isLinePath: boolean;
|
|
1467
1479
|
readonly __blendMode: string;
|
|
1468
1480
|
__useArrow?: boolean;
|
|
1469
1481
|
__useEffect?: boolean;
|
|
@@ -1777,6 +1789,7 @@ interface IInteraction extends IControl {
|
|
|
1777
1789
|
updateHoverData(data: IPointerEvent): void;
|
|
1778
1790
|
updateCursor(hoverData?: IPointerEvent): void;
|
|
1779
1791
|
setCursor(cursor: ICursorType | ICursorType[]): void;
|
|
1792
|
+
getLocal(clientPoint: IClientPointData, updateClient?: boolean): IPointData;
|
|
1780
1793
|
emit(type: string, data: IUIEvent, path?: ILeafList, excludePath?: ILeafList): void;
|
|
1781
1794
|
}
|
|
1782
1795
|
interface IInteractionCanvas extends ILeaferCanvas {
|
|
@@ -1873,6 +1886,7 @@ interface ILeaferAttrData {
|
|
|
1873
1886
|
lazyBounds: IBounds;
|
|
1874
1887
|
config: ILeaferConfig;
|
|
1875
1888
|
readonly cursorPoint: IPointData;
|
|
1889
|
+
readonly clientBounds: IBoundsData;
|
|
1876
1890
|
leafs: number;
|
|
1877
1891
|
__eventIds: IEventListenerId[];
|
|
1878
1892
|
__nextRenderWait: IFunction[];
|
|
@@ -1890,6 +1904,7 @@ interface ILeaferAttrData {
|
|
|
1890
1904
|
zoom(zoomType: IZoomType, padding?: IFourNumber, fixedScale?: boolean): IBoundsData;
|
|
1891
1905
|
getValidMove(moveX: number, moveY: number): IPointData;
|
|
1892
1906
|
getValidScale(changeScale: number): number;
|
|
1907
|
+
getWorldPointByClient(clientPoint: IClientPointData, updateClient?: boolean): IPointData;
|
|
1893
1908
|
}
|
|
1894
1909
|
type IZoomType = 'in' | 'out' | 'fit' | 'fit-width' | 'fit-height' | number | ILeaf | ILeaf[] | IBoundsData;
|
|
1895
1910
|
interface ILeaferBase extends IZoomView, IControl, ILeaferAttrData {
|
|
@@ -2095,4 +2110,4 @@ interface ICursorRotateMap {
|
|
|
2095
2110
|
[name: string]: ICursorRotate;
|
|
2096
2111
|
}
|
|
2097
2112
|
|
|
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,
|
|
2113
|
+
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, IClientPointData, 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, IFlowWrap, IFourNumber, IFromToData, 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, IZoomEvent, IZoomType, IZoomView, InnerId, LCommandData, MCommandData, PointerType, QCommandData, RectCommandData, RoundRectCommandData, SCommandData, TCommandData, VCommandData, ZCommandData };
|