@leafer/interface 1.9.6 → 1.9.8
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/display/ILeaf.ts +9 -4
- package/src/display/module/ILeafBounds.ts +3 -2
- package/src/event/IEvent.ts +3 -1
- package/src/event/IUIEvent.ts +2 -0
- package/src/index.ts +2 -2
- package/src/interaction/IInteraction.ts +8 -0
- package/src/interaction/ITransformer.ts +3 -0
- package/src/layout/ILeafLayout.ts +4 -3
- package/src/math/IMath.ts +2 -0
- package/src/platform/IPlatform.ts +2 -0
- package/src/renderer/IRenderer.ts +5 -1
- package/types/index.d.ts +34 -11
package/package.json
CHANGED
package/src/display/ILeaf.ts
CHANGED
|
@@ -235,6 +235,7 @@ export interface ILeafAttrData {
|
|
|
235
235
|
|
|
236
236
|
dim?: IBoolean | INumber // 是否弱化内容,可设置具体透明度
|
|
237
237
|
dimskip?: IBoolean // 跳过弱化,突出显示内容,不受dim影响
|
|
238
|
+
bright?: IBoolean // 突出显示内容,并置顶渲染,不受dim影响
|
|
238
239
|
|
|
239
240
|
mask?: IBoolean | IMaskType
|
|
240
241
|
eraser?: IBoolean | IEraserType
|
|
@@ -264,7 +265,7 @@ export interface ILeafAttrData {
|
|
|
264
265
|
lazy?: IBoolean
|
|
265
266
|
pixelRatio?: INumber
|
|
266
267
|
|
|
267
|
-
renderSpread?:
|
|
268
|
+
renderSpread?: IFourNumber // 扩大渲染边界
|
|
268
269
|
|
|
269
270
|
path?: IPathCommandData | IPathCommandObject[] | IPathString
|
|
270
271
|
windingRule?: IWindingRule
|
|
@@ -341,6 +342,7 @@ export interface ILeafComputedData {
|
|
|
341
342
|
|
|
342
343
|
dim?: boolean | number // 是否弱化内容,可设置具体透明度
|
|
343
344
|
dimskip?: boolean // 跳过弱化,突出显示内容,不受dim影响
|
|
345
|
+
bright?: boolean // 突出显示内容,并置顶渲染,不受dim影响
|
|
344
346
|
|
|
345
347
|
mask?: boolean | IMaskType
|
|
346
348
|
eraser?: boolean | IEraserType
|
|
@@ -368,7 +370,7 @@ export interface ILeafComputedData {
|
|
|
368
370
|
lazy?: boolean
|
|
369
371
|
pixelRatio?: number
|
|
370
372
|
|
|
371
|
-
renderSpread?:
|
|
373
|
+
renderSpread?: IFourNumber
|
|
372
374
|
|
|
373
375
|
path?: IPathCommandData
|
|
374
376
|
windingRule?: IWindingRule
|
|
@@ -440,6 +442,7 @@ export interface ILeafComputedData {
|
|
|
440
442
|
__useArrow?: boolean
|
|
441
443
|
__useEffect?: boolean
|
|
442
444
|
__usePathBox?: boolean // 是否使用路径的bounds作为元素box包围盒
|
|
445
|
+
__useDim?: boolean // 是否使用了弱化/突出元素功能
|
|
443
446
|
|
|
444
447
|
__pathInputed?: number // 是否为输入path, 0:否,1:是,2:永远是(不自动检测)
|
|
445
448
|
__pathForRender?: IPathCommandData
|
|
@@ -486,6 +489,8 @@ export interface ILeaf extends ILeafRender, ILeafHit, ILeafBounds, ILeafMatrix,
|
|
|
486
489
|
__nowWorld?: IMatrixWithBoundsScaleData // use __world or __cameraWorld render
|
|
487
490
|
__cameraWorld?: IMatrixWithBoundsScaleData // use camera matrix render
|
|
488
491
|
|
|
492
|
+
__nowWorldShapeBounds?: IBoundsData
|
|
493
|
+
|
|
489
494
|
readonly __localMatrix: IMatrixData
|
|
490
495
|
readonly __localBoxBounds: IBoundsData
|
|
491
496
|
|
|
@@ -603,8 +608,8 @@ export interface ILeaf extends ILeafRender, ILeafHit, ILeafBounds, ILeafMatrix,
|
|
|
603
608
|
__updateFlowLayout(): void
|
|
604
609
|
__updateNaturalSize(): void
|
|
605
610
|
|
|
606
|
-
__updateStrokeSpread():
|
|
607
|
-
__updateRenderSpread():
|
|
611
|
+
__updateStrokeSpread(): IFourNumber
|
|
612
|
+
__updateRenderSpread(): IFourNumber
|
|
608
613
|
|
|
609
614
|
__onUpdateSize(): void
|
|
610
615
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ILeaf } from '../ILeaf'
|
|
2
|
+
import { IFourNumber } from '../../data/IData'
|
|
2
3
|
|
|
3
4
|
export type ILeafBoundsModule = ILeafBounds & ThisType<ILeaf>
|
|
4
5
|
|
|
@@ -18,8 +19,8 @@ export interface ILeafBounds {
|
|
|
18
19
|
__updateFlowLayout?(): void
|
|
19
20
|
__updateNaturalSize?(): void
|
|
20
21
|
|
|
21
|
-
__updateStrokeSpread?():
|
|
22
|
-
__updateRenderSpread?():
|
|
22
|
+
__updateStrokeSpread?(): IFourNumber
|
|
23
|
+
__updateRenderSpread?(): IFourNumber
|
|
23
24
|
|
|
24
25
|
__onUpdateSize?(): void
|
|
25
26
|
}
|
package/src/event/IEvent.ts
CHANGED
package/src/event/IUIEvent.ts
CHANGED
|
@@ -75,10 +75,12 @@ export interface IDropEvent extends IPointerEvent {
|
|
|
75
75
|
|
|
76
76
|
export interface IRotateEvent extends IPointerEvent {
|
|
77
77
|
rotation: number
|
|
78
|
+
totalRotation?: number
|
|
78
79
|
}
|
|
79
80
|
|
|
80
81
|
export interface IZoomEvent extends IPointerEvent {
|
|
81
82
|
scale: number
|
|
83
|
+
totalScale?: number
|
|
82
84
|
}
|
|
83
85
|
|
|
84
86
|
export interface IMoveEvent extends IDragEvent {
|
package/src/index.ts
CHANGED
|
@@ -46,12 +46,12 @@ export { IExportFileType, IExportImageType } from './file/IFileType'
|
|
|
46
46
|
export { IExportOptions, IJSONOptions, IExportResult, IExportResultFunction, IExportOnCanvasFunction } from './file/IExport'
|
|
47
47
|
|
|
48
48
|
export { InnerId, IEventer, IEventParamsMap, IEventParams, IEventListener, IEventOption, IEventListenerOptions, IEventListenerMap, IEventListenerItem, IEventListenerId } from './event/IEventer'
|
|
49
|
-
export { IEventTarget, IEvent, ILeaferEvent, IPropertyEvent, ILayoutEvent, IRenderEvent, IAnimateEvent, IChildEvent, IBoundsEvent, IResizeEvent, IResizeEventListener, IUpdateEvent, IWatchEvent, IMultiTouchData, IKeepTouchData } from './event/IEvent'
|
|
49
|
+
export { IEventTarget, IEvent, ILeaferEvent, IPropertyEvent, ILayoutEvent, IRenderEvent, IAnimateEvent, IChildEvent, IBoundsEvent, IResizeEvent, IResizeEventListener, IUpdateEvent, IWatchEvent, IMultiTouchData, IGestureType, IKeepTouchData } from './event/IEvent'
|
|
50
50
|
export { IUIEvent, IPointerEvent, PointerType, IDragEvent, IDropEvent, ISwipeEvent, IMoveEvent, IZoomEvent, IRotateEvent, IWheelEvent, IKeyEvent, IShortcutKeys, IShortcutKeysCheck, IShortcutKeyCodes, IKeyCodes, IImageEvent } from './event/IUIEvent'
|
|
51
51
|
export { IProgressData, IProgressFunction } from './event/IProgress'
|
|
52
52
|
|
|
53
53
|
export { ICursorTypeMap, ICursorRotate, ICursorRotateMap } from './interaction/ICursor'
|
|
54
|
-
export { IInteraction, IInteractionCanvas, IInteractionConfig, IMoveConfig, ICursorConfig, IZoomConfig, IWheelConfig, ITouchConfig, IMultiTouchConfig, IPointerConfig } from './interaction/IInteraction'
|
|
54
|
+
export { IInteraction, IInteractionCanvas, IInteractionConfig, IMoveConfig, ICursorConfig, IZoomConfig, IWheelConfig, ITouchConfig, IMultiTouchConfig, ISingleGestureConfig, IPointerConfig } from './interaction/IInteraction'
|
|
55
55
|
export { ITransformer } from './interaction/ITransformer'
|
|
56
56
|
|
|
57
57
|
export { INumber, IBoolean, IString, IValue, IFourNumber, IPathString, ITimer, IObject, INumberMap, IStringMap, IBooleanMap, IFunctionMap, IPointDataMap, IDataTypeHandle } from './data/IData'
|
|
@@ -168,8 +168,16 @@ export interface ITouchConfig {
|
|
|
168
168
|
|
|
169
169
|
export interface IMultiTouchConfig {
|
|
170
170
|
disabled?: boolean
|
|
171
|
+
singleGesture?: boolean | ISingleGestureConfig // 是否单一手势,默认为多个
|
|
171
172
|
}
|
|
172
173
|
|
|
174
|
+
export interface ISingleGestureConfig {
|
|
175
|
+
move?: number, // 识别移动的阈值,默认为 5
|
|
176
|
+
scale?: number, // 识别缩放的阈值,默认为 0.03
|
|
177
|
+
rotation?: number, // 识别旋转的阈值,默认为 2度
|
|
178
|
+
count?: number // 连续识别几次锁定手势类型,默认为 2次
|
|
179
|
+
time?: number // 最长手势类型识别时间,默认为 160ms
|
|
180
|
+
}
|
|
173
181
|
|
|
174
182
|
export interface ICursorConfig {
|
|
175
183
|
stop?: boolean
|
|
@@ -2,6 +2,9 @@ import { IMoveEvent, IZoomEvent, IRotateEvent } from '../event/IUIEvent'
|
|
|
2
2
|
|
|
3
3
|
export interface ITransformer {
|
|
4
4
|
readonly transforming: boolean
|
|
5
|
+
readonly moving: boolean
|
|
6
|
+
readonly zooming: boolean
|
|
7
|
+
readonly rotating: boolean
|
|
5
8
|
move(data: IMoveEvent): void
|
|
6
9
|
zoom(data: IZoomEvent): void
|
|
7
10
|
rotate(data: IRotateEvent): void
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IBoundsData, IMatrixData, ILayoutBoundsData, IPointData } from '../math/IMath'
|
|
2
2
|
import { ILeaf } from '../display/ILeaf'
|
|
3
|
+
import { IFourNumber } from '../data/IData'
|
|
3
4
|
|
|
4
5
|
export type ILocationType = 'world' | 'page' | 'local' | 'inner'
|
|
5
6
|
export type IBoundsType = 'content' | 'box' | 'stroke' | 'render'
|
|
@@ -73,10 +74,10 @@ export interface ILeafLayout {
|
|
|
73
74
|
affectRotation: boolean
|
|
74
75
|
affectChildrenSort?: boolean
|
|
75
76
|
|
|
76
|
-
strokeSpread:
|
|
77
|
+
strokeSpread: IFourNumber
|
|
77
78
|
strokeBoxSpread: number // 用于生成strokeBounds
|
|
78
|
-
renderSpread:
|
|
79
|
-
renderShapeSpread:
|
|
79
|
+
renderSpread: IFourNumber // -1 表示需监视变化,不影响实际renderBounds,目前用在Box上
|
|
80
|
+
renderShapeSpread: IFourNumber
|
|
80
81
|
|
|
81
82
|
// temp local
|
|
82
83
|
a: number
|
package/src/math/IMath.ts
CHANGED
|
@@ -209,6 +209,7 @@ export interface IMatrix extends IMatrixWithScaleData {
|
|
|
209
209
|
|
|
210
210
|
scale(x: number, y?: number): IMatrix
|
|
211
211
|
scaleWith(x: number, y?: number): IMatrix // change scaleX scaleY
|
|
212
|
+
pixelScale(pixelRatio: number): IMatrix
|
|
212
213
|
scaleOfOuter(origin: IPointData, x: number, y?: number): IMatrix
|
|
213
214
|
scaleOfInner(origin: IPointData, x: number, y?: number): IMatrix
|
|
214
215
|
|
|
@@ -250,6 +251,7 @@ export interface IMatrixWithOptionScaleData extends IMatrixData {
|
|
|
250
251
|
|
|
251
252
|
export interface IMatrixWithOptionHalfData extends IMatrixData {
|
|
252
253
|
half?: number // hasHalfPixel, 是否存在半像素(奇数线宽的居中线条),可以半像素为起点绘制,防止模糊
|
|
254
|
+
ignorePixelSnap?: boolean // 是否忽略对齐像素
|
|
253
255
|
}
|
|
254
256
|
|
|
255
257
|
export interface IMatrixWithBoundsScaleData extends IMatrixWithOptionHalfData, IBoundsData, IScaleData { }
|
|
@@ -7,6 +7,7 @@ import { IObject } from '../data/IData'
|
|
|
7
7
|
import { ICanvasType } from '../canvas/ISkiaCanvas'
|
|
8
8
|
import { ISelector } from '../selector/ISelector'
|
|
9
9
|
import { IProgressFunction } from '../event/IProgress'
|
|
10
|
+
import { IRenderOptions } from '../renderer/IRenderer'
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
export interface IPlatform {
|
|
@@ -33,6 +34,7 @@ export interface IPlatform {
|
|
|
33
34
|
selector?: ISelector // 公共查找选择器
|
|
34
35
|
getSelector?(leaf: ILeaf): ISelector
|
|
35
36
|
layout?(target: ILeaf): void
|
|
37
|
+
render?(target: ILeaf, canvas: ILeaferCanvas, options: IRenderOptions): void // 渲染元素,可处理内部产生的置顶渲染
|
|
36
38
|
|
|
37
39
|
origin?: {
|
|
38
40
|
createCanvas(width: number, height: number, format?: 'svg' | 'pdf'): any
|
|
@@ -3,6 +3,7 @@ import { ILeaf } from '../display/ILeaf'
|
|
|
3
3
|
import { IBounds, IMatrixWithScaleData } from '../math/IMath'
|
|
4
4
|
import { IFunction } from '../function/IFunction'
|
|
5
5
|
import { IControl } from '../control/IControl'
|
|
6
|
+
import { ILeafList } from '../data/IList'
|
|
6
7
|
|
|
7
8
|
export interface IRenderOptions {
|
|
8
9
|
includes?: boolean,
|
|
@@ -10,9 +11,12 @@ export interface IRenderOptions {
|
|
|
10
11
|
hideBounds?: IBounds,
|
|
11
12
|
matrix?: IMatrixWithScaleData,
|
|
12
13
|
inCamera?: boolean
|
|
13
|
-
dimOpacity?: number
|
|
14
14
|
exporting?: boolean // 是否通过 export() 导出渲染
|
|
15
15
|
|
|
16
|
+
dimOpacity?: number // 淡化
|
|
17
|
+
topList?: ILeafList // 收集需要置顶渲染的内容
|
|
18
|
+
topRendering?: boolean // 是否正在渲染置顶内容
|
|
19
|
+
|
|
16
20
|
// 只渲染外形
|
|
17
21
|
shape?: boolean
|
|
18
22
|
ignoreFill?: boolean, // 绘制外形时忽略fill
|
package/types/index.d.ts
CHANGED
|
@@ -156,6 +156,7 @@ interface IMatrix extends IMatrixWithScaleData {
|
|
|
156
156
|
translateInner(x: number, y: number): IMatrix;
|
|
157
157
|
scale(x: number, y?: number): IMatrix;
|
|
158
158
|
scaleWith(x: number, y?: number): IMatrix;
|
|
159
|
+
pixelScale(pixelRatio: number): IMatrix;
|
|
159
160
|
scaleOfOuter(origin: IPointData, x: number, y?: number): IMatrix;
|
|
160
161
|
scaleOfInner(origin: IPointData, x: number, y?: number): IMatrix;
|
|
161
162
|
rotate(angle: number): IMatrix;
|
|
@@ -187,6 +188,7 @@ interface IMatrixWithOptionScaleData extends IMatrixData {
|
|
|
187
188
|
}
|
|
188
189
|
interface IMatrixWithOptionHalfData extends IMatrixData {
|
|
189
190
|
half?: number;
|
|
191
|
+
ignorePixelSnap?: boolean;
|
|
190
192
|
}
|
|
191
193
|
interface IMatrixWithBoundsScaleData extends IMatrixWithOptionHalfData, IBoundsData, IScaleData {
|
|
192
194
|
}
|
|
@@ -423,6 +425,7 @@ interface IKeepTouchData {
|
|
|
423
425
|
from: IPointData;
|
|
424
426
|
to: IPointData;
|
|
425
427
|
}
|
|
428
|
+
type IGestureType = 'move' | 'zoom' | 'rotate' | 'none';
|
|
426
429
|
|
|
427
430
|
type ILeafEventerModule = ILeafEventer & ThisType<ILeaf>;
|
|
428
431
|
interface ILeafEventer {
|
|
@@ -907,10 +910,10 @@ interface ILeafLayout {
|
|
|
907
910
|
affectScaleOrRotation: boolean;
|
|
908
911
|
affectRotation: boolean;
|
|
909
912
|
affectChildrenSort?: boolean;
|
|
910
|
-
strokeSpread:
|
|
913
|
+
strokeSpread: IFourNumber;
|
|
911
914
|
strokeBoxSpread: number;
|
|
912
|
-
renderSpread:
|
|
913
|
-
renderShapeSpread:
|
|
915
|
+
renderSpread: IFourNumber;
|
|
916
|
+
renderShapeSpread: IFourNumber;
|
|
914
917
|
a: number;
|
|
915
918
|
b: number;
|
|
916
919
|
c: number;
|
|
@@ -1145,8 +1148,10 @@ interface IRenderOptions {
|
|
|
1145
1148
|
hideBounds?: IBounds;
|
|
1146
1149
|
matrix?: IMatrixWithScaleData;
|
|
1147
1150
|
inCamera?: boolean;
|
|
1148
|
-
dimOpacity?: number;
|
|
1149
1151
|
exporting?: boolean;
|
|
1152
|
+
dimOpacity?: number;
|
|
1153
|
+
topList?: ILeafList;
|
|
1154
|
+
topRendering?: boolean;
|
|
1150
1155
|
shape?: boolean;
|
|
1151
1156
|
ignoreFill?: boolean;
|
|
1152
1157
|
ignoreStroke?: boolean;
|
|
@@ -1211,8 +1216,8 @@ interface ILeafBounds {
|
|
|
1211
1216
|
__updateAutoLayout?(): void;
|
|
1212
1217
|
__updateFlowLayout?(): void;
|
|
1213
1218
|
__updateNaturalSize?(): void;
|
|
1214
|
-
__updateStrokeSpread?():
|
|
1215
|
-
__updateRenderSpread?():
|
|
1219
|
+
__updateStrokeSpread?(): IFourNumber;
|
|
1220
|
+
__updateRenderSpread?(): IFourNumber;
|
|
1216
1221
|
__onUpdateSize?(): void;
|
|
1217
1222
|
}
|
|
1218
1223
|
|
|
@@ -1462,6 +1467,7 @@ interface ILeafAttrData {
|
|
|
1462
1467
|
zIndex?: INumber;
|
|
1463
1468
|
dim?: IBoolean | INumber;
|
|
1464
1469
|
dimskip?: IBoolean;
|
|
1470
|
+
bright?: IBoolean;
|
|
1465
1471
|
mask?: IBoolean | IMaskType;
|
|
1466
1472
|
eraser?: IBoolean | IEraserType;
|
|
1467
1473
|
filter?: IFilter | IFilter[];
|
|
@@ -1483,7 +1489,7 @@ interface ILeafAttrData {
|
|
|
1483
1489
|
around?: IAlign | IUnitPointData;
|
|
1484
1490
|
lazy?: IBoolean;
|
|
1485
1491
|
pixelRatio?: INumber;
|
|
1486
|
-
renderSpread?:
|
|
1492
|
+
renderSpread?: IFourNumber;
|
|
1487
1493
|
path?: IPathCommandData | IPathCommandObject[] | IPathString;
|
|
1488
1494
|
windingRule?: IWindingRule;
|
|
1489
1495
|
closed?: IBoolean;
|
|
@@ -1538,6 +1544,7 @@ interface ILeafComputedData {
|
|
|
1538
1544
|
zIndex?: number;
|
|
1539
1545
|
dim?: boolean | number;
|
|
1540
1546
|
dimskip?: boolean;
|
|
1547
|
+
bright?: boolean;
|
|
1541
1548
|
mask?: boolean | IMaskType;
|
|
1542
1549
|
eraser?: boolean | IEraserType;
|
|
1543
1550
|
filter?: IFilter[];
|
|
@@ -1558,7 +1565,7 @@ interface ILeafComputedData {
|
|
|
1558
1565
|
around?: IAlign | IUnitPointData;
|
|
1559
1566
|
lazy?: boolean;
|
|
1560
1567
|
pixelRatio?: number;
|
|
1561
|
-
renderSpread?:
|
|
1568
|
+
renderSpread?: IFourNumber;
|
|
1562
1569
|
path?: IPathCommandData;
|
|
1563
1570
|
windingRule?: IWindingRule;
|
|
1564
1571
|
closed?: boolean;
|
|
@@ -1609,6 +1616,7 @@ interface ILeafComputedData {
|
|
|
1609
1616
|
__useArrow?: boolean;
|
|
1610
1617
|
__useEffect?: boolean;
|
|
1611
1618
|
__usePathBox?: boolean;
|
|
1619
|
+
__useDim?: boolean;
|
|
1612
1620
|
__pathInputed?: number;
|
|
1613
1621
|
__pathForRender?: IPathCommandData;
|
|
1614
1622
|
__path2DForRender?: IPath2D;
|
|
@@ -1642,6 +1650,7 @@ interface ILeaf extends ILeafRender, ILeafHit, ILeafBounds, ILeafMatrix, ILeafDa
|
|
|
1642
1650
|
__local?: IMatrixWithBoundsData;
|
|
1643
1651
|
__nowWorld?: IMatrixWithBoundsScaleData;
|
|
1644
1652
|
__cameraWorld?: IMatrixWithBoundsScaleData;
|
|
1653
|
+
__nowWorldShapeBounds?: IBoundsData;
|
|
1645
1654
|
readonly __localMatrix: IMatrixData;
|
|
1646
1655
|
readonly __localBoxBounds: IBoundsData;
|
|
1647
1656
|
__worldOpacity: number;
|
|
@@ -1723,8 +1732,8 @@ interface ILeaf extends ILeafRender, ILeafHit, ILeafBounds, ILeafMatrix, ILeafDa
|
|
|
1723
1732
|
__updateAutoLayout(): void;
|
|
1724
1733
|
__updateFlowLayout(): void;
|
|
1725
1734
|
__updateNaturalSize(): void;
|
|
1726
|
-
__updateStrokeSpread():
|
|
1727
|
-
__updateRenderSpread():
|
|
1735
|
+
__updateStrokeSpread(): IFourNumber;
|
|
1736
|
+
__updateRenderSpread(): IFourNumber;
|
|
1728
1737
|
__onUpdateSize(): void;
|
|
1729
1738
|
__updateEraser(value?: boolean): void;
|
|
1730
1739
|
__updateMask(value?: boolean): void;
|
|
@@ -1917,9 +1926,11 @@ interface IDropEvent extends IPointerEvent {
|
|
|
1917
1926
|
}
|
|
1918
1927
|
interface IRotateEvent extends IPointerEvent {
|
|
1919
1928
|
rotation: number;
|
|
1929
|
+
totalRotation?: number;
|
|
1920
1930
|
}
|
|
1921
1931
|
interface IZoomEvent extends IPointerEvent {
|
|
1922
1932
|
scale: number;
|
|
1933
|
+
totalScale?: number;
|
|
1923
1934
|
}
|
|
1924
1935
|
interface IMoveEvent extends IDragEvent {
|
|
1925
1936
|
moveType?: 'drag' | 'move';
|
|
@@ -2071,6 +2082,14 @@ interface ITouchConfig {
|
|
|
2071
2082
|
}
|
|
2072
2083
|
interface IMultiTouchConfig {
|
|
2073
2084
|
disabled?: boolean;
|
|
2085
|
+
singleGesture?: boolean | ISingleGestureConfig;
|
|
2086
|
+
}
|
|
2087
|
+
interface ISingleGestureConfig {
|
|
2088
|
+
move?: number;
|
|
2089
|
+
scale?: number;
|
|
2090
|
+
rotation?: number;
|
|
2091
|
+
count?: number;
|
|
2092
|
+
time?: number;
|
|
2074
2093
|
}
|
|
2075
2094
|
interface ICursorConfig {
|
|
2076
2095
|
stop?: boolean;
|
|
@@ -2296,6 +2315,7 @@ interface IPlatform {
|
|
|
2296
2315
|
selector?: ISelector;
|
|
2297
2316
|
getSelector?(leaf: ILeaf): ISelector;
|
|
2298
2317
|
layout?(target: ILeaf): void;
|
|
2318
|
+
render?(target: ILeaf, canvas: ILeaferCanvas, options: IRenderOptions): void;
|
|
2299
2319
|
origin?: {
|
|
2300
2320
|
createCanvas(width: number, height: number, format?: 'svg' | 'pdf'): any;
|
|
2301
2321
|
canvasToDataURL(canvas: any, type?: IExportImageType, quality?: number): string | Promise<string>;
|
|
@@ -2375,6 +2395,9 @@ interface ICursorRotateMap {
|
|
|
2375
2395
|
|
|
2376
2396
|
interface ITransformer {
|
|
2377
2397
|
readonly transforming: boolean;
|
|
2398
|
+
readonly moving: boolean;
|
|
2399
|
+
readonly zooming: boolean;
|
|
2400
|
+
readonly rotating: boolean;
|
|
2378
2401
|
move(data: IMoveEvent): void;
|
|
2379
2402
|
zoom(data: IZoomEvent): void;
|
|
2380
2403
|
rotate(data: IRotateEvent): void;
|
|
@@ -2382,4 +2405,4 @@ interface ITransformer {
|
|
|
2382
2405
|
destroy(): void;
|
|
2383
2406
|
}
|
|
2384
2407
|
|
|
2385
|
-
export type { ACommandData, ArcCommandData, ArcToCommandData, BezierCurveToCommandObject, CCommandData, CanvasPathCommand, EllipseCommandData, HCommandData, IAlign, IAnimateEasing, IAnimateEasingFunction, IAnimateEasingName, IAnimateEnding, IAnimateEvent, IAnimateEventFunction, IAnimateEvents, IAnimateOptions, IAnswer, IAppBase, IAround, IAttrDecorator, IAutoBounds, IAutoBoundsData, IAutoBoxData, IAutoSize, IAxis, IAxisAlign, IAxisReverse, IBaseLineAlign, IBlendMode, IBlob, IBlobFunction, IBoolean, IBooleanMap, IBounds, IBoundsData, IBoundsDataFn, IBoundsEvent, IBoundsType, IBranch, IBranchRender, IBranchRenderModule, ICachedLeaf, ICanvasAttr, ICanvasCacheOptions, ICanvasContext2D, ICanvasContext2DSettings, ICanvasManager, ICanvasPattern, ICanvasSizeAttr, ICanvasStrokeOptions, ICanvasType, IChildEvent, IClientPointData, IConstraint, IConstraintType, IControl, ICreator, ICubicBezierEasing, ICursorConfig, ICursorRotate, ICursorRotateMap, ICursorType, ICursorTypeMap, ICustomEasingFunction, IDataProcessor, IDataTypeHandle, IDirection, IDirection4, IDragBoundsType, IDragEvent, IDropEvent, IEditSize, IEraserType, IEvent, IEventListener, IEventListenerId, IEventListenerItem, IEventListenerMap, IEventListenerOptions, IEventOption, IEventParams, IEventParamsMap, IEventTarget, IEventer, IExportFileType, IExportImageType, IExportOnCanvasFunction, IExportOptions, IExportResult, IExportResultFunction, IFilter, IFindCondition, IFindMethod, IFinder, IFlowAlign, IFlowAxisAlign, IFlowBoxType, IFlowType, IFlowWrap, IFourNumber, IFromToData, IFunction, IFunctionMap, IGap, IHitCanvas, IHitCanvasConfig, IHitCanvasManager, IHitType, IImageCursor, IImageEvent, IImageManager, IInteraction, IInteractionCanvas, IInteractionConfig, IJSONOptions, IKeepTouchData, IKeyCodes, 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, ILeaferMode, ILeaferType, ILeaferTypeCreator, ILeaferTypeFunction, ILeaferTypeList, ILocationType, IMaskType, IMatrix, IMatrixData, IMatrixWithBoundsData, IMatrixWithBoundsScaleData, IMatrixWithLayoutData, IMatrixWithOptionHalfData, IMatrixWithOptionScaleData, IMatrixWithScaleData, IMiniapp, IMiniappSelect, IMiniappSizeView, IMotionPathData, IMoveConfig, IMoveEvent, IMultiTouchConfig, IMultiTouchData, INumber, INumberFunction, INumberMap, IObject, IObjectFunction, IOffsetBoundsData, IOptionSizeData, IPartLayoutConfig, IPath2D, IPathCommandData, IPathCommandObject, IPathCreator, IPathDrawer, IPathString, IPercentData, IPickBottom, IPickOptions, IPickResult, IPicker, IPlatform, IPlugin, IPoint, IPointData, IPointDataFunction, IPointDataMap, IPointGap, IPointerConfig, IPointerEvent, IProgressData, IProgressFunction, IPropertyEvent, IRadiusPointData, IRangeSize, IRenderEvent, IRenderOptions, IRenderer, IRendererConfig, IResizeEvent, IResizeEventListener, IResource, IRotateEvent, IRotationPointData, IScaleData, IScaleFixed, IScaleRotationData, IScreenSizeData, IScrollPointData, ISelector, ISelectorConfig, ISelectorProxy, IShortcutKeyCodes, IShortcutKeys, IShortcutKeysCheck, ISide, ISize, ISizeData, ISkewData, ISkiaCanvas, ISkiaCanvasExportConfig, ISkiaNAPICanvas, IStateStyleType, IStepsEasing, IString, IStringFunction, IStringMap, ISwipeEvent, ITaskItem, ITaskOptions, ITaskProcessor, ITaskProcessorConfig, ITextMetrics, ITimer, ITouchConfig, ITransformer, ITransition, ITwoPointBoundsData, IUICreator, IUIEvent, IUnitData, IUnitPointData, IUpdateEvent, IValue, IValueFunction, IWatchEvent, IWatchEventData, IWatcher, IWatcherConfig, IWheelConfig, IWheelEvent, IWindingRule, IWindingRuleData, IZoomConfig, IZoomEvent, IZoomOptions, IZoomType, IZoomView, InnerId, LCommandData, LineToCommandObject, MCommandData, MoveToCommandObject, PointerType, QCommandData, QuadraticCurveToCommandObject, RectCommandData, RoundRectCommandData, SCommandData, TCommandData, VCommandData, ZCommandData };
|
|
2408
|
+
export type { ACommandData, ArcCommandData, ArcToCommandData, BezierCurveToCommandObject, CCommandData, CanvasPathCommand, EllipseCommandData, HCommandData, IAlign, IAnimateEasing, IAnimateEasingFunction, IAnimateEasingName, IAnimateEnding, IAnimateEvent, IAnimateEventFunction, IAnimateEvents, IAnimateOptions, IAnswer, IAppBase, IAround, IAttrDecorator, IAutoBounds, IAutoBoundsData, IAutoBoxData, IAutoSize, IAxis, IAxisAlign, IAxisReverse, IBaseLineAlign, IBlendMode, IBlob, IBlobFunction, IBoolean, IBooleanMap, IBounds, IBoundsData, IBoundsDataFn, IBoundsEvent, IBoundsType, IBranch, IBranchRender, IBranchRenderModule, ICachedLeaf, ICanvasAttr, ICanvasCacheOptions, ICanvasContext2D, ICanvasContext2DSettings, ICanvasManager, ICanvasPattern, ICanvasSizeAttr, ICanvasStrokeOptions, ICanvasType, IChildEvent, IClientPointData, IConstraint, IConstraintType, IControl, ICreator, ICubicBezierEasing, ICursorConfig, ICursorRotate, ICursorRotateMap, ICursorType, ICursorTypeMap, ICustomEasingFunction, IDataProcessor, IDataTypeHandle, IDirection, IDirection4, IDragBoundsType, IDragEvent, IDropEvent, IEditSize, IEraserType, IEvent, IEventListener, IEventListenerId, IEventListenerItem, IEventListenerMap, IEventListenerOptions, IEventOption, IEventParams, IEventParamsMap, IEventTarget, IEventer, IExportFileType, IExportImageType, IExportOnCanvasFunction, IExportOptions, IExportResult, IExportResultFunction, IFilter, IFindCondition, IFindMethod, IFinder, IFlowAlign, IFlowAxisAlign, IFlowBoxType, IFlowType, IFlowWrap, IFourNumber, IFromToData, IFunction, IFunctionMap, IGap, IGestureType, IHitCanvas, IHitCanvasConfig, IHitCanvasManager, IHitType, IImageCursor, IImageEvent, IImageManager, IInteraction, IInteractionCanvas, IInteractionConfig, IJSONOptions, IKeepTouchData, IKeyCodes, 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, ILeaferMode, ILeaferType, ILeaferTypeCreator, ILeaferTypeFunction, ILeaferTypeList, ILocationType, IMaskType, IMatrix, IMatrixData, IMatrixWithBoundsData, IMatrixWithBoundsScaleData, IMatrixWithLayoutData, IMatrixWithOptionHalfData, IMatrixWithOptionScaleData, IMatrixWithScaleData, IMiniapp, IMiniappSelect, IMiniappSizeView, IMotionPathData, IMoveConfig, IMoveEvent, IMultiTouchConfig, IMultiTouchData, INumber, INumberFunction, INumberMap, IObject, IObjectFunction, IOffsetBoundsData, IOptionSizeData, IPartLayoutConfig, IPath2D, IPathCommandData, IPathCommandObject, IPathCreator, IPathDrawer, IPathString, IPercentData, IPickBottom, IPickOptions, IPickResult, IPicker, IPlatform, IPlugin, IPoint, IPointData, IPointDataFunction, IPointDataMap, IPointGap, IPointerConfig, IPointerEvent, IProgressData, IProgressFunction, IPropertyEvent, IRadiusPointData, IRangeSize, IRenderEvent, IRenderOptions, IRenderer, IRendererConfig, IResizeEvent, IResizeEventListener, IResource, IRotateEvent, IRotationPointData, IScaleData, IScaleFixed, IScaleRotationData, IScreenSizeData, IScrollPointData, ISelector, ISelectorConfig, ISelectorProxy, IShortcutKeyCodes, IShortcutKeys, IShortcutKeysCheck, ISide, ISingleGestureConfig, ISize, ISizeData, ISkewData, ISkiaCanvas, ISkiaCanvasExportConfig, ISkiaNAPICanvas, IStateStyleType, IStepsEasing, IString, IStringFunction, IStringMap, ISwipeEvent, ITaskItem, ITaskOptions, ITaskProcessor, ITaskProcessorConfig, ITextMetrics, ITimer, ITouchConfig, ITransformer, ITransition, ITwoPointBoundsData, IUICreator, IUIEvent, IUnitData, IUnitPointData, IUpdateEvent, IValue, IValueFunction, IWatchEvent, IWatchEventData, IWatcher, IWatcherConfig, IWheelConfig, IWheelEvent, IWindingRule, IWindingRuleData, IZoomConfig, IZoomEvent, IZoomOptions, IZoomType, IZoomView, InnerId, LCommandData, LineToCommandObject, MCommandData, MoveToCommandObject, PointerType, QCommandData, QuadraticCurveToCommandObject, RectCommandData, RoundRectCommandData, SCommandData, TCommandData, VCommandData, ZCommandData };
|