@leafer/interface
Advanced tools
+1
-1
| { | ||
| "name": "@leafer/interface", | ||
| "version": "1.0.0-beta.9", | ||
| "version": "1.0.0-beta.10", | ||
| "description": "@leafer/interface", | ||
@@ -5,0 +5,0 @@ "author": "Chao (Leafer) Wan", |
@@ -11,3 +11,2 @@ import { ILeaf } from '../display/ILeaf' | ||
| import { IHitCanvasManager } from '../canvas/IHitCanvasManager' | ||
| import { IImageManager } from '../image/IImageManager' | ||
| import { IEventListenerId } from '../event/IEventer' | ||
@@ -54,3 +53,2 @@ import { IObject } from '../data/IData' | ||
| hitCanvasManager?: IHitCanvasManager | ||
| imageManager: IImageManager | ||
@@ -57,0 +55,0 @@ autoLayout?: IAutoBounds |
@@ -77,3 +77,3 @@ import { IObject } from '../data/IData' | ||
| transform(a: number, b: number, c: number, d: number, e: number, f: number): void | ||
| transform(a: number | IMatrixData, b?: number, c?: number, d?: number, e?: number, f?: number): void | ||
| translate(x: number, y: number): void | ||
@@ -80,0 +80,0 @@ scale(x: number, y: number): void |
@@ -8,3 +8,3 @@ import { ILeaferCanvas } from '../canvas/ILeaferCanvas' | ||
| __renderBranch?(canvas: ILeaferCanvas, options: IRenderOptions): void | ||
| removeAll(): void | ||
| removeAll(destroy?: boolean): void | ||
| } |
@@ -292,3 +292,3 @@ import { ILeafer } from '../app/ILeafer' | ||
| add(child: ILeaf, index?: number): void | ||
| remove(child?: ILeaf): void | ||
| remove(child?: ILeaf, destroy?: boolean): void | ||
| } |
@@ -81,4 +81,6 @@ import { IObject } from '../data/IData' | ||
| export interface IImageEvent extends IEvent { | ||
| image: ILeaferImage | ||
| error: string | IObject | ||
| image?: ILeaferImage | ||
| attrName?: string | ||
| attrValue?: IObject | ||
| error?: string | IObject | ||
| } |
| import { ILeaferImage, ILeaferImageConfig } from './ILeaferImage' | ||
| import { ITaskProcessor } from '../task/ITaskProcessor' | ||
| import { IFunction } from '../function/IFunction' | ||
| interface ILeaferImageMap { | ||
| [name: string]: ILeaferImage | ||
| } | ||
| export interface IImageManager { | ||
| map: ILeaferImageMap | ||
| recycledList: ILeaferImage[] | ||
| tasker: ITaskProcessor | ||
| patternTasker: ITaskProcessor | ||
| readonly isComplete: boolean | ||
| get(config: ILeaferImageConfig): ILeaferImage | ||
| load(image: ILeaferImage, onSuccess: IFunction, onError: IFunction): void | ||
| recycle(image: ILeaferImage): void | ||
| clearRecycled(): void | ||
| destroy(): void | ||
| } |
| import { IObject } from '../data/IData' | ||
| import { InnerId } from '../event/IEventer' | ||
@@ -17,10 +18,25 @@ export interface ILeaferImageConfig { | ||
| export interface ILeaferImage { | ||
| readonly innerId: InnerId | ||
| readonly url: string | ||
| view: unknown | ||
| width: number | ||
| height: number | ||
| isSVG: boolean | ||
| readonly completed: boolean | ||
| ready: boolean | ||
| load(onSuccess?: ILeaferImageOnLoaded, onError?: ILeaferImageOnError): Promise<void> | ||
| error: IObject | ||
| loading: boolean | ||
| use: number | ||
| config: ILeaferImageConfig | ||
| load(onSuccess?: ILeaferImageOnLoaded, onError?: ILeaferImageOnError): number | ||
| unload(index: number): void | ||
| getCanvas(width: number, height: number, opacity?: number, _filters?: IObject): unknown | ||
| destroy(): void | ||
| } | ||
| export type IImageStatus = 'wait' | 'thumb-loading' | 'thumb-success' | 'thumb-error' | 'loading' | 'success' | 'error' |
@@ -31,3 +31,3 @@ import { INumberFunction, IPointDataFunction } from '../function/IFunction' | ||
| pointerDown(data: IPointerEvent): void | ||
| pointerDown(data: IPointerEvent, defaultPath?: boolean): void | ||
| pointerMove(data: IPointerEvent): void | ||
@@ -34,0 +34,0 @@ pointerMoveReal(data: IPointerEvent): void |
@@ -13,3 +13,3 @@ import { IBoundsData, IMatrixData, IMatrixDecompositionData } from '../math/IMath' | ||
| // local | ||
| // inner | ||
@@ -59,2 +59,3 @@ boxBounds: IBoundsData // | content + padding | | ||
| affectRotation: boolean | ||
| affectChildrenSort?: boolean | ||
@@ -93,3 +94,5 @@ strokeSpread: number | ||
| childrenSortChange(): void | ||
| destroy(): void | ||
| } |
@@ -27,2 +27,3 @@ import { IFunction } from '../function/IFunction' | ||
| loadImage(url: string): Promise<any> | ||
| noRepeat?: string // fix: 微信小程序 createPattern 直接使用 no-repeat 有bug,导致无法显示 | ||
| }, | ||
@@ -29,0 +30,0 @@ miniapp?: IMiniapp |
@@ -24,6 +24,6 @@ import { IFunction } from '../function/IFunction' | ||
| stop(): void | ||
| add(taskCallback: IFunction, taskTime?: number): void | ||
| addParallel(taskCallback: IFunction, taskTime?: number): void | ||
| add(taskCallback: IFunction, taskTime?: number, start?: boolean): void | ||
| addParallel(taskCallback: IFunction, taskTime?: number, start?: boolean,): void | ||
| addEmpty(callback?: IFunction): void | ||
| destroy(): void | ||
| } |
70374
0.96%1786
1.19%