@leafer/interface
Advanced tools
| import { IBlob, ILeaferCanvas } from '../canvas/ILeaferCanvas' | ||
| import { IBoundsData } from '../math/IMath' | ||
| export interface IExportOptions { | ||
| quality?: number | ||
| blob?: boolean | ||
| scale?: number | ||
| pixelRatio?: number | ||
| slice?: boolean | ||
| trim?: boolean | ||
| fill?: string | ||
| screenshot?: IBoundsData | boolean | ||
| } | ||
| export interface IExportResult { | ||
| data: ILeaferCanvas | IBlob | string | boolean | ||
| renderBounds?: IBoundsData | ||
| trimBounds?: IBoundsData | ||
| } | ||
| export interface IExportResultFunction { | ||
| (data: IExportResult): void | ||
| } |
| import { ICursorType } from '../display/ILeaf' | ||
| export interface ICursorTypeMap { | ||
| [name: string]: ICursorType | ICursorType[] | ||
| } | ||
| export interface ICursorRotate { | ||
| rotation?: number | ||
| data?: string | ||
| } | ||
| export interface ICursorRotateMap { | ||
| [name: string]: ICursorRotate | ||
| } |
+1
-1
| { | ||
| "name": "@leafer/interface", | ||
| "version": "1.0.0-rc.9", | ||
| "version": "1.0.0-rc.10", | ||
| "description": "@leafer/interface", | ||
@@ -5,0 +5,0 @@ "author": "Chao (Leafer) Wan", |
@@ -1,2 +0,2 @@ | ||
| import { ILeaf } from '../display/ILeaf' | ||
| import { ILeaf, ICursorType } from '../display/ILeaf' | ||
| import { IRenderer, IRendererConfig } from '../renderer/IRenderer' | ||
@@ -8,3 +8,3 @@ import { IHitCanvas, ILeaferCanvas, ILeaferCanvasConfig, IHitCanvasConfig } from '../canvas/ILeaferCanvas' | ||
| import { IWatcher, IWatcherConfig } from '../watcher/IWatcher' | ||
| import { IAutoBounds, IPointData, IScreenSizeData } from '../math/IMath' | ||
| import { IAutoBounds, IBoundsData, IPointData, IScreenSizeData } from '../math/IMath' | ||
| import { ICanvasManager } from '../canvas/ICanvasManager' | ||
@@ -21,3 +21,3 @@ import { IHitCanvasManager } from '../canvas/IHitCanvasManager' | ||
| export type ILeaferType = 'draw' | 'design' | 'board' | 'document' | 'user' | ||
| export type ILeaferType = 'draw' | 'design' | 'board' | 'document' | 'app' | 'game' | 'player' | 'chart' | ||
| export interface ILeaferConfig extends IRendererConfig, ILeaferCanvasConfig, IInteractionConfig, ILayouterConfig { | ||
@@ -38,2 +38,4 @@ start?: boolean | ||
| transforming: boolean | ||
| pixelRatio: number | ||
@@ -75,3 +77,4 @@ | ||
| forceFullRender(): void | ||
| updateCursor(): void | ||
| forceRender(bounds?: IBoundsData): void | ||
| updateCursor(cursor?: ICursorType): void | ||
| resize(size: IScreenSizeData): void | ||
@@ -108,2 +111,3 @@ | ||
| hitCanvas?(options?: IHitCanvasConfig, manager?: ICanvasManager): IHitCanvas | ||
| hitCanvasManager?(): IHitCanvasManager | ||
@@ -110,0 +114,0 @@ watcher?(target: ILeaf, options?: IWatcherConfig): IWatcher |
@@ -114,2 +114,4 @@ type GlobalCompositeOperation = 'color' | 'color-burn' | 'color-dodge' | 'copy' | 'darken' | 'destination-atop' | 'destination-in' | 'destination-out' | 'destination-over' | 'difference' | 'exclusion' | 'hard-light' | 'hue' | 'lighten' | 'lighter' | 'luminosity' | 'multiply' | 'overlay' | 'saturation' | 'screen' | 'soft-light' | 'source-atop' | 'source-in' | 'source-out' | 'source-over' | 'xor' | ||
| export type ICanvasPattern = CanvasPattern | ||
| declare var CanvasPattern: { | ||
@@ -116,0 +118,0 @@ prototype: CanvasPattern |
@@ -8,3 +8,4 @@ import { IObject } from '../data/IData' | ||
| import { ICanvasManager } from './ICanvasManager' | ||
| import { ICursorType } from '../display/ILeaf' | ||
| import { IExportFileType } from '../file/IFileType' | ||
| import { IExportOptions } from '../file/IExport' | ||
@@ -120,3 +121,3 @@ export interface ILeaferCanvasConfig extends IAutoBoundsData { | ||
| copyWorld(canvas: ILeaferCanvas, fromBounds?: IBoundsData, toBounds?: IBoundsData, blendMode?: string): void | ||
| copyWorldByReset(canvas: ILeaferCanvas, from?: IBoundsData, to?: IBoundsData, blendMode?: string): void | ||
| copyWorldByReset(canvas: ILeaferCanvas, from?: IBoundsData, to?: IBoundsData, blendMode?: string, onlyResetTransform?: boolean): void | ||
| copyWorldToInner(canvas: ILeaferCanvas, fromWorld: IMatrixWithBoundsData, toInnerBounds: IBoundsData, blendMode?: string): void | ||
@@ -135,2 +136,3 @@ | ||
| export type ILeaferCanvasView = any | ||
| export interface ILeaferCanvas extends ICanvasAttr, ICanvasMethod, IPathDrawer { | ||
@@ -161,3 +163,3 @@ | ||
| view: any | ||
| view: ILeaferCanvasView | ||
| parentView: any | ||
@@ -175,2 +177,3 @@ | ||
| export(filename: IExportFileType | string, options?: IExportOptions | number | boolean): string | Promise<any> | ||
| toBlob(type?: string, quality?: number): Promise<IBlob> | ||
@@ -187,9 +190,6 @@ toDataURL(type?: string, quality?: number): string | Promise<string> | ||
| setCursor(cursor: ICursorType | ICursorType[]): void | ||
| // other | ||
| isSameSize(options: ILeaferCanvasConfig): boolean | ||
| getSameCanvas(useSameWorldTransform?: boolean, useSameSmooth?: boolean): ILeaferCanvas | ||
| getBiggerCanvas(addWidth: number, addHeight: number): ILeaferCanvas | ||
| recycle(): void | ||
| recycle(clearBounds?: IBoundsData): void | ||
@@ -196,0 +196,0 @@ updateRender(): void |
@@ -0,4 +1,4 @@ | ||
| import { ILeaf } from './ILeaf' | ||
| import { ILeaferCanvas } from '../canvas/ILeaferCanvas' | ||
| import { IRenderOptions } from '../renderer/IRenderer' | ||
| import { ILeaf } from './ILeaf' | ||
@@ -10,2 +10,3 @@ export interface IBranch extends ILeaf { | ||
| removeAll(destroy?: boolean): void | ||
| clear(): void | ||
| } |
+48
-21
@@ -8,3 +8,3 @@ import { ILeaferBase } from '../app/ILeafer' | ||
| import { IObject, INumber, IBoolean, IValue, IString } from '../data/IData' | ||
| import { IMatrixWithBoundsData, IMatrix, IPointData, IBoundsData, IRadiusPointData, ILayoutAttr, IMatrixWithLayoutData, ILayoutBoundsData, IMatrixData } from '../math/IMath' | ||
| import { IMatrixWithBoundsData, IMatrix, IPointData, IBoundsData, IRadiusPointData, ILayoutAttr, ILayoutBoundsData, IMatrixData, IMatrixWithBoundsScaleData } from '../math/IMath' | ||
| import { IFunction } from '../function/IFunction' | ||
@@ -18,3 +18,2 @@ | ||
| import { ILeafRender } from './module/ILeafRender' | ||
| import { ILeafMask } from './module/ILeafMask' | ||
| import { ILeafData } from '../data/ILeafData' | ||
@@ -40,7 +39,9 @@ import { IFindMethod } from '../selector/ISelector' | ||
| visible: IBoolean | ||
| isMask: IBoolean | ||
| isEraser: IBoolean | ||
| locked: IBoolean | ||
| zIndex: INumber | ||
| mask: IBoolean | ||
| maskType: IMaskType | ||
| eraser: IBoolean | ||
| // layout data | ||
@@ -59,2 +60,3 @@ x: INumber | ||
| around: IAround | ||
| lazy: IBoolean | ||
@@ -83,2 +85,7 @@ draggable: IBoolean | ||
| export type IMaskType = | ||
| | 'path' | ||
| | 'pixel' | ||
| | 'clipping' | ||
| export type IBlendMode = | ||
@@ -117,2 +124,3 @@ | 'pass-through' | ||
| y?: number | ||
| rotation?: number | ||
| } | ||
@@ -169,8 +177,6 @@ | ||
| | 'all-scroll' | ||
| | 'zoom -in' | ||
| | 'zoom-in' | ||
| | 'zoom-out' | ||
| export interface ICursorTypeMap { | ||
| [name: string]: ICursorType | ICursorType[] | ||
| } | ||
| export interface ILeafInputData { | ||
@@ -187,7 +193,9 @@ tag?: string | ||
| visible?: IBoolean | ||
| isMask?: IBoolean | ||
| isEraser?: IBoolean | ||
| locked?: IBoolean | ||
| zIndex?: INumber | ||
| mask?: IBoolean | ||
| maskType?: IMaskType | ||
| eraser?: IBoolean | ||
| // layout data | ||
@@ -206,2 +214,3 @@ x?: INumber | ||
| around?: IAround | ||
| lazy?: IBoolean | ||
@@ -237,7 +246,9 @@ draggable?: IBoolean | ||
| visible?: boolean | ||
| isMask?: boolean | ||
| isEraser?: boolean | ||
| locked?: boolean | ||
| zIndex?: number | ||
| mask?: boolean | ||
| maskType?: IMaskType | ||
| eraser?: boolean | ||
| // layout data | ||
@@ -255,2 +266,4 @@ x?: number | ||
| around?: IAround | ||
| lazy?: boolean | ||
| windingRule?: any | ||
@@ -277,5 +290,6 @@ draggable?: boolean | ||
| __naturalHeight?: number | ||
| readonly __blendMode: string | ||
| } | ||
| export interface ILeaf extends ILeafMask, ILeafRender, ILeafHit, ILeafBounds, ILeafMatrix, ILeafDataProxy, ILeafInputData, IEventer { | ||
| export interface ILeaf extends ILeafRender, ILeafHit, ILeafBounds, ILeafMatrix, ILeafDataProxy, ILeafInputData, IEventer { | ||
| tag: string | ||
@@ -304,14 +318,18 @@ readonly __tag: string | ||
| __world: IMatrixWithLayoutData | ||
| __world: IMatrixWithBoundsScaleData | ||
| __local?: IMatrixWithBoundsData | ||
| __nowWorld?: IMatrixWithBoundsScaleData // use __world or __cameraWorld render | ||
| __cameraWorld?: IMatrixWithBoundsScaleData // use camera matrix render | ||
| readonly __localMatrix: IMatrixData | ||
| readonly __localBounds: IBoundsData | ||
| readonly __localBoxBounds: IBoundsData | ||
| __worldOpacity: number | ||
| readonly worldTransform: IMatrixWithLayoutData | ||
| readonly localTransform: IMatrixWithBoundsData | ||
| readonly worldTransform: IMatrixData | ||
| readonly localTransform: IMatrixData | ||
| readonly boxBounds: IBoundsData | ||
| readonly renderBounds: IBoundsData | ||
| readonly worldBoxBounds: IBoundsData | ||
@@ -346,3 +364,3 @@ readonly worldStrokeBounds: IBoundsData | ||
| waitLeafer(item: IFunction): void | ||
| nextRender(item: IFunction): void | ||
| nextRender(item: IFunction, off?: 'off'): void | ||
@@ -355,2 +373,4 @@ __bindLeafer(leafer: ILeaferBase | null): void | ||
| toString(): string | ||
| toSVG?(): string | ||
| toHTML?(): string | ||
@@ -398,7 +418,8 @@ // ILeafData -> | ||
| __updateMask(value?: boolean): void | ||
| __renderMask(canvas: ILeaferCanvas, content: ILeaferCanvas, mask: ILeaferCanvas, recycle?: boolean): void | ||
| __removeMask(child?: ILeaf): void | ||
| __renderMask(canvas: ILeaferCanvas, options: IRenderOptions): void | ||
| // convert | ||
| getWorld(attrName: ILayoutAttr): number | ||
| __getNowWorld(options: IRenderOptions): IMatrixWithBoundsScaleData // when render use other matrix | ||
| getWorld(attrName: ILayoutAttr): number // will remove | ||
| getBounds(type?: IBoundsType, relative?: ILocationType | ILeaf): IBoundsData | ||
@@ -418,3 +439,6 @@ getLayoutBounds(type?: IBoundsType, relative?: ILocationType | ILeaf, unscale?: boolean): ILayoutBoundsData | ||
| getWorldPointByLocal(local: IPointData, relative?: ILeaf, distance?: boolean, change?: boolean): IPointData | ||
| getPagePoint(world: IPointData, relative?: ILeaf, distance?: boolean, change?: boolean): IPointData | ||
| getWorldPointByPage(page: IPointData, relative?: ILeaf, distance?: boolean, change?: boolean): IPointData | ||
| // transform | ||
@@ -435,2 +459,4 @@ setTransform(transform?: IMatrixData, resize?: boolean): void | ||
| __hit(local: IRadiusPointData): boolean | ||
| __hitFill(inner: IRadiusPointData, windingRule?: string): boolean | ||
| __hitStroke(inner: IRadiusPointData, strokeWidth: number): boolean | ||
| __drawHitPath(canvas: ILeaferCanvas): void | ||
@@ -444,2 +470,3 @@ __updateHitCanvas(): void | ||
| __clip(canvas: ILeaferCanvas, options: IRenderOptions): void | ||
| __renderShape(canvas: ILeaferCanvas, options: IRenderOptions): void | ||
@@ -446,0 +473,0 @@ |
@@ -0,5 +1,5 @@ | ||
| import { IBranch } from '../IBranch' | ||
| import { ILeafRender } from './ILeafRender' | ||
| import { ILeaferCanvas } from '../../canvas/ILeaferCanvas' | ||
| import { IRenderOptions } from '../../renderer/IRenderer' | ||
| import { IBranch } from '../IBranch' | ||
| import { ILeafRender } from './ILeafRender' | ||
@@ -6,0 +6,0 @@ export type IBranchRenderModule = IBranchRender & ThisType<IBranch> |
@@ -9,5 +9,7 @@ import { IRadiusPointData } from '../../math/IMath' | ||
| __hitWorld?(point: IRadiusPointData): boolean | ||
| __hit?(local: IRadiusPointData): boolean | ||
| __hit?(inner: IRadiusPointData): boolean | ||
| __hitFill?(inner: IRadiusPointData, windingRule?: string): boolean | ||
| __hitStroke?(inner: IRadiusPointData, strokeWidth: number): boolean | ||
| __drawHitPath?(canvas: ILeaferCanvas): void | ||
| __updateHitCanvas?(): void | ||
| } |
@@ -12,2 +12,3 @@ import { ILeaferCanvas } from '../../canvas/ILeaferCanvas' | ||
| __clip?(_canvas: ILeaferCanvas, _options: IRenderOptions): void | ||
| __renderShape?(canvas: ILeaferCanvas, options: IRenderOptions): void | ||
@@ -14,0 +15,0 @@ |
@@ -26,2 +26,3 @@ import { IObject } from '../data/IData' | ||
| getPage?(): IPointData | ||
| getInner?(relative?: ILeaf): IPointData | ||
@@ -50,4 +51,7 @@ getLocal?(relative?: ILeaf): IPointData | ||
| getPageMove?(total?: boolean): IPointData | ||
| getInnerMove?(relative?: ILeaf): IPointData | ||
| getLocalMove?(relative?: ILeaf): IPointData | ||
| getPageTotal?(): IPointData | ||
| getInnerTotal?(relative?: ILeaf): IPointData | ||
@@ -54,0 +58,0 @@ getLocalTotal?(relative?: ILeaf): IPointData |
| export type IExportImageType = 'jpg' | 'png' | 'webp' | ||
| export type IExportFileType = IExportImageType | 'svg' | 'pdf' | 'json' | ||
| export type IExportFileType = IExportImageType | 'svg' | 'pdf' | 'json' |
@@ -18,5 +18,5 @@ import { ILeaferImage, ILeaferImageConfig } from './ILeaferImage' | ||
| clearRecycled(): void | ||
| isPixel(config: ILeaferImageConfig): boolean // png / svg / webp | ||
| hasOpacityPixel(config: ILeaferImageConfig): boolean // png / svg / webp | ||
| isFormat(format: IExportFileType, config: ILeaferImageConfig): boolean | ||
| destroy(): void | ||
| } |
@@ -0,4 +1,6 @@ | ||
| import { ICanvasPattern } from '../canvas/ICanvas' | ||
| import { IObject } from '../data/IData' | ||
| import { InnerId } from '../event/IEventer' | ||
| import { IExportFileType } from '../file/IFileType' | ||
| import { IMatrixData } from '../math/IMath' | ||
@@ -19,2 +21,11 @@ export interface ILeaferImageConfig { | ||
| export interface ILeaferImageCacheCanvas { | ||
| data: IObject | ||
| params: IArguments | ||
| } | ||
| export interface ILeaferImagePatternPaint { | ||
| transform: IMatrixData | ||
| } | ||
| export interface ILeaferImage { | ||
@@ -29,2 +40,3 @@ readonly innerId: InnerId | ||
| isSVG: boolean | ||
| hasOpacityPixel: boolean | ||
@@ -42,2 +54,3 @@ readonly completed: boolean | ||
| getCanvas(width: number, height: number, opacity?: number, _filters?: IObject): unknown | ||
| getPattern(canvas: any, repeat: string | null, transform?: IMatrixData, paint?: IObject): ICanvasPattern | ||
| destroy(): void | ||
@@ -44,0 +57,0 @@ } |
+8
-7
| export { IAppBase } from './app/IApp' | ||
| export { ILeaferBase, ILeaferAttrData, ILeaferType, ILeaferTypeCreator, ILeaferTypeFunction, ILeaferTypeList, ILeaferConfig, ICreator, IUICreator } from './app/ILeafer' | ||
| export { ILeaf, ILeafAttrData, ILeafComputedData, ILeafInputData, ICachedLeaf, IHitType, IBlendMode, IEditSize, ICursorType, ICursorTypeMap, IAround } from './display/ILeaf' | ||
| export { ILeaf, ILeafAttrData, ILeafComputedData, ILeafInputData, ICachedLeaf, IHitType, IMaskType, IBlendMode, IEditSize, IImageCursor, ICursorType, IAround } from './display/ILeaf' | ||
| export { IBranch } from './display/IBranch' | ||
@@ -17,3 +17,2 @@ export { IZoomView } from './display/IView' | ||
| export { ILeafEventer, ILeafEventerModule } from './display/module/ILeafEventer' | ||
| export { ILeafMask, ILeafMaskModule } from './display/module/ILeafMask' | ||
| export { IBranchRender, IBranchRenderModule } from './display/module/IBranchRender' | ||
@@ -24,3 +23,3 @@ | ||
| export { ILayouter, ILayoutChangedData, ILayoutBlockData, ILayouterConfig, IPartLayoutConfig } from './layouter/ILayouter' | ||
| export { ISelector, ISelectorConfig, ISelectorProxy, IFindMethod, ISelectPathResult, ISelectPathOptions, AnswerType } from './selector/ISelector' | ||
| export { ISelector, ISelectorConfig, ISelectorProxy, IFindMethod, IPickResult, IPickOptions, IAnswer } from './selector/ISelector' | ||
@@ -39,10 +38,11 @@ export { ICanvasManager } from './canvas/ICanvasManager' | ||
| export { ILeaferCanvas, IHitCanvas, ICanvasAttr, ICanvasStrokeOptions, ILeaferCanvasConfig, IHitCanvasConfig, IBlobFunction, IBlob } from './canvas/ILeaferCanvas' | ||
| export { ILeaferCanvas, ILeaferCanvasView, IHitCanvas, ICanvasAttr, ICanvasStrokeOptions, ILeaferCanvasConfig, IHitCanvasConfig, IBlobFunction, IBlob } from './canvas/ILeaferCanvas' | ||
| export { ISkiaCanvas, ISkiaCanvasExportConfig, ICanvasType, ISkiaNAPICanvas } from './canvas/ISkiaCanvas' | ||
| export { IPathDrawer, IPathCreator } from './path/IPathDrawer' | ||
| export { IWindingRule, ICanvasContext2D, ITextMetrics, IPath2D } from './canvas/ICanvas' | ||
| export { IWindingRule, ICanvasContext2D, ITextMetrics, IPath2D, ICanvasPattern } from './canvas/ICanvas' | ||
| export { CanvasPathCommand, IPathCommandData, MCommandData, HCommandData, VCommandData, LCommandData, CCommandData, SCommandData, QCommandData, TCommandData, ZCommandData, ACommandData, RectCommandData, RoundRectCommandData, EllipseCommandData, ArcCommandData, ArcToCommandData } from './path/IPathCommand' | ||
| export { ILeaferImage, ILeaferImageConfig, ILeaferImageOnLoaded, ILeaferImageOnError } from './image/ILeaferImage' | ||
| export { ILeaferImage, ILeaferImageConfig, ILeaferImageOnLoaded, ILeaferImageOnError, ILeaferImageCacheCanvas, ILeaferImagePatternPaint } from './image/ILeaferImage' | ||
| export { IExportFileType, IExportImageType } from './file/IFileType' | ||
| export { IExportOptions, IExportResult, IExportResultFunction } from './file/IExport' | ||
@@ -52,2 +52,3 @@ export { InnerId, IEventer, IEventListener, IEventListenerOptions, IEventListenerMap, IEventListenerItem, IEventListenerId } from './event/IEventer' | ||
| export { IUIEvent, IPointerEvent, PointerType, IDragEvent, IDropEvent, ISwipeEvent, IMoveEvent, IZoomEvent, IRotateEvent, IKeyEvent, IImageEvent } from './event/IUIEvent' | ||
| export { ICursorTypeMap, ICursorRotate, ICursorRotateMap } from './interaction/ICursor' | ||
| export { IInteraction, IInteractionCanvas, IInteractionConfig, IWheelConfig, IPointerConfig } from './interaction/IInteraction' | ||
@@ -58,3 +59,3 @@ | ||
| export { ILeafList, ILeafArrayMap, ILeafMap, ILeafLevelList, ILeafListItemCallback } from './data/IList' | ||
| export { IPoint, IPointData, IRadiusPointData, ISize, ISizeData, IScreenSizeData, IBounds, IBoundsData, IBoundsDataFn, IOffsetBoundsData, ITwoPointBoundsData, IAutoBounds, IAutoBoundsData, IMatrix, IMatrixData, IMatrixWithBoundsData, IMatrixWithScaleData, IMatrixWithLayoutData, IScaleRotationData, IScaleData, ISkewData, ILayoutBoundsData, ILayoutData, ILayoutAttr } from './math/IMath' | ||
| 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' | ||
| export { IFunction, IAttrDecorator } from './function/IFunction' |
@@ -6,3 +6,3 @@ import { INumberFunction, IPointDataFunction } from '../function/IFunction' | ||
| import { IPointData } from '../math/IMath' | ||
| import { ISelector, ISelectPathOptions } from '../selector/ISelector' | ||
| import { ISelector, IPickOptions } from '../selector/ISelector' | ||
| import { IBounds } from '../math/IMath' | ||
@@ -22,2 +22,3 @@ import { IControl } from '../control/IControl' | ||
| readonly isDragEmpty: boolean | ||
| readonly isHoldRightKey: boolean | ||
| readonly moveMode: boolean | ||
@@ -53,8 +54,10 @@ | ||
| findPath(data: IPointerEvent, options?: ISelectPathOptions): ILeafList | ||
| findPath(data: IPointerEvent, options?: IPickOptions): ILeafList | ||
| isDrag(leaf: ILeaf): boolean | ||
| updateDownData(data?: IPointerEvent): void | ||
| updateDownData(data?: IPointerEvent, options?: IPickOptions): void | ||
| updateHoverData(data: IPointerEvent): void | ||
| updateCursor(hoverData?: IPointerEvent): void | ||
| setCursor(cursor: ICursorType | ICursorType[]): void | ||
@@ -84,2 +87,4 @@ emit(type: string, data: IUIEvent, path?: ILeafList, excludePath?: ILeafList): void | ||
| holdSpaceKey?: boolean | ||
| holdMiddleKey?: boolean | ||
| holdRightKey?: boolean | ||
| drag?: boolean | ||
@@ -114,2 +119,3 @@ dragEmpty?: boolean | ||
| preventDefault?: boolean | ||
| preventDefaultMenu?: boolean | ||
| } | ||
@@ -116,0 +122,0 @@ |
@@ -72,3 +72,9 @@ import { IBoundsData, IMatrixData, ILayoutBoundsData, IPointData } from '../math/IMath' | ||
| f: number | ||
| x: number | ||
| y: number | ||
| width: number | ||
| height: number | ||
| createLocal(): void | ||
| update(): void | ||
@@ -75,0 +81,0 @@ |
+16
-0
@@ -13,2 +13,5 @@ import { IObject } from '../data/IData' | ||
| move(x: number, y: number): IPoint | ||
| scale(scaleX: number, scaleY?: number): IPoint | ||
| scaleOf(origin: IPointData, scaleX: number, scaleY?: number): IPoint | ||
| rotate(rotation: number, origin?: IPointData): IPoint | ||
@@ -64,5 +67,7 @@ rotateOf(origin: IPointData, rotation: number): IPoint | ||
| move(x: number, y: number): IBounds | ||
| scale(scaleX: number, scaleY?: number): IBounds | ||
| scaleOf(origin: IPointData, scaleX: number, scaleY?: number): IBounds | ||
| toOuterOf(matrix: IMatrixData, to?: IBoundsData): IBounds | ||
| toInnerOf(matrix: IMatrixData, to?: IBoundsData): IBounds | ||
| getFitMatrix(put: IBoundsData): IMatrix | ||
@@ -73,2 +78,3 @@ | ||
| unsign(): IBounds | ||
| float(maxLength?: number): IBounds | ||
@@ -162,2 +168,3 @@ add(bounds: IBoundsData): IBounds | ||
| export interface IMatrix extends IMatrixData { | ||
| set(a: number | IMatrixData, b: number, c: number, d: number, e: number, f: number): IMatrix | ||
@@ -195,2 +202,4 @@ get(): IMatrixData | ||
| withScale(scaleX?: number, scaleY?: number): IMatrixWithScaleData | ||
| reset(): void | ||
@@ -203,2 +212,9 @@ } | ||
| export interface IMatrixWithOptionScaleData extends IMatrixData { | ||
| scaleX?: number | ||
| scaleY?: number | ||
| } | ||
| export interface IMatrixWithBoundsScaleData extends IMatrixData, IBoundsData, IScaleData { } | ||
| export interface IMatrixWithLayoutData extends IMatrixData, ILayoutBoundsData { } |
@@ -44,2 +44,3 @@ import { IFunction } from '../function/IFunction' | ||
| suffix: string // 需要带上后缀区分dom中image标签的缓存,否则会导致浏览器缓存跨域问题 | ||
| crossOrigin: string | false // 跨域设置 | ||
| } | ||
@@ -46,0 +47,0 @@ } |
| import { ILeaferCanvas } from '../canvas/ILeaferCanvas' | ||
| import { ILeaf } from '../display/ILeaf' | ||
| import { IBounds, IMatrix } from '../math/IMath' | ||
| import { IBounds, IMatrixWithScaleData } from '../math/IMath' | ||
| import { IFunction } from '../function/IFunction' | ||
@@ -11,3 +11,3 @@ import { IControl } from '../control/IControl' | ||
| hideBounds?: IBounds, | ||
| matrix?: IMatrix, | ||
| matrix?: IMatrixWithScaleData, | ||
| inCamera?: boolean | ||
@@ -14,0 +14,0 @@ } |
| import { ILeaf } from '../display/ILeaf' | ||
| import { ILeafList } from '../data/IList' | ||
| import { IPointData } from '../math/IMath' | ||
| import { IBranch } from '../display/IBranch' | ||
| export interface ISelectPathResult { | ||
| leaf: ILeaf | ||
| export interface IPickResult { | ||
| target: ILeaf | ||
| path: ILeafList | ||
@@ -11,5 +12,8 @@ throughPath?: ILeafList | ||
| export interface ISelectPathOptions { | ||
| export interface IPickOptions { | ||
| name?: string | ||
| hitRadius?: number | ||
| through?: boolean | ||
| target?: IBranch | ||
| findList?: ILeaf[] | ||
| exclude?: ILeafList | ||
@@ -23,11 +27,6 @@ ignoreHittable?: boolean | ||
| export enum AnswerType { | ||
| No = 0, | ||
| Yes = 1, | ||
| NoAndSkip = 2, | ||
| YesAndSkip = 3 | ||
| } | ||
| export type IAnswer = 0 | 1 | 2 | 3 | ||
| export interface IFindMethod { | ||
| (leaf: ILeaf, options?: any): AnswerType | ||
| (leaf: ILeaf, options?: any): IAnswer | ||
| } | ||
@@ -46,3 +45,3 @@ | ||
| getByPoint(hitPoint: IPointData, hitRadius: number, options?: ISelectPathOptions): ISelectPathResult | ||
| getByPoint(hitPoint: IPointData, hitRadius: number, options?: IPickOptions): IPickResult | ||
@@ -49,0 +48,0 @@ getBy(condition: number | string | IFindMethod, branch?: ILeaf, one?: boolean, options?: any): ILeaf | ILeaf[] |
| import { ILeaf } from '../ILeaf' | ||
| import { ILeaferCanvas } from '../../canvas/ILeaferCanvas' | ||
| export type ILeafMaskModule = ILeafMask & ThisType<ILeaf> | ||
| export interface ILeafMask { | ||
| __updateEraser?(value?: boolean): void | ||
| __updateMask?(value?: boolean): void | ||
| __renderMask?(canvas: ILeaferCanvas, content: ILeaferCanvas, mask: ILeaferCanvas, recycle?: boolean): void | ||
| __removeMask?(child?: ILeaf): void | ||
| } | ||
Sorry, the diff of this file is too big to display
151009
3.95%47
2.17%3956
4.32%