@leafer/interface 1.0.4 → 1.0.5
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/IBranch.ts +2 -2
- package/src/display/ILeaf.ts +5 -2
- package/src/index.ts +1 -1
- package/src/interaction/IInteraction.ts +5 -0
- package/src/selector/ISelector.ts +1 -0
- package/types/index.d.ts +11 -4
package/package.json
CHANGED
package/src/display/IBranch.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ILeaf } from './ILeaf'
|
|
1
|
+
import { ILeaf, ILeafInputData } from './ILeaf'
|
|
2
2
|
import { ILeaferCanvas } from '../canvas/ILeaferCanvas'
|
|
3
3
|
import { IRenderOptions } from '../renderer/IRenderer'
|
|
4
4
|
|
|
5
5
|
export interface IBranch extends ILeaf {
|
|
6
6
|
children: ILeaf[]
|
|
7
7
|
__renderBranch?(canvas: ILeaferCanvas, options: IRenderOptions): void
|
|
8
|
-
addMany(...children: ILeaf[]): void
|
|
8
|
+
addMany(...children: ILeaf[] | ILeafInputData[]): void
|
|
9
9
|
removeAll(destroy?: boolean): void
|
|
10
10
|
clear(): void
|
|
11
11
|
}
|
package/src/display/ILeaf.ts
CHANGED
|
@@ -429,6 +429,9 @@ export interface ILeaf extends ILeafRender, ILeafHit, ILeafBounds, ILeafMatrix,
|
|
|
429
429
|
parent?: ILeaf
|
|
430
430
|
zoomLayer?: ILeaf
|
|
431
431
|
|
|
432
|
+
readonly leaferIsCreated: boolean
|
|
433
|
+
readonly leaferIsReady: boolean
|
|
434
|
+
|
|
432
435
|
readonly isApp?: boolean
|
|
433
436
|
readonly isLeafer?: boolean
|
|
434
437
|
readonly isBranch?: boolean
|
|
@@ -662,8 +665,8 @@ export interface ILeaf extends ILeafRender, ILeafHit, ILeafBounds, ILeafMatrix,
|
|
|
662
665
|
children?: ILeaf[]
|
|
663
666
|
|
|
664
667
|
__updateSortChildren(): void
|
|
665
|
-
add(child: ILeaf, index?: number): void
|
|
666
|
-
remove(child?: ILeaf, destroy?: boolean): void
|
|
668
|
+
add(child: ILeaf | ILeafInputData, index?: number): void
|
|
669
|
+
remove(child?: ILeaf | number | string | IFindMethod, destroy?: boolean): void
|
|
667
670
|
dropTo(parent: ILeaf, index?: number, resize?: boolean): void
|
|
668
671
|
}
|
|
669
672
|
|
package/src/index.ts
CHANGED
|
@@ -48,7 +48,7 @@ export { InnerId, IEventer, IEventMap, IEventListener, IEventOption, IEventListe
|
|
|
48
48
|
export { IEventTarget, IEvent, ILeaferEvent, IPropertyEvent, ILayoutEvent, IRenderEvent, IAnimateEvent, IChildEvent, IResizeEvent, IResizeEventListener, IUpdateEvent, IWatchEvent, IMultiTouchData, IKeepTouchData } from './event/IEvent'
|
|
49
49
|
export { IUIEvent, IPointerEvent, PointerType, IDragEvent, IDropEvent, ISwipeEvent, IMoveEvent, IZoomEvent, IRotateEvent, IKeyEvent, IImageEvent } from './event/IUIEvent'
|
|
50
50
|
export { ICursorTypeMap, ICursorRotate, ICursorRotateMap } from './interaction/ICursor'
|
|
51
|
-
export { IInteraction, IInteractionCanvas, IInteractionConfig, IWheelConfig, ITouchConfig, IPointerConfig } from './interaction/IInteraction'
|
|
51
|
+
export { IInteraction, IInteractionCanvas, IInteractionConfig, IWheelConfig, ITouchConfig, IMultiTouchConfig, IPointerConfig } from './interaction/IInteraction'
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
export { INumber, IBoolean, IString, IValue, IFourNumber, IPathString, ITimer, IObject, INumberMap, IStringMap, IBooleanMap, IFunctionMap, IPointDataMap, IDataTypeHandle } from './data/IData'
|
|
@@ -94,6 +94,7 @@ export interface IInteractionConfig {
|
|
|
94
94
|
wheel?: IWheelConfig
|
|
95
95
|
pointer?: IPointerConfig
|
|
96
96
|
touch?: ITouchConfig
|
|
97
|
+
multiTouch?: IMultiTouchConfig
|
|
97
98
|
zoom?: IZoomConfig
|
|
98
99
|
move?: IMoveConfig
|
|
99
100
|
eventer?: IObject
|
|
@@ -156,6 +157,10 @@ export interface ITouchConfig {
|
|
|
156
157
|
preventDefault?: boolean | 'auto'
|
|
157
158
|
}
|
|
158
159
|
|
|
160
|
+
export interface IMultiTouchConfig {
|
|
161
|
+
disabled?: boolean
|
|
162
|
+
}
|
|
163
|
+
|
|
159
164
|
|
|
160
165
|
export interface ICursorConfig {
|
|
161
166
|
stop?: boolean
|
package/types/index.d.ts
CHANGED
|
@@ -1189,7 +1189,7 @@ interface ILeafData extends IDataProcessor, ILeafComputedData {
|
|
|
1189
1189
|
interface IBranch extends ILeaf {
|
|
1190
1190
|
children: ILeaf[];
|
|
1191
1191
|
__renderBranch?(canvas: ILeaferCanvas, options: IRenderOptions): void;
|
|
1192
|
-
addMany(...children: ILeaf[]): void;
|
|
1192
|
+
addMany(...children: ILeaf[] | ILeafInputData[]): void;
|
|
1193
1193
|
removeAll(destroy?: boolean): void;
|
|
1194
1194
|
clear(): void;
|
|
1195
1195
|
}
|
|
@@ -1226,6 +1226,7 @@ interface IFindMethod {
|
|
|
1226
1226
|
}
|
|
1227
1227
|
interface ISelectorProxy {
|
|
1228
1228
|
list: ILeaf[];
|
|
1229
|
+
dragHoverExclude: ILeaf[];
|
|
1229
1230
|
}
|
|
1230
1231
|
interface ISelector {
|
|
1231
1232
|
target: ILeaf;
|
|
@@ -1467,6 +1468,8 @@ interface ILeaf extends ILeafRender, ILeafHit, ILeafBounds, ILeafMatrix, ILeafDa
|
|
|
1467
1468
|
leafer?: ILeaferBase;
|
|
1468
1469
|
parent?: ILeaf;
|
|
1469
1470
|
zoomLayer?: ILeaf;
|
|
1471
|
+
readonly leaferIsCreated: boolean;
|
|
1472
|
+
readonly leaferIsReady: boolean;
|
|
1470
1473
|
readonly isApp?: boolean;
|
|
1471
1474
|
readonly isLeafer?: boolean;
|
|
1472
1475
|
readonly isBranch?: boolean;
|
|
@@ -1628,8 +1631,8 @@ interface ILeaf extends ILeafRender, ILeafHit, ILeafBounds, ILeafMatrix, ILeafDa
|
|
|
1628
1631
|
__emitLifeEvent(type: string): void;
|
|
1629
1632
|
children?: ILeaf[];
|
|
1630
1633
|
__updateSortChildren(): void;
|
|
1631
|
-
add(child: ILeaf, index?: number): void;
|
|
1632
|
-
remove(child?: ILeaf, destroy?: boolean): void;
|
|
1634
|
+
add(child: ILeaf | ILeafInputData, index?: number): void;
|
|
1635
|
+
remove(child?: ILeaf | number | string | IFindMethod, destroy?: boolean): void;
|
|
1633
1636
|
dropTo(parent: ILeaf, index?: number, resize?: boolean): void;
|
|
1634
1637
|
}
|
|
1635
1638
|
type ILeafAttrDescriptor = IObject & ThisType<ILeaf>;
|
|
@@ -1809,6 +1812,7 @@ interface IInteractionConfig {
|
|
|
1809
1812
|
wheel?: IWheelConfig;
|
|
1810
1813
|
pointer?: IPointerConfig;
|
|
1811
1814
|
touch?: ITouchConfig;
|
|
1815
|
+
multiTouch?: IMultiTouchConfig;
|
|
1812
1816
|
zoom?: IZoomConfig;
|
|
1813
1817
|
move?: IMoveConfig;
|
|
1814
1818
|
eventer?: IObject;
|
|
@@ -1862,6 +1866,9 @@ interface IPointerConfig {
|
|
|
1862
1866
|
interface ITouchConfig {
|
|
1863
1867
|
preventDefault?: boolean | 'auto';
|
|
1864
1868
|
}
|
|
1869
|
+
interface IMultiTouchConfig {
|
|
1870
|
+
disabled?: boolean;
|
|
1871
|
+
}
|
|
1865
1872
|
|
|
1866
1873
|
interface IHitCanvasManager extends ICanvasManager {
|
|
1867
1874
|
maxTotal: number;
|
|
@@ -2132,4 +2139,4 @@ interface ICursorRotateMap {
|
|
|
2132
2139
|
[name: string]: ICursorRotate;
|
|
2133
2140
|
}
|
|
2134
2141
|
|
|
2135
|
-
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, IDirection4, IDragEvent, IDropEvent, IEditSize, IEraserType, IEvent, IEventListener, IEventListenerId, IEventListenerItem, IEventListenerMap, IEventListenerOptions, IEventMap, IEventOption, IEventTarget, IEventer, IExportFileType, IExportImageType, IExportOnCanvasFunction, IExportOptions, IExportResult, IExportResultFunction, IFindCondition, IFindMethod, IFlowAlign, IFlowAxisAlign, IFlowBoxType, IFlowType, IFlowWrap, IFourNumber, IFromToData, IFunction, IFunctionMap, IGap, IHitCanvas, IHitCanvasConfig, IHitCanvasManager, IHitType, IImageCursor, IImageEvent, IImageManager, IInteraction, IInteractionCanvas, IInteractionConfig, IJSONOptions, 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, IMotionPathData, 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, IRotationPointData, IScaleData, IScaleRotationData, IScreenSizeData, IScrollPointData, ISelector, ISelectorConfig, ISelectorProxy, ISide, ISize, ISizeData, ISkewData, ISkiaCanvas, ISkiaCanvasExportConfig, ISkiaNAPICanvas, IStateStyleType, IString, IStringFunction, IStringMap, ISwipeEvent, ITaskItem, ITaskOptions, ITaskProcessor, ITaskProcessorConfig, ITextMetrics, ITimer, ITouchConfig, 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 };
|
|
2142
|
+
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, IDirection4, IDragEvent, IDropEvent, IEditSize, IEraserType, IEvent, IEventListener, IEventListenerId, IEventListenerItem, IEventListenerMap, IEventListenerOptions, IEventMap, IEventOption, IEventTarget, IEventer, IExportFileType, IExportImageType, IExportOnCanvasFunction, IExportOptions, IExportResult, IExportResultFunction, IFindCondition, IFindMethod, IFlowAlign, IFlowAxisAlign, IFlowBoxType, IFlowType, IFlowWrap, IFourNumber, IFromToData, IFunction, IFunctionMap, IGap, IHitCanvas, IHitCanvasConfig, IHitCanvasManager, IHitType, IImageCursor, IImageEvent, IImageManager, IInteraction, IInteractionCanvas, IInteractionConfig, IJSONOptions, 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, IMotionPathData, IMoveEvent, IMultiTouchConfig, 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, IRotationPointData, IScaleData, IScaleRotationData, IScreenSizeData, IScrollPointData, ISelector, ISelectorConfig, ISelectorProxy, ISide, ISize, ISizeData, ISkewData, ISkiaCanvas, ISkiaCanvasExportConfig, ISkiaNAPICanvas, IStateStyleType, IString, IStringFunction, IStringMap, ISwipeEvent, ITaskItem, ITaskOptions, ITaskProcessor, ITaskProcessorConfig, ITextMetrics, ITimer, ITouchConfig, 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 };
|