Skip to content

Class: Leaf ​

Hierarchy ​

Implements ​

Table of contents ​

Constructors ​

Properties ​

Accessors ​

Methods ​

Constructors ​

constructor ​

• new Leaf(data?): Leaf

Parameters ​

NameType
data?ILeafInputData

Returns ​

Leaf

Defined in ​

leafer/packages/display/src/Leaf.ts:108

Properties ​

innerId ​

• Readonly innerId: number

Implementation of ​

ILeaf.innerId

Defined in ​

leafer/packages/display/src/Leaf.ts:30


leafer ​

• Optional leafer: ILeaferBase

Implementation of ​

ILeaf.leafer

Defined in ​

leafer/packages/display/src/Leaf.ts:36


parent ​

• Optional parent: ILeaf

Implementation of ​

ILeaf.parent

Defined in ​

leafer/packages/display/src/Leaf.ts:37


syncEventer ​

• Optional syncEventer: ILeaf

Implementation of ​

ILeaf.syncEventer

Defined in ​

leafer/packages/display/src/Leaf.ts:46


lockNormalStyle ​

• Optional lockNormalStyle: boolean

Implementation of ​

ILeaf.lockNormalStyle

Defined in ​

leafer/packages/display/src/Leaf.ts:47


__ ​

• __: ILeafData

Implementation of ​

ILeaf.__

Defined in ​

leafer/packages/display/src/Leaf.ts:49


__layout ​

• __layout: ILeafLayout

Implementation of ​

ILeaf.__layout

Defined in ​

leafer/packages/display/src/Leaf.ts:50


__world ​

• __world: IMatrixWithBoundsScaleData

Implementation of ​

ILeaf.__world

Defined in ​

leafer/packages/display/src/Leaf.ts:52


__local ​

• Optional __local: IMatrixWithBoundsData

Implementation of ​

ILeaf.__local

Defined in ​

leafer/packages/display/src/Leaf.ts:53


__nowWorld ​

• Optional __nowWorld: IMatrixWithBoundsScaleData

Implementation of ​

ILeaf.__nowWorld

Defined in ​

leafer/packages/display/src/Leaf.ts:55


__cameraWorld ​

• Optional __cameraWorld: IMatrixWithBoundsScaleData

Implementation of ​

ILeaf.__cameraWorld

Defined in ​

leafer/packages/display/src/Leaf.ts:56


__worldOpacity ​

• __worldOpacity: number

Implementation of ​

ILeaf.__worldOpacity

Defined in ​

leafer/packages/display/src/Leaf.ts:61


__level ​

• __level: number

Implementation of ​

ILeaf.__level

Defined in ​

leafer/packages/display/src/Leaf.ts:77


__tempNumber ​

• __tempNumber: number

Implementation of ​

ILeaf.__tempNumber

Defined in ​

leafer/packages/display/src/Leaf.ts:78


__hasAutoLayout ​

• Optional __hasAutoLayout: boolean

Implementation of ​

ILeaf.__hasAutoLayout

Defined in ​

leafer/packages/display/src/Leaf.ts:82


__hasMask ​

• Optional __hasMask: boolean

Implementation of ​

ILeaf.__hasMask

Defined in ​

leafer/packages/display/src/Leaf.ts:83


__hasEraser ​

• Optional __hasEraser: boolean

Implementation of ​

ILeaf.__hasEraser

Defined in ​

leafer/packages/display/src/Leaf.ts:84


__hitCanvas ​

• Optional __hitCanvas: IHitCanvas

Implementation of ​

ILeaf.__hitCanvas

Defined in ​

leafer/packages/display/src/Leaf.ts:85


__captureMap ​

• Optional __captureMap: IEventListenerMap

Implementation of ​

ILeaf.__captureMap

Defined in ​

leafer/packages/display/src/Leaf.ts:96


__bubbleMap ​

• Optional __bubbleMap: IEventListenerMap

Implementation of ​

ILeaf.__bubbleMap

Defined in ​

leafer/packages/display/src/Leaf.ts:97


children ​

• Optional children: ILeaf[]

Implementation of ​

ILeaf.children

Defined in ​

leafer/packages/display/src/Leaf.ts:100


noBounds ​

• Optional noBounds: boolean

Implementation of ​

ILeaf.noBounds

Defined in ​

leafer/packages/display/src/Leaf.ts:103


destroyed ​

• destroyed: boolean

Implementation of ​

ILeaf.destroyed

Defined in ​

leafer/packages/display/src/Leaf.ts:105

Accessors ​

tag ​

• get tag(): string

Returns ​

string

Implementation of ​

ILeaf.tag

Defined in ​

leafer/packages/display/src/Leaf.ts:25

• set tag(_value): void

Parameters ​

NameType
_valuestring

Returns ​

void

Implementation of ​

ILeaf.tag

Defined in ​

leafer/packages/display/src/Leaf.ts:26


__tag ​

• get __tag(): string

Returns ​

string

Implementation of ​

ILeaf.__tag

Defined in ​

leafer/packages/display/src/Leaf.ts:28


innerName ​

• get innerName(): string

Returns ​

string

Implementation of ​

ILeaf.innerName

Defined in ​

leafer/packages/display/src/Leaf.ts:31


__DataProcessor ​

• get __DataProcessor(): typeof LeafData

Returns ​

typeof LeafData

Implementation of ​

ILeaf.__DataProcessor

Defined in ​

leafer/packages/display/src/Leaf.ts:33


__LayoutProcessor ​

• get __LayoutProcessor(): typeof LeafLayout

Returns ​

typeof LeafLayout

Implementation of ​

ILeaf.__LayoutProcessor

Defined in ​

leafer/packages/display/src/Leaf.ts:34


leaferIsCreated ​

• get leaferIsCreated(): boolean

Returns ​

boolean

Implementation of ​

ILeaf.leaferIsCreated

Defined in ​

leafer/packages/display/src/Leaf.ts:39


leaferIsReady ​

• get leaferIsReady(): boolean

Returns ​

boolean

Implementation of ​

ILeaf.leaferIsReady

Defined in ​

leafer/packages/display/src/Leaf.ts:40


isLeafer ​

• get isLeafer(): boolean

Returns ​

boolean

Implementation of ​

ILeaf.isLeafer

Defined in ​

leafer/packages/display/src/Leaf.ts:42


isBranch ​

• get isBranch(): boolean

Returns ​

boolean

Implementation of ​

ILeaf.isBranch

Defined in ​

leafer/packages/display/src/Leaf.ts:43


isBranchLeaf ​

• get isBranchLeaf(): boolean

Returns ​

boolean

Implementation of ​

ILeaf.isBranchLeaf

Defined in ​

leafer/packages/display/src/Leaf.ts:44


__localMatrix ​

• get __localMatrix(): IMatrixData

Returns ​

IMatrixData

Implementation of ​

ILeaf.__localMatrix

Defined in ​

leafer/packages/display/src/Leaf.ts:58


__localBoxBounds ​

• get __localBoxBounds(): IBoundsData

Returns ​

IBoundsData

Implementation of ​

ILeaf.__localBoxBounds

Defined in ​

leafer/packages/display/src/Leaf.ts:59


worldTransform ​

• get worldTransform(): IMatrixWithScaleData

Returns ​

IMatrixWithScaleData

Implementation of ​

ILeaf.worldTransform

Defined in ​

leafer/packages/display/src/Leaf.ts:64


localTransform ​

• get localTransform(): IMatrixData

Returns ​

IMatrixData

Implementation of ​

ILeaf.localTransform

Defined in ​

leafer/packages/display/src/Leaf.ts:65


boxBounds ​

• get boxBounds(): IBoundsData

Returns ​

IBoundsData

Implementation of ​

ILeaf.boxBounds

Defined in ​

leafer/packages/display/src/Leaf.ts:68


renderBounds ​

• get renderBounds(): IBoundsData

Returns ​

IBoundsData

Implementation of ​

ILeaf.renderBounds

Defined in ​

leafer/packages/display/src/Leaf.ts:69


worldBoxBounds ​

• get worldBoxBounds(): IBoundsData

Returns ​

IBoundsData

Implementation of ​

ILeaf.worldBoxBounds

Defined in ​

leafer/packages/display/src/Leaf.ts:70


worldStrokeBounds ​

• get worldStrokeBounds(): IBoundsData

Returns ​

IBoundsData

Implementation of ​

ILeaf.worldStrokeBounds

Defined in ​

leafer/packages/display/src/Leaf.ts:71


worldRenderBounds ​

• get worldRenderBounds(): IBoundsData

Returns ​

IBoundsData

Implementation of ​

ILeaf.worldRenderBounds

Defined in ​

leafer/packages/display/src/Leaf.ts:72


worldOpacity ​

• get worldOpacity(): number

Returns ​

number

Implementation of ​

ILeaf.worldOpacity

Defined in ​

leafer/packages/display/src/Leaf.ts:75


__worldFlipped ​

• get __worldFlipped(): boolean

Returns ​

boolean

Implementation of ​

ILeaf.__worldFlipped

Defined in ​

leafer/packages/display/src/Leaf.ts:80


__onlyHitMask ​

• get __onlyHitMask(): boolean

Returns ​

boolean

Implementation of ​

ILeaf.__onlyHitMask

Defined in ​

leafer/packages/display/src/Leaf.ts:87


__ignoreHitWorld ​

• get __ignoreHitWorld(): boolean

Returns ​

boolean

Implementation of ​

ILeaf.__ignoreHitWorld

Defined in ​

leafer/packages/display/src/Leaf.ts:88


__inLazyBounds ​

• get __inLazyBounds(): boolean

Returns ​

boolean

Implementation of ​

ILeaf.__inLazyBounds

Defined in ​

leafer/packages/display/src/Leaf.ts:89


pathInputed ​

• get pathInputed(): boolean

Returns ​

boolean

Implementation of ​

ILeaf.pathInputed

Defined in ​

leafer/packages/display/src/Leaf.ts:91


event ​

• set event(map): void

Parameters ​

NameType
mapIEventMap

Returns ​

void

Implementation of ​

ILeaf.event

Defined in ​

leafer/packages/display/src/Leaf.ts:94

Methods ​

reset ​

▸ reset(data?): void

Parameters ​

NameType
data?ILeafInputData

Returns ​

void

Implementation of ​

ILeaf.reset

Defined in ​

leafer/packages/display/src/Leaf.ts:115


resetCustom ​

▸ resetCustom(): void

Returns ​

void

Implementation of ​

ILeaf.resetCustom

Defined in ​

leafer/packages/display/src/Leaf.ts:133


waitParent ​

▸ waitParent(item, bind?): void

Parameters ​

NameType
itemIFunction
bind?IObject

Returns ​

void

Implementation of ​

ILeaf.waitParent

Defined in ​

leafer/packages/display/src/Leaf.ts:139


waitLeafer ​

▸ waitLeafer(item, bind?): void

Parameters ​

NameType
itemIFunction
bind?IObject

Returns ​

void

Implementation of ​

ILeaf.waitLeafer

Defined in ​

leafer/packages/display/src/Leaf.ts:144


nextRender ​

▸ nextRender(item, bind?, off?): void

Parameters ​

NameType
itemIFunction
bind?IObject
off?"off"

Returns ​

void

Implementation of ​

ILeaf.nextRender

Defined in ​

leafer/packages/display/src/Leaf.ts:149


removeNextRender ​

▸ removeNextRender(item): void

Parameters ​

NameType
itemIFunction

Returns ​

void

Implementation of ​

ILeaf.removeNextRender

Defined in ​

leafer/packages/display/src/Leaf.ts:153


__bindLeafer ​

▸ __bindLeafer(leafer): void

Parameters ​

NameType
leaferILeaferBase

Returns ​

void

Implementation of ​

ILeaf.__bindLeafer

Defined in ​

leafer/packages/display/src/Leaf.ts:157


set ​

▸ set(_data, _isTemp?): void

Parameters ​

NameType
_dataIObject
_isTemp?boolean

Returns ​

void

Implementation of ​

ILeaf.set

Defined in ​

leafer/packages/display/src/Leaf.ts:183


get ​

▸ get(_name?): IValue | ILeafInputData

Parameters ​

NameType
_name?string

Returns ​

IValue | ILeafInputData

Implementation of ​

ILeaf.get

Defined in ​

leafer/packages/display/src/Leaf.ts:184


setAttr ​

▸ setAttr(name, value): void

Parameters ​

NameType
namestring
valueany

Returns ​

void

Implementation of ​

ILeaf.setAttr

Defined in ​

leafer/packages/display/src/Leaf.ts:186


getAttr ​

▸ getAttr(name): any

Parameters ​

NameType
namestring

Returns ​

any

Implementation of ​

ILeaf.getAttr

Defined in ​

leafer/packages/display/src/Leaf.ts:187


getComputedAttr ​

▸ getComputedAttr(name): any

Parameters ​

NameType
namestring

Returns ​

any

Implementation of ​

ILeaf.getComputedAttr

Defined in ​

leafer/packages/display/src/Leaf.ts:189


toJSON ​

▸ toJSON(options?): IObject

Parameters ​

NameType
options?IJSONOptions

Returns ​

IObject

Implementation of ​

ILeaf.toJSON

Defined in ​

leafer/packages/display/src/Leaf.ts:191


toString ​

▸ toString(options?): string

Parameters ​

NameType
options?IJSONOptions

Returns ​

string

Implementation of ​

ILeaf.toString

Defined in ​

leafer/packages/display/src/Leaf.ts:196


toSVG ​

▸ toSVG(): string

Returns ​

string

Implementation of ​

ILeaf.toSVG

Defined in ​

leafer/packages/display/src/Leaf.ts:200


__SVG ​

▸ __SVG(_data): void

Parameters ​

NameType
_dataIObject

Returns ​

void

Implementation of ​

ILeaf.__SVG

Defined in ​

leafer/packages/display/src/Leaf.ts:202


toHTML ​

▸ toHTML(): string

Returns ​

string

Implementation of ​

ILeaf.toHTML

Defined in ​

leafer/packages/display/src/Leaf.ts:204


__setAttr ​

▸ __setAttr(_attrName, _newValue): boolean

Parameters ​

NameType
_attrNamestring
_newValueIValue

Returns ​

boolean

Implementation of ​

ILeaf.__setAttr

Defined in ​

leafer/packages/display/src/Leaf.ts:208


__getAttr ​

▸ __getAttr(_attrName): IValue

Parameters ​

NameType
_attrNamestring

Returns ​

IValue

Implementation of ​

ILeaf.__getAttr

Defined in ​

leafer/packages/display/src/Leaf.ts:210


setProxyAttr ​

▸ setProxyAttr(_attrName, _newValue): void

Parameters ​

NameType
_attrNamestring
_newValueIValue

Returns ​

void

Implementation of ​

ILeaf.setProxyAttr

Defined in ​

leafer/packages/display/src/Leaf.ts:212


getProxyAttr ​

▸ getProxyAttr(_attrName): IValue

Parameters ​

NameType
_attrNamestring

Returns ​

IValue

Implementation of ​

ILeaf.getProxyAttr

Defined in ​

leafer/packages/display/src/Leaf.ts:214


find ​

▸ find(_condition, _options?): ILeaf[]

Parameters ​

NameType
_conditionstring | number | IFindMethod
_options?any

Returns ​

ILeaf[]

Implementation of ​

ILeaf.find

Defined in ​

leafer/packages/display/src/Leaf.ts:221


findTag ​

▸ findTag(_tag): ILeaf[]

Parameters ​

NameType
_tagstring | string[]

Returns ​

ILeaf[]

Implementation of ​

ILeaf.findTag

Defined in ​

leafer/packages/display/src/Leaf.ts:223


findOne ​

▸ findOne(_condition, _options?): ILeaf

Parameters ​

NameType
_conditionstring | number | IFindMethod
_options?any

Returns ​

ILeaf

Implementation of ​

ILeaf.findOne

Defined in ​

leafer/packages/display/src/Leaf.ts:225


findId ​

▸ findId(_id): ILeaf

Parameters ​

NameType
_idstring | number

Returns ​

ILeaf

Implementation of ​

ILeaf.findId

Defined in ​

leafer/packages/display/src/Leaf.ts:227


focus ​

▸ focus(_value?): void

Parameters ​

NameType
_value?boolean

Returns ​

void

Implementation of ​

ILeaf.focus

Defined in ​

leafer/packages/display/src/Leaf.ts:234


updateState ​

▸ updateState(): void

Returns ​

void

Implementation of ​

ILeaf.updateState

Defined in ​

leafer/packages/display/src/Leaf.ts:236


updateLayout ​

▸ updateLayout(): void

Returns ​

void

Implementation of ​

ILeaf.updateLayout

Defined in ​

leafer/packages/display/src/Leaf.ts:241


forceUpdate ​

▸ forceUpdate(attrName?): void

Parameters ​

NameType
attrName?string

Returns ​

void

Implementation of ​

ILeaf.forceUpdate

Defined in ​

leafer/packages/display/src/Leaf.ts:245


forceRender ​

▸ forceRender(_bounds?): void

Parameters ​

NameType
_bounds?IBoundsData

Returns ​

void

Implementation of ​

ILeaf.forceRender

Defined in ​

leafer/packages/display/src/Leaf.ts:253


__updateWorldMatrix ​

▸ __updateWorldMatrix(): void

Returns ​

void

Implementation of ​

ILeaf.__updateWorldMatrix

Defined in ​

leafer/packages/display/src/Leaf.ts:259


__updateLocalMatrix ​

▸ __updateLocalMatrix(): void

Returns ​

void

Implementation of ​

ILeaf.__updateLocalMatrix

Defined in ​

leafer/packages/display/src/Leaf.ts:261


__updateWorldBounds ​

▸ __updateWorldBounds(): void

Returns ​

void

Implementation of ​

ILeaf.__updateWorldBounds

Defined in ​

leafer/packages/display/src/Leaf.ts:267


__updateLocalBounds ​

▸ __updateLocalBounds(): void

Returns ​

void

Implementation of ​

ILeaf.__updateLocalBounds

Defined in ​

leafer/packages/display/src/Leaf.ts:269


__updateLocalBoxBounds ​

▸ __updateLocalBoxBounds(): void

Returns ​

void

Implementation of ​

ILeaf.__updateLocalBoxBounds

Defined in ​

leafer/packages/display/src/Leaf.ts:272


__updateLocalStrokeBounds ​

▸ __updateLocalStrokeBounds(): void

Returns ​

void

Implementation of ​

ILeaf.__updateLocalStrokeBounds

Defined in ​

leafer/packages/display/src/Leaf.ts:274


__updateLocalRenderBounds ​

▸ __updateLocalRenderBounds(): void

Returns ​

void

Implementation of ​

ILeaf.__updateLocalRenderBounds

Defined in ​

leafer/packages/display/src/Leaf.ts:276


__updateBoxBounds ​

▸ __updateBoxBounds(): void

Returns ​

void

Implementation of ​

ILeaf.__updateBoxBounds

Defined in ​

leafer/packages/display/src/Leaf.ts:280


__updateContentBounds ​

▸ __updateContentBounds(): void

Returns ​

void

Implementation of ​

ILeaf.__updateContentBounds

Defined in ​

leafer/packages/display/src/Leaf.ts:282


__updateStrokeBounds ​

▸ __updateStrokeBounds(): void

Returns ​

void

Implementation of ​

ILeaf.__updateStrokeBounds

Defined in ​

leafer/packages/display/src/Leaf.ts:284


__updateRenderBounds ​

▸ __updateRenderBounds(): void

Returns ​

void

Implementation of ​

ILeaf.__updateRenderBounds

Defined in ​

leafer/packages/display/src/Leaf.ts:286


__updateAutoLayout ​

▸ __updateAutoLayout(): void

Returns ​

void

Implementation of ​

ILeaf.__updateAutoLayout

Defined in ​

leafer/packages/display/src/Leaf.ts:289


__updateFlowLayout ​

▸ __updateFlowLayout(): void

Returns ​

void

Implementation of ​

ILeaf.__updateFlowLayout

Defined in ​

leafer/packages/display/src/Leaf.ts:291


__updateNaturalSize ​

▸ __updateNaturalSize(): void

Returns ​

void

Implementation of ​

ILeaf.__updateNaturalSize

Defined in ​

leafer/packages/display/src/Leaf.ts:293


__updateStrokeSpread ​

▸ __updateStrokeSpread(): number

Returns ​

number

Implementation of ​

ILeaf.__updateStrokeSpread

Defined in ​

leafer/packages/display/src/Leaf.ts:296


__updateRenderSpread ​

▸ __updateRenderSpread(): number

Returns ​

number

Implementation of ​

ILeaf.__updateRenderSpread

Defined in ​

leafer/packages/display/src/Leaf.ts:298


__onUpdateSize ​

▸ __onUpdateSize(): void

Returns ​

void

Implementation of ​

ILeaf.__onUpdateSize

Defined in ​

leafer/packages/display/src/Leaf.ts:300


__updateEraser ​

▸ __updateEraser(value?): void

Parameters ​

NameType
value?boolean

Returns ​

void

Implementation of ​

ILeaf.__updateEraser

Defined in ​

leafer/packages/display/src/Leaf.ts:305


__renderEraser ​

▸ __renderEraser(canvas, options): void

Parameters ​

NameType
canvasILeaferCanvas
optionsIRenderOptions

Returns ​

void

Implementation of ​

ILeaf.__renderEraser

Defined in ​

leafer/packages/display/src/Leaf.ts:309


__updateMask ​

▸ __updateMask(value?): void

Parameters ​

NameType
value?boolean

Returns ​

void

Implementation of ​

ILeaf.__updateMask

Defined in ​

leafer/packages/display/src/Leaf.ts:317


__renderMask ​

▸ __renderMask(_canvas, _options): void

Parameters ​

NameType
_canvasILeaferCanvas
_optionsIRenderOptions

Returns ​

void

Implementation of ​

ILeaf.__renderMask

Defined in ​

leafer/packages/display/src/Leaf.ts:323


__getNowWorld ​

▸ __getNowWorld(options): IMatrixWithBoundsScaleData

Parameters ​

NameType
optionsIRenderOptions

Returns ​

IMatrixWithBoundsScaleData

Implementation of ​

ILeaf.__getNowWorld

Defined in ​

leafer/packages/display/src/Leaf.ts:331


getTransform ​

▸ getTransform(relative?): IMatrixData

Parameters ​

NameType
relative?ILeaf | ILocationType

Returns ​

IMatrixData

Implementation of ​

ILeaf.getTransform

Defined in ​

leafer/packages/display/src/Leaf.ts:343


getBounds ​

▸ getBounds(type?, relative?): IBoundsData

Parameters ​

NameType
type?IBoundsType
relative?ILeaf | ILocationType

Returns ​

IBoundsData

Implementation of ​

ILeaf.getBounds

Defined in ​

leafer/packages/display/src/Leaf.ts:348


getLayoutBounds ​

▸ getLayoutBounds(type?, relative?, unscale?): ILayoutBoundsData

Parameters ​

NameType
type?IBoundsType
relative?ILeaf | ILocationType
unscale?boolean

Returns ​

ILayoutBoundsData

Implementation of ​

ILeaf.getLayoutBounds

Defined in ​

leafer/packages/display/src/Leaf.ts:352


getLayoutPoints ​

▸ getLayoutPoints(type?, relative?): IPointData[]

Parameters ​

NameType
type?IBoundsType
relative?ILeaf | ILocationType

Returns ​

IPointData[]

Implementation of ​

ILeaf.getLayoutPoints

Defined in ​

leafer/packages/display/src/Leaf.ts:356


getWorldBounds ​

▸ getWorldBounds(inner, relative?, change?): IBoundsData

Parameters ​

NameType
innerIBoundsData
relative?ILeaf
change?boolean

Returns ​

IBoundsData

Implementation of ​

ILeaf.getWorldBounds

Defined in ​

leafer/packages/display/src/Leaf.ts:361


worldToLocal ​

▸ worldToLocal(world, to?, distance?, relative?): void

Parameters ​

NameType
worldIPointData
to?IPointData
distance?boolean
relative?ILeaf

Returns ​

void

Implementation of ​

ILeaf.worldToLocal

Defined in ​

leafer/packages/display/src/Leaf.ts:369


localToWorld ​

▸ localToWorld(local, to?, distance?, relative?): void

Parameters ​

NameType
localIPointData
to?IPointData
distance?boolean
relative?ILeaf

Returns ​

void

Implementation of ​

ILeaf.localToWorld

Defined in ​

leafer/packages/display/src/Leaf.ts:377


worldToInner ​

▸ worldToInner(world, to?, distance?, relative?): void

Parameters ​

NameType
worldIPointData
to?IPointData
distance?boolean
relative?ILeaf

Returns ​

void

Implementation of ​

ILeaf.worldToInner

Defined in ​

leafer/packages/display/src/Leaf.ts:385


innerToWorld ​

▸ innerToWorld(inner, to?, distance?, relative?): void

Parameters ​

NameType
innerIPointData
to?IPointData
distance?boolean
relative?ILeaf

Returns ​

void

Implementation of ​

ILeaf.innerToWorld

Defined in ​

leafer/packages/display/src/Leaf.ts:393


getBoxPoint ​

▸ getBoxPoint(world, relative?, distance?, change?): IPointData

Parameters ​

NameType
worldIPointData
relative?ILeaf
distance?boolean
change?boolean

Returns ​

IPointData

Implementation of ​

ILeaf.getBoxPoint

Defined in ​

leafer/packages/display/src/Leaf.ts:400


getBoxPointByInner ​

▸ getBoxPointByInner(inner, _relative?, _distance?, change?): IPointData

Parameters ​

NameType
innerIPointData
_relative?ILeaf
_distance?boolean
change?boolean

Returns ​

IPointData

Implementation of ​

ILeaf.getBoxPointByInner

Defined in ​

leafer/packages/display/src/Leaf.ts:404


getInnerPoint ​

▸ getInnerPoint(world, relative?, distance?, change?): IPointData

Parameters ​

NameType
worldIPointData
relative?ILeaf
distance?boolean
change?boolean

Returns ​

IPointData

Implementation of ​

ILeaf.getInnerPoint

Defined in ​

leafer/packages/display/src/Leaf.ts:410


getInnerPointByBox ​

▸ getInnerPointByBox(box, _relative?, _distance?, change?): IPointData

Parameters ​

NameType
boxIPointData
_relative?ILeaf
_distance?boolean
change?boolean

Returns ​

IPointData

Implementation of ​

ILeaf.getInnerPointByBox

Defined in ​

leafer/packages/display/src/Leaf.ts:416


getInnerPointByLocal ​

▸ getInnerPointByLocal(local, _relative?, distance?, change?): IPointData

Parameters ​

NameType
localIPointData
_relative?ILeaf
distance?boolean
change?boolean

Returns ​

IPointData

Implementation of ​

ILeaf.getInnerPointByLocal

Defined in ​

leafer/packages/display/src/Leaf.ts:422


getLocalPoint ​

▸ getLocalPoint(world, relative?, distance?, change?): IPointData

Parameters ​

NameType
worldIPointData
relative?ILeaf
distance?boolean
change?boolean

Returns ​

IPointData

Implementation of ​

ILeaf.getLocalPoint

Defined in ​

leafer/packages/display/src/Leaf.ts:426


getLocalPointByInner ​

▸ getLocalPointByInner(inner, _relative?, distance?, change?): IPointData

Parameters ​

NameType
innerIPointData
_relative?ILeaf
distance?boolean
change?boolean

Returns ​

IPointData

Implementation of ​

ILeaf.getLocalPointByInner

Defined in ​

leafer/packages/display/src/Leaf.ts:432


getPagePoint ​

▸ getPagePoint(world, relative?, distance?, change?): IPointData

Parameters ​

NameType
worldIPointData
relative?ILeaf
distance?boolean
change?boolean

Returns ​

IPointData

Implementation of ​

ILeaf.getPagePoint

Defined in ​

leafer/packages/display/src/Leaf.ts:436


getWorldPoint ​

▸ getWorldPoint(inner, relative?, distance?, change?): IPointData

Parameters ​

NameType
innerIPointData
relative?ILeaf
distance?boolean
change?boolean

Returns ​

IPointData

Implementation of ​

ILeaf.getWorldPoint

Defined in ​

leafer/packages/display/src/Leaf.ts:441


getWorldPointByBox ​

▸ getWorldPointByBox(box, relative?, distance?, change?): IPointData

Parameters ​

NameType
boxIPointData
relative?ILeaf
distance?boolean
change?boolean

Returns ​

IPointData

Implementation of ​

ILeaf.getWorldPointByBox

Defined in ​

leafer/packages/display/src/Leaf.ts:447


getWorldPointByLocal ​

▸ getWorldPointByLocal(local, relative?, distance?, change?): IPointData

Parameters ​

NameType
localIPointData
relative?ILeaf
distance?boolean
change?boolean

Returns ​

IPointData

Implementation of ​

ILeaf.getWorldPointByLocal

Defined in ​

leafer/packages/display/src/Leaf.ts:451


getWorldPointByPage ​

▸ getWorldPointByPage(page, relative?, distance?, change?): IPointData

Parameters ​

NameType
pageIPointData
relative?ILeaf
distance?boolean
change?boolean

Returns ​

IPointData

Implementation of ​

ILeaf.getWorldPointByPage

Defined in ​

leafer/packages/display/src/Leaf.ts:457


setTransform ​

▸ setTransform(matrix, resize?): void

Parameters ​

NameType
matrixIMatrixData
resize?boolean

Returns ​

void

Implementation of ​

ILeaf.setTransform

Defined in ​

leafer/packages/display/src/Leaf.ts:465


transform ​

▸ transform(matrix, resize?): void

Parameters ​

NameType
matrixIMatrixData
resize?boolean

Returns ​

void

Implementation of ​

ILeaf.transform

Defined in ​

leafer/packages/display/src/Leaf.ts:469


move ​

▸ move(x, y?): void

Parameters ​

NameType
xnumber | IPointData
y?number

Returns ​

void

Implementation of ​

ILeaf.move

Defined in ​

leafer/packages/display/src/Leaf.ts:473


moveInner ​

▸ moveInner(x, y?): void

Parameters ​

NameType
xnumber | IPointData
y?number

Returns ​

void

Implementation of ​

ILeaf.moveInner

Defined in ​

leafer/packages/display/src/Leaf.ts:478


scaleOf ​

▸ scaleOf(origin, scaleX, scaleY?, resize?): void

Parameters ​

NameType
originIPointData | IDirection
scaleXnumber
scaleY?number
resize?boolean

Returns ​

void

Implementation of ​

ILeaf.scaleOf

Defined in ​

leafer/packages/display/src/Leaf.ts:482


rotateOf ​

▸ rotateOf(origin, rotation): void

Parameters ​

NameType
originIPointData | IDirection
rotationnumber

Returns ​

void

Implementation of ​

ILeaf.rotateOf

Defined in ​

leafer/packages/display/src/Leaf.ts:486


skewOf ​

▸ skewOf(origin, skewX, skewY?, resize?): void

Parameters ​

NameType
originIPointData | IDirection
skewXnumber
skewY?number
resize?boolean

Returns ​

void

Implementation of ​

ILeaf.skewOf

Defined in ​

leafer/packages/display/src/Leaf.ts:490


transformWorld ​

▸ transformWorld(worldTransform?, resize?): void

Parameters ​

NameType
worldTransform?IMatrixData
resize?boolean

Returns ​

void

Implementation of ​

ILeaf.transformWorld

Defined in ​

leafer/packages/display/src/Leaf.ts:495


moveWorld ​

▸ moveWorld(x, y?): void

Parameters ​

NameType
xnumber | IPointData
y?number

Returns ​

void

Implementation of ​

ILeaf.moveWorld

Defined in ​

leafer/packages/display/src/Leaf.ts:499


scaleOfWorld ​

▸ scaleOfWorld(worldOrigin, scaleX, scaleY?, resize?): void

Parameters ​

NameType
worldOriginIPointData
scaleXnumber
scaleY?number
resize?boolean

Returns ​

void

Implementation of ​

ILeaf.scaleOfWorld

Defined in ​

leafer/packages/display/src/Leaf.ts:503


rotateOfWorld ​

▸ rotateOfWorld(worldOrigin, rotation): void

Parameters ​

NameType
worldOriginIPointData
rotationnumber

Returns ​

void

Implementation of ​

ILeaf.rotateOfWorld

Defined in ​

leafer/packages/display/src/Leaf.ts:507


skewOfWorld ​

▸ skewOfWorld(worldOrigin, skewX, skewY?, resize?): void

Parameters ​

NameType
worldOriginIPointData
skewXnumber
skewY?number
resize?boolean

Returns ​

void

Implementation of ​

ILeaf.skewOfWorld

Defined in ​

leafer/packages/display/src/Leaf.ts:511


flip ​

▸ flip(axis): void

Parameters ​

NameType
axisIAxis

Returns ​

void

Implementation of ​

ILeaf.flip

Defined in ​

leafer/packages/display/src/Leaf.ts:515


scaleResize ​

▸ scaleResize(scaleX, scaleY?, _noResize?): void

Parameters ​

NameTypeDefault value
scaleXnumberundefined
scaleYnumberscaleX
_noResize?booleanundefined

Returns ​

void

Implementation of ​

ILeaf.scaleResize

Defined in ​

leafer/packages/display/src/Leaf.ts:522


__scaleResize ​

▸ __scaleResize(_scaleX, _scaleY): void

Parameters ​

NameType
_scaleXnumber
_scaleYnumber

Returns ​

void

Implementation of ​

ILeaf.__scaleResize

Defined in ​

leafer/packages/display/src/Leaf.ts:527


resizeWidth ​

▸ resizeWidth(_width): void

Parameters ​

NameType
_widthnumber

Returns ​

void

Implementation of ​

ILeaf.resizeWidth

Defined in ​

leafer/packages/display/src/Leaf.ts:530


resizeHeight ​

▸ resizeHeight(_height): void

Parameters ​

NameType
_heightnumber

Returns ​

void

Implementation of ​

ILeaf.resizeHeight

Defined in ​

leafer/packages/display/src/Leaf.ts:532


__hitWorld ​

▸ __hitWorld(_point): boolean

Parameters ​

NameType
_pointIRadiusPointData

Returns ​

boolean

Implementation of ​

ILeaf.__hitWorld

Defined in ​

leafer/packages/display/src/Leaf.ts:537


__hit ​

▸ __hit(_local): boolean

Parameters ​

NameType
_localIRadiusPointData

Returns ​

boolean

Implementation of ​

ILeaf.__hit

Defined in ​

leafer/packages/display/src/Leaf.ts:539


__hitFill ​

▸ __hitFill(_inner): boolean

Parameters ​

NameType
_innerIRadiusPointData

Returns ​

boolean

Implementation of ​

ILeaf.__hitFill

Defined in ​

leafer/packages/display/src/Leaf.ts:541


__hitStroke ​

▸ __hitStroke(_inner, _strokeWidth): boolean

Parameters ​

NameType
_innerIRadiusPointData
_strokeWidthnumber

Returns ​

boolean

Implementation of ​

ILeaf.__hitStroke

Defined in ​

leafer/packages/display/src/Leaf.ts:543


__hitPixel ​

▸ __hitPixel(_inner): boolean

Parameters ​

NameType
_innerIRadiusPointData

Returns ​

boolean

Implementation of ​

ILeaf.__hitPixel

Defined in ​

leafer/packages/display/src/Leaf.ts:545


__drawHitPath ​

▸ __drawHitPath(_canvas): void

Parameters ​

NameType
_canvasILeaferCanvas

Returns ​

void

Implementation of ​

ILeaf.__drawHitPath

Defined in ​

leafer/packages/display/src/Leaf.ts:547


__updateHitCanvas ​

▸ __updateHitCanvas(): void

Returns ​

void

Implementation of ​

ILeaf.__updateHitCanvas

Defined in ​

leafer/packages/display/src/Leaf.ts:549


__render ​

▸ __render(_canvas, _options): void

Parameters ​

NameType
_canvasILeaferCanvas
_optionsIRenderOptions

Returns ​

void

Implementation of ​

ILeaf.__render

Defined in ​

leafer/packages/display/src/Leaf.ts:556


__drawFast ​

▸ __drawFast(_canvas, _options): void

Parameters ​

NameType
_canvasILeaferCanvas
_optionsIRenderOptions

Returns ​

void

Implementation of ​

ILeaf.__drawFast

Defined in ​

leafer/packages/display/src/Leaf.ts:558


__draw ​

▸ __draw(_canvas, _options): void

Parameters ​

NameType
_canvasILeaferCanvas
_optionsIRenderOptions

Returns ​

void

Implementation of ​

ILeaf.__draw

Defined in ​

leafer/packages/display/src/Leaf.ts:560


__clip ​

▸ __clip(_canvas, _options): void

Parameters ​

NameType
_canvasILeaferCanvas
_optionsIRenderOptions

Returns ​

void

Implementation of ​

ILeaf.__clip

Defined in ​

leafer/packages/display/src/Leaf.ts:563


__renderShape ​

▸ __renderShape(_canvas, _options, _ignoreFill?, _ignoreStroke?): void

Parameters ​

NameType
_canvasILeaferCanvas
_optionsIRenderOptions
_ignoreFill?boolean
_ignoreStroke?boolean

Returns ​

void

Implementation of ​

ILeaf.__renderShape

Defined in ​

leafer/packages/display/src/Leaf.ts:565


__updateWorldOpacity ​

▸ __updateWorldOpacity(): void

Returns ​

void

Implementation of ​

ILeaf.__updateWorldOpacity

Defined in ​

leafer/packages/display/src/Leaf.ts:568


__updateChange ​

▸ __updateChange(): void

Returns ​

void

Implementation of ​

ILeaf.__updateChange

Defined in ​

leafer/packages/display/src/Leaf.ts:570


__drawPath ​

▸ __drawPath(_canvas): void

Parameters ​

NameType
_canvasILeaferCanvas

Returns ​

void

Implementation of ​

ILeaf.__drawPath

Defined in ​

leafer/packages/display/src/Leaf.ts:577


__drawRenderPath ​

▸ __drawRenderPath(_canvas): void

Parameters ​

NameType
_canvasILeaferCanvas

Returns ​

void

Implementation of ​

ILeaf.__drawRenderPath

Defined in ​

leafer/packages/display/src/Leaf.ts:579


__updatePath ​

▸ __updatePath(): void

Returns ​

void

Implementation of ​

ILeaf.__updatePath

Defined in ​

leafer/packages/display/src/Leaf.ts:581


__updateRenderPath ​

▸ __updateRenderPath(): void

Returns ​

void

Implementation of ​

ILeaf.__updateRenderPath

Defined in ​

leafer/packages/display/src/Leaf.ts:583


getMotionPathData ​

▸ getMotionPathData(): IMotionPathData

Returns ​

IMotionPathData

Implementation of ​

ILeaf.getMotionPathData

Defined in ​

leafer/packages/display/src/Leaf.ts:590


getMotionPoint ​

▸ getMotionPoint(_motionDistance): IRotationPointData

Parameters ​

NameType
_motionDistancenumber | IUnitData

Returns ​

IRotationPointData

Implementation of ​

ILeaf.getMotionPoint

Defined in ​

leafer/packages/display/src/Leaf.ts:594


getMotionTotal ​

▸ getMotionTotal(): number

Returns ​

number

Implementation of ​

ILeaf.getMotionTotal

Defined in ​

leafer/packages/display/src/Leaf.ts:598


__updateMotionPath ​

▸ __updateMotionPath(): void

Returns ​

void

Implementation of ​

ILeaf.__updateMotionPath

Defined in ​

leafer/packages/display/src/Leaf.ts:602


__runAnimation ​

▸ __runAnimation(_type, _complete?): void

Parameters ​

NameType
_type"in" | "out"
_complete?IFunction

Returns ​

void

Implementation of ​

ILeaf.__runAnimation

Defined in ​

leafer/packages/display/src/Leaf.ts:608


__updateSortChildren ​

▸ __updateSortChildren(): void

Returns ​

void

Implementation of ​

ILeaf.__updateSortChildren

Defined in ​

leafer/packages/display/src/Leaf.ts:613


add ​

▸ add(_child, _index?): void

Parameters ​

NameType
_childILeaf | ILeafInputData
_index?number

Returns ​

void

Implementation of ​

ILeaf.add

Defined in ​

leafer/packages/display/src/Leaf.ts:615


remove ​

▸ remove(_child?, destroy?): void

Parameters ​

NameType
_child?string | number | ILeaf | IFindMethod
destroy?boolean

Returns ​

void

Implementation of ​

ILeaf.remove

Defined in ​

leafer/packages/display/src/Leaf.ts:617


dropTo ​

▸ dropTo(parent, index?, resize?): void

Parameters ​

NameType
parentILeaf
index?number
resize?boolean

Returns ​

void

Implementation of ​

ILeaf.dropTo

Defined in ​

leafer/packages/display/src/Leaf.ts:621


on ​

▸ on(_type, _listener?, _options?): void

Parameters ​

NameType
_typestring | string[] | IEventMap
_listener?IFunction
_options?IEventOption

Returns ​

void

Implementation of ​

ILeaf.on

Defined in ​

leafer/packages/display/src/Leaf.ts:630


off ​

▸ off(_type?, _listener?, _options?): void

Parameters ​

NameType
_type?string | string[]
_listener?IFunction
_options?IEventOption

Returns ​

void

Implementation of ​

ILeaf.off

Defined in ​

leafer/packages/display/src/Leaf.ts:632


on_ ​

▸ on_(_type, _listener, _bind?, _options?): IEventListenerId

Parameters ​

NameType
_typestring | string[]
_listenerIFunction
_bind?IObject
_options?IEventOption

Returns ​

IEventListenerId

Implementation of ​

ILeaf.on_

Defined in ​

leafer/packages/display/src/Leaf.ts:634


off_ ​

▸ off_(_id): void

Parameters ​

NameType
_idIEventListenerId | IEventListenerId[]

Returns ​

void

Implementation of ​

ILeaf.off_

Defined in ​

leafer/packages/display/src/Leaf.ts:636


once ​

▸ once(_type, _listener, _capture?): void

Parameters ​

NameType
_typestring | string[]
_listenerIFunction
_capture?boolean

Returns ​

void

Implementation of ​

ILeaf.once

Defined in ​

leafer/packages/display/src/Leaf.ts:638


emit ​

▸ emit(_type, _event?, _capture?): void

Parameters ​

NameType
_typestring
_event?IObject | IEvent
_capture?boolean

Returns ​

void

Implementation of ​

ILeaf.emit

Defined in ​

leafer/packages/display/src/Leaf.ts:640


emitEvent ​

▸ emitEvent(_event?, _capture?): void

Parameters ​

NameType
_event?IEvent
_capture?boolean

Returns ​

void

Implementation of ​

ILeaf.emitEvent

Defined in ​

leafer/packages/display/src/Leaf.ts:642


hasEvent ​

▸ hasEvent(_type, _capture?): boolean

Parameters ​

NameType
_typestring
_capture?boolean

Returns ​

boolean

Implementation of ​

ILeaf.hasEvent

Defined in ​

leafer/packages/display/src/Leaf.ts:644


changeAttr ​

▸ changeAttr(attrName, defaultValue, fn?): void

Parameters ​

NameType
attrNamestring
defaultValueIValue
fn?IAttrDecorator

Returns ​

void

Defined in ​

leafer/packages/display/src/Leaf.ts:648


addAttr ​

▸ addAttr(attrName, defaultValue, fn?): void

Parameters ​

NameType
attrNamestring
defaultValueIValue
fn?IAttrDecorator

Returns ​

void

Defined in ​

leafer/packages/display/src/Leaf.ts:652


__emitLifeEvent ​

▸ __emitLifeEvent(type): void

Parameters ​

NameType
typestring

Returns ​

void

Implementation of ​

ILeaf.__emitLifeEvent

Defined in ​

leafer/packages/display/src/Leaf.ts:658


destroy ​

▸ destroy(): void

Returns ​

void

Implementation of ​

ILeaf.destroy

Defined in ​

leafer/packages/display/src/Leaf.ts:663

Released under the MIT License.