Class: Container

Container()

Container

Constructor

new Container()

Creates an instance of Container.
Properties:
Name Type Description
children Array.<Item>
useTint number
Source:

Extends

Classes

Container

Members

callbackAfterRender :function

 Set/Get after render callback
   - It will be called after the Item rendered
Type:
  • function
Overrides:
Source:

callbackBeforeRender :function

 Set/Get before render callback
   - It will be called before the Item rendered
Type:
  • function
Overrides:
Source:

parent :Container

Set/Get parent
Type:
Overrides:
Source:

(readonly) stage :StageContainer

Get StageContainer
Type:
Overrides:
Source:

(static) RENDERING_TYPE

Type "container"
Source:

Methods

addChild(child)

Add Item to the container
Parameters:
Name Type Description
child Item
Source:

addChildAt(child, index)

Add Item to a specific index
Parameters:
Name Type Description
child Item
index number
Source:

callEventHandler(event)

 Handle event
   - It can handle mouse events if the item is interactive and has [
     onPointerOver,
     onPointerOut,
     onPointerMove,
     onPointerDown,
     onPointerUp,
     onPointerClick
   ] function
Parameters:
Name Type Description
event *
Overrides:
Source:

contains(child) → {boolean}

Returns true, if the container contains the Item
Parameters:
Name Type Description
child Item
Source:
Returns:
Type
boolean

destruct()

Destruct class
Overrides:
Source:

empty()

Emptying the container
Source:

getBounds() → {Rectangle}

Returns with the bounds of the container
Overrides:
Source:
Returns:
Type
Rectangle

getChildAt(index) → {Item}

Returns with a Item from a specific index
Parameters:
Name Type Description
index number
Source:
Returns:
Type
Item

getChildIndex(child) → {number}

Returns with the child element index
Parameters:
Name Type Description
child Item
Source:
Returns:
Type
number

getPremultipliedAlpha()

Get premultipliedAlpha
Source:

getPremultipliedUseTint()

Get premultipliedUseTint
Source:

remove()

Remove Item from parent
Overrides:
Source:

removeChild(child)

Removes the Item from the container
Parameters:
Name Type Description
child Item
Source:

removeChildAt(index)

Removes Item from index
Parameters:
Name Type Description
index number
Source:

setChildIndex(child, index)

Set child element index
Parameters:
Name Type Description
child Item
index number
Source:

swapChildren(childA, childB)

Swap two children
Parameters:
Name Type Description
childA Item
childB Item
Source:

update()

Update color and transform values
Overrides:
Source: