Skip to content

Class: Component ​

Extended by ​

Constructors ​

Constructor ​

new Component(): Component

Returns ​

Component

Properties ​

MAX_ELAPSE ​

MAX_ELAPSE: number = Infinity

Methods ​

alpha() ​

alpha(a, ta?): Component

Parameters ​

a ​

number

ta? ​

number

Returns ​

Component


append() ​

Call Signature ​

append(...child): this

Parameters ​
child ​

...Component[]

Returns ​

this

Call Signature ​

append(child): this

Parameters ​
child ​

Component[]

Returns ​

this


appendTo() ​

appendTo(parent): Component

Parameters ​

parent ​

Component

Returns ​

Component


attr() ​

Call Signature ​

attr(name, value): this

Parameters ​
name ​

string

value ​

any

Returns ​

this

Call Signature ​

attr(name): any

Parameters ​
name ​

string

Returns ​

any


clearTimeout() ​

clearTimeout(timer): void

Parameters ​

timer ​

ComponentTickListener<Component>

Returns ​

void


column() ​

column(align): Component

Parameters ​

align ​

number

Returns ​

Component


direction() ​

direction(direction, align): Component

Parameters ​

direction ​

"row" | "column"

align ​

number

Returns ​

Component


empty() ​

empty(): Component

Returns ​

Component


first() ​

first(visible?): Component

Parameters ​

visible? ​

boolean

Returns ​

Component


height() ​

Call Signature ​

height(h): this

Parameters ​
h ​

number

Returns ​

this

Call Signature ​

height(): number

Returns ​

number


hide() ​

hide(): Component

Returns ​

Component


insertAfter() ​

insertAfter(prev): Component

Parameters ​

prev ​

Component

Returns ​

Component


insertBefore() ​

insertBefore(next): Component

Parameters ​

next ​

Component

Returns ​

Component


insertNext() ​

insertNext(sibling, more?): Component

Parameters ​

sibling ​

Component

more? ​

Component

Returns ​

Component


insertPrev() ​

insertPrev(sibling, more?): Component

Parameters ​

sibling ​

Component

more? ​

Component

Returns ​

Component


label() ​

Call Signature ​

label(): string

Returns ​

string

Call Signature ​

label(label): this

Parameters ​
label ​

string

Returns ​

this


last() ​

last(visible?): Component

Parameters ​

visible? ​

boolean

Returns ​

Component


listeners() ​

listeners(type): ComponentEventListener<Component>[]

Parameters ​

type ​

string

Returns ​

ComponentEventListener<Component>[]


matrix() ​

matrix(relative?): Matrix

Parameters ​

relative? ​

boolean = false

Returns ​

Matrix


maximize() ​

maximize(): Component

Set size to match parent size.

Returns ​

Component


minimize() ​

minimize(): Component

Set size to match largest child size.

Returns ​

Component


next() ​

next(visible?): Component

Parameters ​

visible? ​

boolean

Returns ​

Component


off() ​

off(types, listener): this

Parameters ​

types ​

string

listener ​

ComponentEventListener<Component>

Returns ​

this


offset() ​

Call Signature ​

offset(value): this

Parameters ​
value ​

Vec2Value

Returns ​

this

Call Signature ​

offset(x, y): this

Parameters ​
x ​

number

y ​

number

Returns ​

this


on() ​

on(types, listener): this

Parameters ​

types ​

string

listener ​

ComponentEventListener<Component>

Returns ​

this


padding() ​

padding(pad): Component

Set cell spacing for layout.

Parameters ​

pad ​

number

Returns ​

Component


parent() ​

parent(): Component

Returns ​

Component


pin() ​

Call Signature ​

pin(key): any

Parameters ​
key ​

keyof GetPinType

Returns ​

any

Call Signature ​

pin(key, value): this

Parameters ​
key ​

keyof SetPinType

value ​

any

Returns ​

this

Call Signature ​

pin(obj): this

Parameters ​
obj ​

SetPinType

Returns ​

this

Call Signature ​

pin(): Pin

Returns ​

Pin


prepend() ​

Call Signature ​

prepend(...child): this

Parameters ​
child ​

...Component[]

Returns ​

this

Call Signature ​

prepend(child): this

Parameters ​
child ​

Component[]

Returns ​

this


prependTo() ​

prependTo(parent): Component

Parameters ​

parent ​

Component

Returns ​

Component


prev() ​

prev(visible?): Component

Parameters ​

visible? ​

boolean

Returns ​

Component


publish() ​

publish(name, args?): number

Parameters ​

name ​

string

args? ​

any[]

Returns ​

number


remove() ​

remove(child?, more?): Component

Parameters ​

child? ​

Component

more? ​

any

Returns ​

Component


renderDebug() ​

renderDebug(ctx, xf): void

Parameters ​

ctx ​

CanvasRenderingContext2D

xf ​

Matrix

Returns ​

void


rotate() ​

rotate(a): Component

Parameters ​

a ​

number

Returns ​

Component


row() ​

row(align): Component

Parameters ​

align ​

number

Returns ​

Component


scale() ​

Call Signature ​

scale(value): this

Parameters ​
value ​

Vec2Value

Returns ​

this

Call Signature ​

scale(x, y): this

Parameters ​
x ​

number

y ​

number

Returns ​

this

Call Signature ​

scale(s): this

Parameters ​
s ​

number

Returns ​

this


setTimeout() ​

setTimeout(callback, time): (t) => boolean

Parameters ​

callback ​

() => any

time ​

number

Returns ​

(t) => boolean


show() ​

show(): Component

Returns ​

Component


size() ​

size(w, h): Component

Parameters ​

w ​

number

h ​

number

Returns ​

Component


skew() ​

Call Signature ​

skew(value): this

Parameters ​
value ​

Vec2Value

Returns ​

this

Call Signature ​

skew(x, y): this

Parameters ​
x ​

number

y ​

number

Returns ​

this


spacing() ​

spacing(space): Component

Set cell spacing for row and column layout.

Parameters ​

space ​

number

Returns ​

Component


tick() ​

tick(callback, before?): void

Parameters ​

callback ​

ComponentTickListener<Component>

before? ​

boolean = false

Returns ​

void


timeout() ​

timeout(callback, time): void

Parameters ​

callback ​

() => any

time ​

number

Returns ​

void


toString() ​

toString(): string

Returns ​

string


touch() ​

touch(): Component

Returns ​

Component


tween() ​

Call Signature ​

tween(opts?): Transition

Parameters ​
opts? ​

TransitionOptions

Returns ​

Transition

Call Signature ​

tween(duration?, delay?, append?): Transition

Parameters ​
duration? ​

number

delay? ​

number

append? ​

boolean

Returns ​

Transition


untick() ​

untick(callback): void

Parameters ​

callback ​

ComponentTickListener<Component>

Returns ​

void


visible() ​

Call Signature ​

visible(visible): this

Parameters ​
visible ​

boolean

Returns ​

this

Call Signature ​

visible(): boolean

Returns ​

boolean


visit() ​

visit<P>(visitor, payload?): boolean | void

Type Parameters ​

P ​

P

Parameters ​

visitor ​

ComponentVisitor<P>

payload? ​

P

Returns ​

boolean | void


width() ​

Call Signature ​

width(w): this

Parameters ​
w ​

number

Returns ​

this

Call Signature ​

width(): number

Returns ​

number