Skip to content

leaferjs

Table of contents

References

Enumerations

Classes

Interfaces

Type Aliases

Variables

Functions

References

getMatrixData

Renames and re-exports __type

Type Aliases

IScrollBarTheme

Ƭ IScrollBarTheme: "light" | "dark" | IBoxInputData

Defined in

in/packages/interface/src/scroll/IScrollBar.ts:9


ILeaferType

Ƭ ILeaferType: "draw" | "block" | "editor" | "design" | "board" | "document" | "app" | "website" | "game" | "player" | "chart" | "custom"

Defined in

leafer/packages/interface/src/app/ILeafer.ts:20


IZoomType

Ƭ IZoomType: "in" | "out" | "fit" | "fit-width" | "fit-height" | number | ILeaf | ILeaf[] | IBoundsData

Defined in

leafer/packages/interface/src/app/ILeafer.ts:92


IWindingRule

Ƭ IWindingRule: "evenodd" | "nonzero"

Defined in

leafer/packages/interface/src/canvas/ICanvas.ts:3


ICanvasPattern

Ƭ ICanvasPattern: CanvasPattern

Defined in

leafer/packages/interface/src/canvas/ICanvas.ts:114


ICanvasContext2DSettings

Ƭ ICanvasContext2DSettings: ICanvasRenderingContext2DSettings

Defined in

leafer/packages/interface/src/canvas/ICanvas.ts:135


IHitCanvasConfig

Ƭ IHitCanvasConfig: ILeaferCanvasConfig

Defined in

leafer/packages/interface/src/canvas/ILeaferCanvas.ts:22


ILeaferCanvasView

Ƭ ILeaferCanvasView: any

Defined in

leafer/packages/interface/src/canvas/ILeaferCanvas.ts:143


IBlob

Ƭ IBlob: any

Defined in

leafer/packages/interface/src/canvas/ILeaferCanvas.ts:218


ICanvasType

Ƭ ICanvasType: "skia" | "napi" | "canvas" | "miniapp"

Defined in

leafer/packages/interface/src/canvas/ISkiaCanvas.ts:3


INumber

Ƭ INumber: number

Defined in

leafer/packages/interface/src/data/IData.ts:4


IBoolean

Ƭ IBoolean: boolean

Defined in

leafer/packages/interface/src/data/IData.ts:5


IString

Ƭ IString: string

Defined in

leafer/packages/interface/src/data/IData.ts:6


IValue

Ƭ IValue: INumber | IBoolean | IString | IObject

Defined in

leafer/packages/interface/src/data/IData.ts:7


ITimer

Ƭ ITimer: any

Defined in

leafer/packages/interface/src/data/IData.ts:8


IPathString

Ƭ IPathString: string

Defined in

leafer/packages/interface/src/data/IData.ts:10


IFourNumber

Ƭ IFourNumber: number | number[]

Defined in

leafer/packages/interface/src/data/IData.ts:12


ILeafListItemCallback

Ƭ ILeafListItemCallback: (item: ILeaf, index?: number) => void

Type declaration

▸ (item, index?): void

Parameters
NameType
itemILeaf
index?number
Returns

void

Defined in

leafer/packages/interface/src/data/IList.ts:12


ISide

Ƭ ISide: "width" | "height"

Defined in

leafer/packages/interface/src/display/ILeaf.ts:32


IAxis

Ƭ IAxis: "x" | "y"

Defined in

leafer/packages/interface/src/display/ILeaf.ts:34


IAxisReverse

Ƭ IAxisReverse: "x-reverse" | "y-reverse"

Defined in

leafer/packages/interface/src/display/ILeaf.ts:36


IFlowType

Ƭ IFlowType: boolean | IAxis | IAxisReverse

Defined in

leafer/packages/interface/src/display/ILeaf.ts:38


IFlowBoxType

Ƭ IFlowBoxType: "box" | "stroke"

Defined in

leafer/packages/interface/src/display/ILeaf.ts:40


IGap

Ƭ IGap: INumber | "auto" | "fit"

Defined in

leafer/packages/interface/src/display/ILeaf.ts:42


IAxisAlign

Ƭ IAxisAlign: "from" | "center" | "to"

Defined in

leafer/packages/interface/src/display/ILeaf.ts:46


IFlowWrap

Ƭ IFlowWrap: boolean | "reverse"

Defined in

leafer/packages/interface/src/display/ILeaf.ts:50


IAutoSize

Ƭ IAutoSize: IBoolean | INumber | IPercentData

Defined in

leafer/packages/interface/src/display/ILeaf.ts:52


IConstraintType

Ƭ IConstraintType: "from" | "center" | "to" | "from-to" | "scale"

Defined in

leafer/packages/interface/src/display/ILeaf.ts:73


IHitType

Ƭ IHitType: "path" | "pixel" | "all" | "none"

Defined in

leafer/packages/interface/src/display/ILeaf.ts:75


IMaskType

Ƭ IMaskType: "path" | "pixel" | "clipping"

Defined in

leafer/packages/interface/src/display/ILeaf.ts:81


IEraserType

Ƭ IEraserType: "path" | "pixel"

Defined in

leafer/packages/interface/src/display/ILeaf.ts:86


IBlendMode

Ƭ 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"

Defined in

leafer/packages/interface/src/display/ILeaf.ts:90


IEditSize

Ƭ IEditSize: "size" | "font-size" | "scale"

Defined in

leafer/packages/interface/src/display/ILeaf.ts:118


IDirection

Ƭ IDirection: "top-left" | "top" | "top-right" | "right" | "bottom-right" | "bottom" | "bottom-left" | "left" | "center"

Defined in

leafer/packages/interface/src/display/ILeaf.ts:126


IDirection4

Ƭ IDirection4: "top" | "right" | "bottom" | "left"

Defined in

leafer/packages/interface/src/display/ILeaf.ts:137


IAlign

Ƭ IAlign: IDirection

Defined in

leafer/packages/interface/src/display/ILeaf.ts:143


IBaseLineAlign

Ƭ IBaseLineAlign: "baseline-left" | "baseline-center" | "baseline-right"

Defined in

leafer/packages/interface/src/display/ILeaf.ts:145


IFlowAlign

Ƭ IFlowAlign: IAlign | IBaseLineAlign

Defined in

leafer/packages/interface/src/display/ILeaf.ts:150


IAround

Ƭ IAround: IAlign | IUnitPointData

Defined in

leafer/packages/interface/src/display/ILeaf.ts:155


ICursorType

Ƭ ICursorType: IImageCursor | "" | "auto" | "default" | "none" | "context-menu" | "help" | "pointer" | "progress" | "wait" | "cell" | "crosshair" | "text" | "vertical-text" | "alias" | "copy" | "move" | "no-drop" | "not-allowed" | "grab" | "grabbing" | "e-resize" | "n-resize" | "ne-resize" | "nw-resize" | "s-resize" | "se-resize" | "sw-resize" | "w-resize" | "ew-resize" | "ns-resize" | "nesw-resize" | "nwse-resize" | "col-resize" | "row-resize" | "all-scroll" | "zoom-in" | "zoom-out"

Defined in

leafer/packages/interface/src/display/ILeaf.ts:159


IStateStyleType

Ƭ IStateStyleType: "hoverStyle" | "pressStyle" | "focusStyle" | "selectedStyle" | "disabledStyle"

Defined in

leafer/packages/interface/src/display/ILeaf.ts:199


ILeafAttrDescriptor

Ƭ ILeafAttrDescriptor: IObject & ThisType<ILeaf>

Defined in

leafer/packages/interface/src/display/ILeaf.ts:673


IBranchRenderModule

Ƭ IBranchRenderModule: IBranchRender & ThisType<IBranch>

Defined in

leafer/packages/interface/src/display/module/IBranchRender.ts:6


ILeafBoundsModule

Ƭ ILeafBoundsModule: ILeafBounds & ThisType<ILeaf>

Defined in

leafer/packages/interface/src/display/module/ILeafBounds.ts:3


ILeafDataProxyModule

Ƭ ILeafDataProxyModule: ILeafDataProxy & ThisType<ILeaf>

Defined in

leafer/packages/interface/src/display/module/ILeafDataProxy.ts:4


ILeafEventerModule

Ƭ ILeafEventerModule: ILeafEventer & ThisType<ILeaf>

Defined in

leafer/packages/interface/src/display/module/ILeafEventer.ts:7


ILeafHitModule

Ƭ ILeafHitModule: ILeafHit & ThisType<ILeaf>

Defined in

leafer/packages/interface/src/display/module/ILeafHit.ts:5


ILeafMatrixModule

Ƭ ILeafMatrixModule: ILeafMatrix & ThisType<ILeaf>

Defined in

leafer/packages/interface/src/display/module/ILeafMatrix.ts:3


ILeafRenderModule

Ƭ ILeafRenderModule: ILeafRender & ThisType<ILeaf>

Defined in

leafer/packages/interface/src/display/module/ILeafRender.ts:5


IEventListener

Ƭ IEventListener: IFunction

Defined in

leafer/packages/interface/src/event/IEventer.ts:8


IEventOption

Ƭ IEventOption: IEventListenerOptions | boolean | "once"

Defined in

leafer/packages/interface/src/event/IEventer.ts:15


InnerId

Ƭ InnerId: number

Defined in

leafer/packages/interface/src/event/IEventer.ts:36


PointerType

Ƭ PointerType: "mouse" | "pen" | "touch"

Defined in

leafer/packages/interface/src/event/IUIEvent.ts:50


IExportImageType

Ƭ IExportImageType: "jpg" | "png" | "webp"

Defined in

leafer/packages/interface/src/file/IFileType.ts:1


IExportFileType

Ƭ IExportFileType: IExportImageType | "svg" | "pdf" | "json"

Defined in

leafer/packages/interface/src/file/IFileType.ts:2


ILocationType

Ƭ ILocationType: "world" | "page" | "local" | "inner"

Defined in

leafer/packages/interface/src/layout/ILeafLayout.ts:4


IBoundsType

Ƭ IBoundsType: "content" | "box" | "stroke" | "render"

Defined in

leafer/packages/interface/src/layout/ILeafLayout.ts:5


ILayoutAttr

Ƭ ILayoutAttr: "x" | "y" | "scaleX" | "scaleY" | "rotation" | "skewX" | "skewY"

Defined in

leafer/packages/interface/src/math/IMath.ts:181


MCommandData

Ƭ MCommandData: [Command, x, y]

Defined in

leafer/packages/interface/src/path/IPathCommand.ts:15


HCommandData

Ƭ HCommandData: [Command, x]

Defined in

leafer/packages/interface/src/path/IPathCommand.ts:16


VCommandData

Ƭ VCommandData: [Command, y]

Defined in

leafer/packages/interface/src/path/IPathCommand.ts:17


LCommandData

Ƭ LCommandData: MCommandData

Defined in

leafer/packages/interface/src/path/IPathCommand.ts:18


CCommandData

Ƭ CCommandData: [Command, x1, y1, x2, y2, x, y]

Defined in

leafer/packages/interface/src/path/IPathCommand.ts:20


SCommandData

Ƭ SCommandData: [Command, x2, y2, x, y]

Defined in

leafer/packages/interface/src/path/IPathCommand.ts:21


QCommandData

Ƭ QCommandData: [Command, x1, y1, x, y]

Defined in

leafer/packages/interface/src/path/IPathCommand.ts:23


TCommandData

Ƭ TCommandData: [Command, x, y]

Defined in

leafer/packages/interface/src/path/IPathCommand.ts:24


ZCommandData

Ƭ ZCommandData: [Command]

Defined in

leafer/packages/interface/src/path/IPathCommand.ts:26


ACommandData

Ƭ ACommandData: [Command, radiusX, radiusY, xAxisRotation, largeArcFlag, sweepFlag, x, y]

Defined in

leafer/packages/interface/src/path/IPathCommand.ts:28


RectCommandData

Ƭ RectCommandData: [Command, x, y, width, height]

Defined in

leafer/packages/interface/src/path/IPathCommand.ts:41


RoundRectCommandData

Ƭ RoundRectCommandData: [Command, x, y, width, height, cornerRadius]

Defined in

leafer/packages/interface/src/path/IPathCommand.ts:42


EllipseCommandData

Ƭ EllipseCommandData: [Command, x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise]

Defined in

leafer/packages/interface/src/path/IPathCommand.ts:43


ArcCommandData

Ƭ ArcCommandData: [Command, x, y, radius, startAngle, endAngle, anticlockwise]

Defined in

leafer/packages/interface/src/path/IPathCommand.ts:44


ArcToCommandData

Ƭ ArcToCommandData: [Command, x1, y1, x2, y2, radius]

Defined in

leafer/packages/interface/src/path/IPathCommand.ts:45


CanvasPathCommand

Ƭ CanvasPathCommand: 1 | 2 | 5 | 7 | 11

Defined in

leafer/packages/interface/src/path/IPathCommand.ts:48


IPathCommandData

Ƭ IPathCommandData: number[]

Defined in

leafer/packages/interface/src/path/IPathCommand.ts:50


IPathCommandObject

Ƭ IPathCommandObject: MoveToCommandObject | LineToCommandObject | BezierCurveToCommandObject | QuadraticCurveToCommandObject | ClosePathCommandObject

Defined in

leafer/packages/interface/src/path/IPathCommand.ts:87


IAnswer

Ƭ IAnswer: 0 | 1 | 2 | 3

Defined in

leafer/packages/interface/src/selector/ISelector.ts:32


IAnimation

Ƭ IAnimation: IStyleAnimation | IKeyframesAnimation

Defined in

ui/packages/interface/src/IAnimation.ts:6


ITransition

Ƭ ITransition: IAnimateOptions | IAnimateEasingName | number | boolean

Defined in

ui/packages/interface/src/IAnimation.ts:8


IAnimateType

Ƭ IAnimateType: "all" | "animation" | "transition" | "animate"

Defined in

ui/packages/interface/src/IAnimation.ts:10


IKeyframe

Ƭ IKeyframe: IUIInputData | IAnimateKeyframe

Defined in

ui/packages/interface/src/IAnimation.ts:43


IKeyframeId

Ƭ IKeyframeId: number

Defined in

ui/packages/interface/src/IAnimation.ts:45


IAnimateEasing

Ƭ IAnimateEasing: IAnimateEasingName | ICubicBezierEasing | IStepsEasing | IObject

Defined in

ui/packages/interface/src/IAnimation.ts:83


IAnimateEasingName

Ƭ IAnimateEasingName: "linear" | "ease" | "ease-in" | "ease-out" | "ease-in-out" | "sine-in" | "sine-out" | "sine-in-out" | "quad-in" | "quad-out" | "quad-in-out" | "cubic-in" | "cubic-out" | "cubic-in-out" | "quart-in" | "quart-out" | "quart-in-out" | "quint-in" | "quint-out" | "quint-in-out" | "expo-in" | "expo-out" | "expo-in-out" | "circ-in" | "circ-out" | "circ-in-out" | "back-in" | "back-out" | "back-in-out" | "elastic-in" | "elastic-out" | "elastic-in-out" | "bounce-in" | "bounce-out" | "bounce-in-out"

Defined in

ui/packages/interface/src/IAnimation.ts:100


IAnimateEnding

Ƭ IAnimateEnding: "auto" | "from" | "to"

Defined in

ui/packages/interface/src/IAnimation.ts:116


IRobotActionName

Ƭ IRobotActionName: string

Defined in

ui/packages/interface/src/IUI.ts:116


IStateName

Ƭ IStateName: string

Defined in

ui/packages/interface/src/IUI.ts:428


IUITag

Ƭ IUITag: "App" | "Leafer" | "Rect" | "Ellipse" | "Polygon" | "Star" | "Line" | "Path" | "Pen" | "Text" | "Image" | "Canvas" | "Group" | "Frame" | "Box" | "Arrow" | "Robot" | "GIF" | "Video"

Defined in

ui/packages/interface/src/IUI.ts:498


IEditPointType

Ƭ IEditPointType: "rotate" | "resize" | "button"

Defined in

ui/packages/interface/src/editor/IEditor.ts:131


IUIBoundsModule

Ƭ IUIBoundsModule: IUIBounds & ThisType<IUI>

Defined in

ui/packages/interface/src/module/IUIBounds.ts:5


IUIHitModule

Ƭ IUIHitModule: ILeafHit & ThisType<IUI>

Defined in

ui/packages/interface/src/module/IUIHit.ts:5


IUIRenderModule

Ƭ IUIRenderModule: IUIRender & ThisType<IUI>

Defined in

ui/packages/interface/src/module/IUIRender.ts:5


IRectRenderModule

Ƭ IRectRenderModule: IRectRender & ThisType<IRect>

Defined in

ui/packages/interface/src/module/IUIRender.ts:12


IImageRenderModule

Ƭ IImageRenderModule: IImageRender & ThisType<IImage>

Defined in

ui/packages/interface/src/module/IUIRender.ts:18


ITextRenderModule

Ƭ ITextRenderModule: ITextRender & ThisType<IText>

Defined in

ui/packages/interface/src/module/IUIRender.ts:24


IGroupRenderModule

Ƭ IGroupRenderModule: IGroupRender & ThisType<IGroup>

Defined in

ui/packages/interface/src/module/IUIRender.ts:30


IFrameRenderModule

Ƭ IFrameRenderModule: IFrameRender & ThisType<IFrame>

Defined in

ui/packages/interface/src/module/IUIRender.ts:36


ILeafPaintColor

Ƭ ILeafPaintColor: IColorString | CanvasGradient | CanvasPattern

Defined in

ui/packages/interface/src/type/IComputedType.ts:7


ILeafFill

Ƭ ILeafFill: ILeafPaint

Defined in

ui/packages/interface/src/type/IComputedType.ts:34


IPercent

Ƭ IPercent: string

Defined in

ui/packages/interface/src/type/IStringType.ts:1


IColorString

Ƭ IColorString: string

Defined in

ui/packages/interface/src/type/IStringType.ts:2


ICornerRadiusString

Ƭ ICornerRadiusString: string

Defined in

ui/packages/interface/src/type/IStringType.ts:4


IStrokeWidthString

Ƭ IStrokeWidthString: string

Defined in

ui/packages/interface/src/type/IStringType.ts:5


IDashPatternString

Ƭ IDashPatternString: string

Defined in

ui/packages/interface/src/type/IStringType.ts:6


IPaintString

Ƭ IPaintString: ISolidPaintString | IGradientPaintString | IImagePaintString

Defined in

ui/packages/interface/src/type/IStringType.ts:8


IShadowString

Ƭ IShadowString: string

Defined in

ui/packages/interface/src/type/IStringType.ts:13


IPaint

Ƭ IPaint: ISolidPaint | IGradientPaint | IImagePaint

Defined in

ui/packages/interface/src/type/IType.ts:4


IFill

Ƭ IFill: IPaint | IPaint[] | IPaintString

Defined in

ui/packages/interface/src/type/IType.ts:6


IStroke

Ƭ IStroke: IPaint | IPaint[] | IPaintString

Defined in

ui/packages/interface/src/type/IType.ts:8


IPaintAttr

Ƭ IPaintAttr: "fill" | "stroke"

Defined in

ui/packages/interface/src/type/IType.ts:10


IPaintType

Ƭ IPaintType: "image" | "solid" | IGradientType

Defined in

ui/packages/interface/src/type/IType.ts:19


IGradientType

Ƭ IGradientType: "linear" | "radial" | "angular"

Defined in

ui/packages/interface/src/type/IType.ts:24


IColor

Ƭ IColor: IColorString | IRGB | IRGBA

Defined in

ui/packages/interface/src/type/IType.ts:35


IImagePaintMode

Ƭ IImagePaintMode: "normal" | "cover" | "fit" | "stretch" | "clip" | "repeat"

Defined in

ui/packages/interface/src/type/IType.ts:89


IRepeat

Ƭ IRepeat: boolean | "x" | "y"

Defined in

ui/packages/interface/src/type/IType.ts:90


IStrokeAlign

Ƭ IStrokeAlign: "inside" | "outside" | "center"

Defined in

ui/packages/interface/src/type/IType.ts:93


IStrokeCap

Ƭ IStrokeCap: "none" | "round" | "square"

Defined in

ui/packages/interface/src/type/IType.ts:94


IStrokeJoin

Ƭ IStrokeJoin: "bevel" | "round" | "miter"

Defined in

ui/packages/interface/src/type/IType.ts:95


IArrowType

Ƭ IArrowType: IPathDataArrow | "none" | "angle" | "angle-side" | "arrow" | "triangle" | "triangle-flip" | "circle" | "circle-line" | "square" | "square-line" | "diamond" | "diamond-line" | "mark"

Defined in

ui/packages/interface/src/type/IType.ts:98


ITextAlign

Ƭ ITextAlign: "left" | "center" | "right" | "justify"

Defined in

ui/packages/interface/src/type/IType.ts:117


IVerticalAlign

Ƭ IVerticalAlign: "top" | "middle" | "bottom"

Defined in

ui/packages/interface/src/type/IType.ts:118


ITextCase

Ƭ ITextCase: "upper" | "lower" | "title" | "none" | "small-caps"

Defined in

ui/packages/interface/src/type/IType.ts:119


IFontWeight

Ƭ IFontWeight: IFontWeightNumer | IFontWeightString

Defined in

ui/packages/interface/src/type/IType.ts:120


IFontWeightNumer

Ƭ IFontWeightNumer: 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900

Defined in

ui/packages/interface/src/type/IType.ts:121


IFontWeightString

Ƭ IFontWeightString: "thin" | "extra-light" | "light" | "normal" | "medium" | "semi-bold" | "bold" | "extra-bold" | "black"

Defined in

ui/packages/interface/src/type/IType.ts:122


ITextDecoration

Ƭ ITextDecoration: "none" | "under" | "delete"

Defined in

ui/packages/interface/src/type/IType.ts:132


ITextWrap

Ƭ ITextWrap: "normal" | "none" | "break"

Defined in

ui/packages/interface/src/type/IType.ts:133


IEffect

Ƭ IEffect: IObject

Defined in

ui/packages/interface/src/type/IType.ts:163


IOverflow

Ƭ IOverflow: "show" | "hide"

Defined in

ui/packages/interface/src/type/IType.ts:165

Variables

AnimateEasing

Const AnimateEasing: Object

Type declaration

NameType
get(easing: IAnimateEasing) => any
register(name: string, value: ICustomEasingFunction) => void
listIObject

Defined in

in/packages/animate/src/AnimateEasing.ts:67


PathArrowModule

Const PathArrowModule: IPathArrowModule

Defined in

in/packages/arrow/src/PathArrowModule.ts:14


PathMatrixHelper

Const PathMatrixHelper: Object

Type declaration

NameType
layout(data: IPathCommandData, x: number, y: number, scaleX?: number, scaleY?: number, rotation?: number, origin?: IPointData) => void
rotate(data: IPathCommandData, rotation?: number, center?: IPointData) => void

Defined in

in/packages/arrow/src/PathMatrixHelper.ts:9


EditDataHelper

Const EditDataHelper: Object

Type declaration

NameType
getScaleData(element: IUI, startBounds: ILayoutBoundsData, direction: Direction9, totalMove: IPointData, lockRatio: boolean | "corner", around: IAround, flipable: boolean, scaleMode: boolean) => IEditorScaleEvent
getRotateData(bounds: IBoundsData, direction: Direction9, current: IPointData, last: IPointData, around: IAround) => IEditorRotateEvent
getSkewData(bounds: IBoundsData, direction: Direction9, move: IPointData, around: IAround) => IEditorSkewEvent
getAround(around: IAround, altKey: boolean) => IAround
getRotateDirection(direction: number, rotation: number, totalDirection: number) => number
getFlipDirection(direction: Direction9, flipedX: boolean, flipedY: boolean) => Direction9

Defined in

in/packages/editor/src/helper/EditDataHelper.ts:11


EditSelectHelper

Const EditSelectHelper: Object

Type declaration

NameType
findOne(path: ILeafList) => IUI
findBounds(leaf: IUI, bounds: IBounds) => Answer

Defined in

in/packages/editor/src/helper/EditSelectHelper.ts:6


EditorHelper

Const EditorHelper: Object

Type declaration

NameType
group(list: IUI[], element?: IUI, userGroup?: IGroupInputData | IGroup) => IGroup
ungroup(list: IUI[]) => IUI[]
toTop(list: IUI[]) => void
toBottom(list: IUI[]) => void

Defined in

in/packages/editor/src/helper/EditorHelper.ts:8


EditToolCreator

Const EditToolCreator: Object

Type declaration

NameType
listIObject
register(EditTool: IObject) => void
get(tag: string, editor: IEditor) => IEditTool

Defined in

in/packages/editor/src/tool/EditToolCreator.ts:17


PathScaler

Const PathScaler: Object

Type declaration

NameType
scale(data: IPathCommandData, scaleX: number, scaleY: number) => void
scalePoints(data: IPathCommandData, scaleX: number, scaleY: number, start?: number, pointCount?: number) => void

Defined in

in/packages/resize/src/PathScaler.ts:8


canvasSizeAttrs

Const canvasSizeAttrs: string[]

Defined in

leafer/packages/canvas/canvas/src/LeaferCanvasBase.ts:12


version

Const version: "1.0.7"

Defined in

leafer/packages/core/src/index.ts:23


Run

Const Run: Object

Type declaration

NameType
currentIdnumber
currentNamestring
idMapids
nameMapnames
nameToIdMapids
start(name: string, microsecond?: boolean) => number
end(id: number, microsecond?: boolean) => void
endOfName(name: string, microsecond?: boolean) => void

Defined in

leafer/packages/debug/src/Run.ts:15


DataHelper

Const DataHelper: Object

Type declaration

NameType
default<T>(t: T, defaultData: IObject) => T
assign(t: IObject, merge: IObject) => void
copyAttrs(t: IObject, from: IObject, include: string[]) => IObject
clone(data: unknown) => IObject
toMap(list: string[]) => IBooleanMap

Defined in

leafer/packages/display-module/data/src/DataHelper.ts:4


emptyData

Const emptyData: IObject = {}

Defined in

leafer/packages/display-module/data/src/index.ts:13


BranchRender

Const BranchRender: IBranchRenderModule

Defined in

leafer/packages/display-module/display-module/src/BranchRender.ts:7


LeafBounds

Const LeafBounds: ILeafBoundsModule

Defined in

leafer/packages/display-module/display-module/src/LeafBounds.ts:12


LeafDataProxy

Const LeafDataProxy: ILeafDataProxyModule

Defined in

leafer/packages/display-module/display-module/src/LeafDataProxy.ts:9


LeafEventer

Const LeafEventer: ILeafEventerModule

Defined in

leafer/packages/display-module/display-module/src/LeafEventer.ts:6


LeafMatrix

Const LeafMatrix: ILeafMatrixModule

Defined in

leafer/packages/display-module/display-module/src/LeafMatrix.ts:8


LeafRender

Const LeafRender: ILeafRenderModule

Defined in

leafer/packages/display-module/display-module/src/LeafRender.ts:4


BranchHelper

Const BranchHelper: Object

Type declaration

NameType
sort(a: ILeaf, b: ILeaf) => number
pushAllChildBranch(branch: ILeaf, leafList: ILeafList | ILeafLevelList) => void
pushAllParent(leaf: ILeaf, leafList: ILeafList | ILeafLevelList) => void
pushAllBranchStack(branch: ILeaf, pushList: ILeaf[]) => void
updateBounds(branch: ILeaf, exclude?: ILeaf) => void
updateBoundsByBranchStack(branchStack: ILeaf[], exclude?: ILeaf) => void

Defined in

leafer/packages/display-module/helper/src/BranchHelper.ts:7


LeafBoundsHelper

Const LeafBoundsHelper: Object

Type declaration

NameType
worldBounds(target: ILeaf) => IBoundsData
localBoxBounds(target: ILeaf) => IBoundsData
localStrokeBounds(target: ILeaf) => IBoundsData
localRenderBounds(target: ILeaf) => IBoundsData
maskLocalBoxBounds(target: ILeaf) => IBoundsData
maskLocalStrokeBounds(target: ILeaf) => IBoundsData
maskLocalRenderBounds(target: ILeaf) => IBoundsData
excludeRenderBounds(child: ILeaf, options: IRenderOptions) => boolean

Defined in

leafer/packages/display-module/helper/src/LeafBoundsHelper.ts:4


LeafHelper

Const LeafHelper: Object

Type declaration

NameType
updateAllMatrix(leaf: ILeaf, checkAutoLayout?: boolean, waitAutoLayout?: boolean) => void
updateMatrix(leaf: ILeaf, checkAutoLayout?: boolean, waitAutoLayout?: boolean) => void
updateBounds(leaf: ILeaf) => void
updateAllWorldOpacity(leaf: ILeaf) => void
updateAllChange(leaf: ILeaf) => void
worldHittable(t: ILeaf) => boolean
moveWorld(t: ILeaf, x: number | IPointData, y: number, isInnerPoint?: boolean) => void
moveLocal(t: ILeaf, x: number | IPointData, y: number) => void
zoomOfWorld(t: ILeaf, origin: IPointData, scaleX: number, scaleY?: number, resize?: boolean) => void
zoomOfLocal(t: ILeaf, origin: IPointData, scaleX: number, scaleY: number, resize?: boolean) => void
rotateOfWorld(t: ILeaf, origin: IPointData, angle: number) => void
rotateOfLocal(t: ILeaf, origin: IPointData, angle: number) => void
skewOfWorld(t: ILeaf, origin: IPointData, skewX: number, skewY?: number, resize?: boolean) => void
skewOfLocal(t: ILeaf, origin: IPointData, skewX: number, skewY: number, resize?: boolean) => void
transformWorld(t: ILeaf, transform: IMatrixData, resize?: boolean) => void
transform(t: ILeaf, transform: IMatrixData, resize?: boolean) => void
setTransform(t: ILeaf, transform: IMatrixData, resize?: boolean) => void
getFlipTransform(t: ILeaf, axis: IAxis) => IMatrixData
getLocalOrigin(t: ILeaf, origin: IPointData | IDirection) => IPointData
getInnerOrigin(t: ILeaf, origin: IPointData | IDirection) => IPointData
getRelativeWorld(t: ILeaf, relative: ILeaf, temp?: boolean) => IMatrixData
drop(t: ILeaf, parent: ILeaf, index?: number, resize?: boolean) => void
hasParent(p: ILeaf, parent: ILeaf) => boolean | void

Defined in

leafer/packages/display-module/helper/src/LeafHelper.ts:8


WaitHelper

Const WaitHelper: Object

Type declaration

NameType
run(wait: IFunction[]) => void

Defined in

leafer/packages/display-module/helper/src/WaitHelper.ts:3


FileHelper

Const FileHelper: Object

Type declaration

NameType
opacityTypesIExportFileType[]
upperCaseTypeMapIStringMap
mineType(type: string) => string
fileType(filename: string) => string
isOpaqueImage(filename: string) => boolean
getExportOptions(options?: number | boolean | IExportOptions) => IExportOptions

Defined in

leafer/packages/file/src/FileHelper.ts:3


ImageManager

Const ImageManager: IImageManager

Defined in

leafer/packages/image/image/src/ImageManager.ts:7


AlignHelper

Const AlignHelper: Object

Type declaration

NameType
toPoint(align: IDirection, contentBounds: IBoundsData, bounds: IBoundsData, to?: IPointData, onlySize?: boolean) => void

Defined in

leafer/packages/math/src/AlignHelper.ts:6


AroundHelper

Const AroundHelper: Object

Type declaration

NameType
directionDataIUnitPointData[]
tempPointIPointData
get(around: IAround) => IUnitPointData
toPoint(around: IAround, bounds: IBoundsData, to: IPointData, onlySize?: boolean, pointBounds?: IBoundsData) => void

Defined in

leafer/packages/math/src/AroundHelper.ts:18


tempBounds

Const tempBounds: Bounds

Defined in

leafer/packages/math/src/Bounds.ts:179


BoundsHelper

Const BoundsHelper: Object

Type declaration

NameType
tempBoundsIBoundsData
set(t: IBoundsData, x: number, y: number, width: number, height: number) => void
copy(t: IBoundsData, bounds: IBoundsData) => void
copyAndSpread(t: IBoundsData, bounds: IBoundsData, spread: IFourNumber, isShrink?: boolean, side?: ISide) => void
minX(t: IBoundsData) => number
minY(t: IBoundsData) => number
maxX(t: IBoundsData) => number
maxY(t: IBoundsData) => number
move(t: IBoundsData, x: number, y: number) => void
getByMove(t: IBoundsData, x: number, y: number) => IBoundsData
toOffsetOutBounds(t: IBoundsData, to?: IOffsetBoundsData, parent?: IBoundsData) => void
scale(t: IBoundsData, scaleX: number, scaleY: number) => void
scaleOf(t: IBoundsData, origin: IPointData, scaleX: number, scaleY: number) => void
tempToOuterOf(t: IBoundsData, matrix: IMatrixData) => IBoundsData
getOuterOf(t: IBoundsData, matrix: IMatrixData) => IBoundsData
toOuterOf(t: IBoundsData, matrix: IMatrixData, to?: IBoundsData) => void
toInnerOf(t: IBoundsData, matrix: IMatrixData, to?: IBoundsData) => void
getFitMatrix(t: IBoundsData, put: IBoundsData, baseScale: number) => IMatrix
getSpread(t: IBoundsData, spread: IFourNumber, side?: ISide) => IBoundsData
spread(t: IBoundsData, spread: IFourNumber, side?: ISide) => void
shrink(t: IBoundsData, shrink: IFourNumber, side?: ISide) => void
ceil(t: IBoundsData) => void
unsign(t: IBoundsData) => void
float(t: IBoundsData, maxLength?: number) => void
add(t: IBoundsData, bounds: IBoundsData, isPoint?: boolean) => void
addList(t: IBoundsData, list: IBoundsData[]) => void
setList(t: IBoundsData, list: IBoundsData[], addMode: boolean) => void
addListWithFn(t: IBoundsData, list: IObject[], boundsDataFn: IBoundsDataFn) => void
setListWithFn(t: IBoundsData, list: IObject[], boundsDataFn: IBoundsDataFn, addMode: boolean) => void
setPoints(t: IBoundsData, points: IPointData[]) => void
setPoint(t: IBoundsData, point: IPointData) => void
addPoint(t: IBoundsData, point: IPointData) => void
getPoints(t: IBoundsData) => IPointData[]
hitRadiusPoint(t: IBoundsData, point: IRadiusPointData, pointMatrix?: IMatrixWithScaleData) => boolean
hitPoint(t: IBoundsData, point: IPointData, pointMatrix?: IMatrixData) => boolean
hit(t: IBoundsData, other: IBoundsData, otherMatrix?: IMatrixData) => boolean
includes(t: IBoundsData, other: IBoundsData, otherMatrix?: IMatrixData) => boolean
getIntersectData(t: IBoundsData, other: IBoundsData, otherMatrix?: IMatrixData) => IBoundsData
intersect(t: IBoundsData, other: IBoundsData, otherMatrix?: IMatrixData) => void
isSame(t: IBoundsData, bounds: IBoundsData) => boolean
isEmpty(t: IBoundsData) => boolean
reset(t: IBoundsData) => void

Defined in

leafer/packages/math/src/BoundsHelper.ts:18


IncrementId

Const IncrementId: Object

Type declaration

NameType
RUNTIMEstring
LEAFstring
TASKstring
CNAVASstring
IMAGEstring
typesINumberMap
create(typeName: string) => number

Defined in

leafer/packages/math/src/IncrementId.ts:4


MathHelper

Const MathHelper: Object

Type declaration

NameType
within(value: number, min: number | IRangeSize, max?: number) => number
fourNumber(num: number | number[], maxValue?: number) => number[]
formatRotation(rotation: number, unsign?: boolean) => number
getGapRotation(addRotation: number, gap: number, oldRotation: number) => number
float(num: number, maxLength?: number) => number
getScaleData(scale: number | IPointData, size: number | ISizeData, originSize: ISizeData, scaleData?: IScaleData) => IScaleData
assignScale(scaleData: IScaleData, scale: number | IPointData) => void

Defined in

leafer/packages/math/src/MathHelper.ts:5


OneRadian

Const OneRadian: number

Defined in

leafer/packages/math/src/MathHelper.ts:85


PI2

Const PI2: number

Defined in

leafer/packages/math/src/MathHelper.ts:86


PI_2

Const PI_2: number

Defined in

leafer/packages/math/src/MathHelper.ts:87


tempMatrix

Const tempMatrix: Matrix

Defined in

leafer/packages/math/src/Matrix.ts:168


MatrixHelper

Const MatrixHelper: Object

Type declaration

NameType
defaultMatrixIMatrixData
defaultWorldIMatrixWithLayoutData
tempMatrixIMatrixData
set(t: IMatrixData, a: number, b: number, c: number, d: number, e: number, f: number) => void
get() => IMatrixData
getWorld() => IMatrixWithLayoutData
copy(t: IMatrixData, matrix: IMatrixData) => void
translate(t: IMatrixData, x: number, y: number) => void
translateInner(t: IMatrixData, x: number, y: number, hasOrigin?: boolean) => void
scale(t: IMatrixData, scaleX: number, scaleY: number) => void
scaleOfOuter(t: IMatrixData, origin: IPointData, scaleX: number, scaleY?: number) => void
scaleOfInner(t: IMatrixData, origin: IPointData, scaleX: number, scaleY: number) => void
rotate(t: IMatrixData, rotation: number) => void
rotateOfOuter(t: IMatrixData, origin: IPointData, rotation: number) => void
rotateOfInner(t: IMatrixData, origin: IPointData, rotation: number) => void
skew(t: IMatrixData, skewX: number, skewY?: number) => void
skewOfOuter(t: IMatrixData, origin: IPointData, skewX: number, skewY?: number) => void
skewOfInner(t: IMatrixData, origin: IPointData, skewX: number, skewY: number) => void
multiply(t: IMatrixData, child: IMatrixData) => void
multiplyParent(t: IMatrixWithOptionScaleData, parent: IMatrixWithOptionScaleData, to?: IMatrixWithOptionScaleData, abcdChanged?: number | boolean, childScaleData?: IScaleData, scrollData?: IScrollPointData) => void
divide(t: IMatrixData, child: IMatrixData) => void
divideParent(t: IMatrixData, parent: IMatrixData) => void
tempInvert(t: IMatrixData) => IMatrixData
invert(t: IMatrixData) => void
toOuterPoint(t: IMatrixData, inner: IPointData, to?: IPointData, distance?: boolean) => void
toInnerPoint(t: IMatrixData, outer: IPointData, to?: IPointData, distance?: boolean) => void
setLayout(t: IMatrixData, layout: ILayoutData, origin?: IPointData, around?: IPointData, bcChanged?: number | boolean) => void
getLayout(t: IMatrixData, origin?: IPointData, around?: IPointData, firstSkewY?: boolean) => ILayoutData
withScale(t: IMatrixData, scaleX?: number, scaleY: number) => IMatrixWithScaleData
reset(t: IMatrixData) => void

Defined in

leafer/packages/math/src/MatrixHelper.ts:13


tempPoint

Const tempPoint: Point

Defined in

leafer/packages/math/src/Point.ts:98


PointHelper

Const PointHelper: Object

Type declaration

NameType
defaultPointIPointData
tempPointIPointData
tempRadiusPointIRadiusPointData
set(t: IPointData, x: number, y: number) => void
setRadius(t: IRadiusPointData, x: number, y?: number) => void
copy(t: IPointData, point: IPointData) => void
copyFrom(t: IPointData, x: number, y: number) => void
move(t: IPointData, x: number, y: number) => void
scale(t: IPointData, scaleX: number, scaleY: number) => void
scaleOf(t: IPointData, origin: IPointData, scaleX: number, scaleY: number) => void
rotate(t: IPointData, rotation: number, origin?: IPointData) => void
tempToInnerOf(t: IPointData, matrix: IMatrixData) => IPointData
tempToOuterOf(t: IPointData, matrix: IMatrixData) => IPointData
tempToInnerRadiusPointOf(t: IRadiusPointData, matrix: IMatrixWithScaleData) => IRadiusPointData
toInnerRadiusPointOf(t: IRadiusPointData, matrix: IMatrixWithScaleData, to?: IRadiusPointData) => void
toInnerOf(t: IPointData, matrix: IMatrixData, to?: IPointData) => void
toOuterOf(t: IPointData, matrix: IMatrixData, to?: IPointData) => void
getCenter(t: IPointData, to: IPointData) => IPointData
getCenterX(x1: number, x2: number) => number
getCenterY(y1: number, y2: number) => number
getDistance(t: IPointData, point: IPointData) => number
getDistanceFrom(x1: number, y1: number, x2: number, y2: number) => number
getMinDistanceFrom(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number) => number
getAngle(t: IPointData, to: IPointData) => number
getRotation(t: IPointData, origin: IPointData, to: IPointData, toOrigin?: IPointData) => number
getRadianFrom(fromX: number, fromY: number, originX: number, originY: number, toX: number, toY: number, toOriginX?: number, toOriginY?: number) => number
getAtan2(t: IPointData, to: IPointData) => number
getDistancePoint(t: IPointData, to: IPointData, distance: number, changeTo: boolean) => IPointData
toNumberPoints(originPoints: number[] | IPointData[]) => number[]
reset(t: IPointData) => void

Defined in

leafer/packages/math/src/PointHelper.ts:11


StringNumberMap

Const StringNumberMap: INumberMap

Defined in

leafer/packages/math/src/StringNumber.ts:4


TwoPointBoundsHelper

Const TwoPointBoundsHelper: Object

Type declaration

NameType
tempPointBoundsITwoPointBoundsData
setPoint(t: ITwoPointBoundsData, minX: number, minY: number) => void
addPoint(t: ITwoPointBoundsData, x: number, y: number) => void
addBounds(t: ITwoPointBoundsData, x: number, y: number, width: number, height: number) => void
copy(t: ITwoPointBoundsData, pb: ITwoPointBoundsData) => void
addPointBounds(t: ITwoPointBoundsData, pb: ITwoPointBoundsData) => void
toBounds(t: ITwoPointBoundsData, setBounds: IBoundsData) => void

Defined in

leafer/packages/math/src/TwoPointBoundsHelper.ts:3


BezierHelper

Const BezierHelper: Object

Type declaration

NameType
points(data: IPathCommandData, originPoints: number[] | IPointData[], curve?: number | boolean, close?: boolean) => void
rect(data: IPathCommandData, x: number, y: number, width: number, height: number) => void
roundRect(data: IPathCommandData, x: number, y: number, width: number, height: number, radius: number | number[]) => void
arcTo(data: void | IPathCommandData, fromX: number, fromY: number, x1: number, y1: number, toX: number, toY: number, radius: number, setPointBounds?: ITwoPointBoundsData, setEndPoint?: IPointData, setStartPoint?: IPointData) => void
arc(data: void | IPathCommandData, x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean, setPointBounds?: ITwoPointBoundsData, setEndPoint?: IPointData, setStartPoint?: IPointData) => void
ellipse(data: void | IPathCommandData, cx: number, cy: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, anticlockwise?: boolean, setPointBounds?: ITwoPointBoundsData, setEndPoint?: IPointData, setStartPoint?: IPointData) => void
quadraticCurveTo(data: IPathCommandData, fromX: number, fromY: number, x1: number, y1: number, toX: number, toY: number) => void
toTwoPointBoundsByQuadraticCurve(fromX: number, fromY: number, x1: number, y1: number, toX: number, toY: number, pointBounds: ITwoPointBoundsData, addMode?: boolean) => void
toTwoPointBounds(fromX: number, fromY: number, x1: number, y1: number, x2: number, y2: number, toX: number, toY: number, pointBounds: ITwoPointBoundsData, addMode?: boolean) => void
getPointAndSet(t: number, fromX: number, fromY: number, x1: number, y1: number, x2: number, y2: number, toX: number, toY: number, setPoint: IPointData) => void
getPoint(t: number, fromX: number, fromY: number, x1: number, y1: number, x2: number, y2: number, toX: number, toY: number) => IPointData

Defined in

leafer/packages/path/src/BezierHelper.ts:15


EllipseHelper

Const EllipseHelper: Object

Type declaration

NameType
ellipticalArc(data: IPathCommandData, fromX: number, fromY: number, radiusX: number, radiusY: number, rotation: number, largeFlag: number, sweepFlag: number, toX: number, toY: number, curveMode?: boolean) => void

Defined in

leafer/packages/path/src/EllipseHelper.ts:12


PathBounds

Const PathBounds: Object

Type declaration

NameType
toBounds(data: IPathCommandData, setBounds: IBoundsData) => void
toTwoPointBounds(data: IPathCommandData, setPointBounds: ITwoPointBoundsData) => void

Defined in

leafer/packages/path/src/PathBounds.ts:19


PathCommandDataHelper

Const PathCommandDataHelper: Object

Type declaration

NameType
beginPath(data: IPathCommandData) => void
moveTo(data: IPathCommandData, x: number, y: number) => void
lineTo(data: IPathCommandData, x: number, y: number) => void
bezierCurveTo(data: IPathCommandData, x1: number, y1: number, x2: number, y2: number, x: number, y: number) => void
quadraticCurveTo(data: IPathCommandData, x1: number, y1: number, x: number, y: number) => void
closePath(data: IPathCommandData) => void
rect(data: IPathCommandData, x: number, y: number, width: number, height: number) => void
roundRect(data: IPathCommandData, x: number, y: number, width: number, height: number, cornerRadius: number | number[]) => void
ellipse(data: IPathCommandData, x: number, y: number, radiusX: number, radiusY: number, rotation?: number, startAngle?: number, endAngle?: number, anticlockwise?: boolean) => void
arc(data: IPathCommandData, x: number, y: number, radius: number, startAngle?: number, endAngle?: number, anticlockwise?: boolean) => void
arcTo(data: IPathCommandData, x1: number, y1: number, x2: number, y2: number, radius: number, lastX?: number, lastY?: number) => void
drawEllipse(data: IPathCommandData, x: number, y: number, radiusX: number, radiusY: number, rotation?: number, startAngle?: number, endAngle?: number, anticlockwise?: boolean) => void
drawArc(data: IPathCommandData, x: number, y: number, radius: number, startAngle?: number, endAngle?: number, anticlockwise?: boolean) => void
drawPoints(data: IPathCommandData, points: number[] | IPointData[], curve?: number | boolean, close?: boolean) => void

Defined in

leafer/packages/path/src/PathCommandDataHelper.ts:13


PathCommandMap

Const PathCommandMap: INumberMap

Defined in

leafer/packages/path/src/PathCommandMap.ts:16


NeedConvertToCanvasCommandMap

Const NeedConvertToCanvasCommandMap: INumberMap

Defined in

leafer/packages/path/src/PathCommandMap.ts:83


PathNumberCommandMap

Const PathNumberCommandMap: IStringMap = {}

Defined in

leafer/packages/path/src/PathCommandMap.ts:116


PathNumberCommandLengthMap

Const PathNumberCommandLengthMap: INumberMap = {}

Defined in

leafer/packages/path/src/PathCommandMap.ts:122


PathConvert

Const PathConvert: Object

Type declaration

NameType
currentICurrentCommand
stringify(data: IPathCommandData, floatLength?: number) => string
parse(pathString: string, curveMode?: boolean) => IPathCommandData
toCanvasData(old: IPathCommandData, curveMode?: boolean) => IPathCommandData
objectToCanvasData(list: IPathCommandObject[]) => IPathCommandData
copyData(data: IPathCommandData, old: IPathCommandData, index: number, count: number) => void
pushData(data: IPathCommandData, strNum: string | number) => void

Defined in

leafer/packages/path/src/PathConvert.ts:25


PathCorner

Const PathCorner: Object

Type declaration

NameType
smooth(data: IPathCommandData, cornerRadius: number, _cornerSmoothing?: number) => IPathCommandData

Defined in

leafer/packages/path/src/PathCorner.ts:12


PathDrawer

Const PathDrawer: Object

Type declaration

NameType
drawPathByData(drawer: IPathDrawer, data: IPathCommandData) => void

Defined in

leafer/packages/path/src/PathDrawer.ts:11


PathHelper

Const PathHelper: Object

Type declaration

NameType
creatorIPathCreator
parse(_pathString: string, _curveMode?: boolean) => IPathCommandData
convertToCanvasData(_old: IPathCommandData, _curveMode?: boolean) => IPathCommandData

Defined in

leafer/packages/path/src/PathHelper.ts:3


RectHelper

Const RectHelper: Object

Type declaration

NameType
drawRoundRect(drawer: IPathDrawer, x: number, y: number, width: number, height: number, cornerRadius: number | number[]) => void

Defined in

leafer/packages/path/src/RectHelper.ts:4


pen

Const pen: PathCreator

Defined in

leafer/packages/path/src/index.ts:23


Platform

Const Platform: IPlatform

Defined in

leafer/packages/platform/platform/src/Platform.ts:4


Creator

Const Creator: ICreator = {}

Defined in

leafer/packages/platform/platform/src/creator/Creator.ts:4


EventCreator

Const EventCreator: Object

Type declaration

NameType
nameListIObject
register(Event: IObject) => void
changeName(oldName: string, newName: string) => void
has(type: string) => boolean
get(type: string, ...params: unknown[]) => IEvent

Defined in

leafer/packages/platform/platform/src/creator/EventCreator.ts:7


UICreator

Const UICreator: Object

Type declaration

NameType
listIObject
register(UI: IObject) => void
get(tag: string, data?: IObject, x?: number, y?: number, width?: number, height?: number) => ILeaf

Defined in

leafer/packages/platform/platform/src/creator/UICreator.ts:7


UIBounds

Const UIBounds: IUIBoundsModule

Defined in

ui/packages/display-module/bounds/src/UIBounds.ts:4


RectRender

Const RectRender: IRectRenderModule

Defined in

ui/packages/display-module/render/src/RectRender.ts:6


UIRender

Const UIRender: IUIRenderModule

Defined in

ui/packages/display-module/render/src/UIRender.ts:7


MyImage

Const MyImage: typeof Image = Image

Defined in

ui/packages/display/src/Image.ts:39


MyDragEvent

Const MyDragEvent: typeof DragEvent = DragEvent

Defined in

ui/packages/event/src/DragEvent.ts:118


Keyboard

Const Keyboard: Object

Type declaration

NameType
isHoldSpaceKey() => boolean
isHold(code: string) => boolean
setDownCode(code: string) => void
setUpCode(code: string) => void

Defined in

ui/packages/event/src/Keyboard.ts:6


PointerButton

Const PointerButton: Object

Type declaration

NameType
LEFTnumber
RIGHTnumber
MIDDLEnumber
defaultLeft(event: IUIEvent) => void
left(event: IUIEvent) => boolean
right(event: IUIEvent) => boolean
middle(event: IUIEvent) => boolean

Defined in

ui/packages/event/src/PointerButton.ts:4


MyPointerEvent

Const MyPointerEvent: typeof PointerEvent = PointerEvent

Defined in

ui/packages/event/src/PointerEvent.ts:50


TextConvert

Const TextConvert: ITextConvertModule

Defined in

ui/packages/external/src/index.ts:5


ColorConvert

Const ColorConvert: IColorConvertModule

Defined in

ui/packages/external/src/index.ts:7


UnitConvert

Const UnitConvert: Object

Type declaration

NameType
number(value: number | IUnitData, percentRefer?: number) => number

Defined in

ui/packages/external/src/index.ts:9


PathArrow

Const PathArrow: IPathArrowModule

Defined in

ui/packages/external/src/index.ts:19


Paint

Const Paint: IPaintModule

Defined in

ui/packages/external/src/index.ts:22


PaintImage

Const PaintImage: IPaintImageModule

Defined in

ui/packages/external/src/index.ts:24


PaintGradient

Const PaintGradient: IPaintGradientModule

Defined in

ui/packages/external/src/index.ts:26


Effect

Const Effect: IEffectModule

Defined in

ui/packages/external/src/index.ts:28


Export

Const Export: IExportModule

Defined in

ui/packages/external/src/index.ts:30


State

Const State: IStateModule

Defined in

ui/packages/external/src/index.ts:32


Transition

Const Transition: ITransitionModule

Defined in

ui/packages/external/src/index.ts:37


InteractionHelper

Const InteractionHelper: Object

Type declaration

NameType
getMoveEventData(center: IPointData, move: IPointData, event: IEvent) => IMoveEvent
getRotateEventData(center: IPointData, angle: number, event: IEvent) => IRotateEvent
getZoomEventData(center: IPointData, scale: number, event: IEvent) => IZoomEvent
getDragEventData(startPoint: IPointData, lastPoint: IPointData, event: IPointerEvent) => IDragEvent
getDropEventData(event: IPointerEvent, list: ILeafList, data: IObject) => IDropEvent
getSwipeDirection(angle: number) => string
getSwipeEventData(startPoint: IPointData, lastDragData: IDragEvent, event: IPointerEvent) => ISwipeEvent
getBase(e: IObject) => IUIEvent
pathHasEventType(path: ILeafList, type: string) => boolean
filterPathByEventType(path: ILeafList, type: string) => ILeafList
pathCanDrag(path: ILeafList) => boolean
pathHasOutside(path: ILeafList) => boolean

Defined in

ui/packages/interaction/interaction/src/InteractionHelper.ts:7


MultiTouchHelper

Const MultiTouchHelper: Object

Type declaration

NameType
getData(list: IKeepTouchData[]) => IMultiTouchData

Defined in

ui/packages/interaction/interaction/src/MultiTouchHelper.ts:5


LeaferTypeCreator

Const LeaferTypeCreator: Object

Type declaration

NameType
listILeaferTypeList
register(name: string, fn: ILeaferTypeFunction) => void
run(name: string, leafer: ILeaferBase) => void

Defined in

ui/packages/type/src/LeaferTypeCreator.ts:12

Functions

arrowType

arrowType(defaultValue?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

in/packages/arrow/src/decorator.ts:4


registerEditTool

registerEditTool(): (target: IObject) => void

Returns

fn

▸ (target): void

Parameters
NameType
targetIObject
Returns

void

Defined in

in/packages/editor/src/tool/EditToolCreator.ts:9


registerInnerEditor

registerInnerEditor(): (target: IObject) => void

Returns

fn

▸ (target): void

Parameters
NameType
targetIObject
Returns

void

Defined in

in/packages/editor/src/tool/EditToolCreator.ts:15


scaleResize

scaleResize(leaf, scaleX, scaleY): void

Parameters

NameType
leafILeaf
scaleXnumber
scaleYnumber

Returns

void

Defined in

in/packages/resize/src/scaler.ts:10


scaleResizeFontSize

scaleResizeFontSize(leaf, scaleX, scaleY): void

Parameters

NameType
leafIText
scaleXnumber
scaleYnumber

Returns

void

Defined in

in/packages/resize/src/scaler.ts:20


scaleResizePath

scaleResizePath(leaf, scaleX, scaleY): void

Parameters

NameType
leafILeaf
scaleXnumber
scaleYnumber

Returns

void

Defined in

in/packages/resize/src/scaler.ts:60


scaleResizePoints

scaleResizePoints(leaf, scaleX, scaleY): void

Parameters

NameType
leafILine | IPolygon
scaleXnumber
scaleYnumber

Returns

void

Defined in

in/packages/resize/src/scaler.ts:65


scaleResizeGroup

scaleResizeGroup(group, scaleX, scaleY): void

Parameters

NameType
groupIBranch
scaleXnumber
scaleYnumber

Returns

void

Defined in

in/packages/resize/src/scaler.ts:72


canvasPatch

canvasPatch(drawer): void

Parameters

NameType
drawerIPathDrawer

Returns

void

Defined in

leafer/packages/canvas/canvas/src/patch/index.ts:5


needPlugin

needPlugin(name): any

Parameters

NameType
namestring

Returns

any

Defined in

leafer/packages/debug/src/index.ts:4


registerUI

registerUI(): (target: IObject) => void

Returns

fn

▸ (target): void

Parameters
NameType
targetIObject
Returns

void

Defined in

leafer/packages/decorator/src/class.ts:4


registerUIEvent

registerUIEvent(): (target: IObject) => void

Returns

fn

▸ (target): void

Parameters
NameType
targetIObject
Returns

void

Defined in

leafer/packages/decorator/src/class.ts:10


decorateLeafAttr

decorateLeafAttr(defaultValue?, descriptorFn?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue
descriptorFn?ILeafAttrDescriptorFn

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:10


attr

attr(partDescriptor?): ILeafAttrDescriptor

Parameters

NameType
partDescriptor?ILeafAttrDescriptor

Returns

ILeafAttrDescriptor

Defined in

leafer/packages/decorator/src/data.ts:14


defineLeafAttr

defineLeafAttr(target, key, defaultValue?, partDescriptor?): void

Parameters

NameType
targetILeaf
keystring
defaultValue?IValue
partDescriptor?ILeafAttrDescriptor

Returns

void

Defined in

leafer/packages/decorator/src/data.ts:19


dataType

dataType(defaultValue?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:29


positionType

positionType(defaultValue?, checkFiniteNumber?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue
checkFiniteNumber?boolean

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:33


autoLayoutType

autoLayoutType(defaultValue?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:41


scaleType

scaleType(defaultValue?, checkFiniteNumber?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue
checkFiniteNumber?boolean

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:53


rotationType

rotationType(defaultValue?, checkFiniteNumber?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue
checkFiniteNumber?boolean

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:62


boundsType

boundsType(defaultValue?, checkFiniteNumber?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue
checkFiniteNumber?boolean

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:71


naturalBoundsType

naturalBoundsType(defaultValue?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:79


doBoundsType

doBoundsType(leaf): void

Parameters

NameType
leafILeaf

Returns

void

Defined in

leafer/packages/decorator/src/data.ts:87


pathInputType

pathInputType(defaultValue?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:92


pathType

pathType(defaultValue?, checkFiniteNumber?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue
checkFiniteNumber?boolean

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:104


affectStrokeBoundsType

affectStrokeBoundsType(defaultValue?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:107


doStrokeType

doStrokeType(leaf): void

Parameters

NameType
leafILeaf

Returns

void

Defined in

leafer/packages/decorator/src/data.ts:115


strokeType

strokeType(defaultValue?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:120


affectRenderBoundsType

affectRenderBoundsType(defaultValue?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:122


surfaceType

surfaceType(defaultValue?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:131


opacityType

opacityType(defaultValue?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:139


visibleType

visibleType(defaultValue?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:147


sortType

sortType(defaultValue?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:168


maskType

maskType(defaultValue?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:179


eraserType

eraserType(defaultValue?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:190


hitType

hitType(defaultValue?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:198


cursorType

cursorType(defaultValue?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:210


dataProcessor

dataProcessor(processor): (target: IObject, _key?: string) => void

Parameters

NameType
processorIObject

Returns

fn

▸ (target, _key?): void

Parameters
NameType
targetIObject
_key?string
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:222


layoutProcessor

layoutProcessor(processor): (target: IObject, _key?: string) => void

Parameters

NameType
processorIObject

Returns

fn

▸ (target, _key?): void

Parameters
NameType
targetIObject
_key?string
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:230


defineDataProcessor

defineDataProcessor(target, key, defaultValue?): void

Parameters

NameType
targetILeaf
keystring
defaultValue?IValue

Returns

void

Defined in

leafer/packages/decorator/src/data.ts:247


defineKey

defineKey<T>(target, key, descriptor, noConfigurable?): void

Type parameters

Name
T

Parameters

NameType
targetT
keystring
descriptorIObject & ThisType<T>
noConfigurable?boolean

Returns

void

Defined in

leafer/packages/decorator/src/object.ts:3


getDescriptor

getDescriptor(object, name): PropertyDescriptor

Parameters

NameType
objectIObject
namestring

Returns

PropertyDescriptor

Defined in

leafer/packages/decorator/src/object.ts:8


rewrite

rewrite(method): (target: IObject, key: string) => void

Parameters

NameType
methodIFunction

Returns

fn

▸ (target, key): void

Parameters
NameType
targetIObject
keystring
Returns

void

Defined in

leafer/packages/decorator/src/rewrite.ts:18


rewriteAble

rewriteAble(): (_target: IObject) => void

Returns

fn

▸ (_target): void

Parameters
NameType
_targetIObject
Returns

void

Defined in

leafer/packages/decorator/src/rewrite.ts:24


useModule

useModule(module, exclude?): (target: IObject) => void

Parameters

NameType
moduleIObject
exclude?string[]

Returns

fn

▸ (target): void

Parameters
NameType
targetIObject
Returns

void

Defined in

leafer/packages/decorator/src/rewrite.ts:45


isNull

isNull(value): boolean

Parameters

NameType
valueany

Returns

boolean

Defined in

leafer/packages/display-module/data/src/index.ts:15


getPointData

getPointData(): IPointData

Returns

IPointData

Defined in

leafer/packages/math/src/MathHelper.ts:89


getBoundsData

getBoundsData(): IBoundsData

Returns

IBoundsData

Defined in

leafer/packages/math/src/MathHelper.ts:90


useCanvas

useCanvas(_canvasType, _power?): void

Parameters

NameType
_canvasTypeICanvasType
_power?IObject

Returns

void

Defined in

leafer/packages/platform/web/src/index.ts:22


effectType

effectType(defaultValue?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

ui/packages/decorator/src/data.ts:7


resizeType

resizeType(defaultValue?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

ui/packages/decorator/src/data.ts:17


zoomLayerType

zoomLayerType(): (target: IUI, key: string) => void

Returns

fn

▸ (target, key): void

Parameters
NameType
targetIUI
keystring
Returns

void

Defined in

ui/packages/decorator/src/data.ts:27


addInteractionWindow

addInteractionWindow(leafer): void

Parameters

NameType
leaferILeaferBase

Returns

void

Defined in

ui/packages/type/src/window.ts:8

Released under the MIT License.