Example
const list = new List({
children: [
new Graphics().rect(0, 0, 50, 50).fill(0x000000),
new Graphics().rect(0, 0, 50, 50).fill(0xFFFFFF),
],
});
list.addChild(new Graphics().rect(0, 0, 50, 50)).fill(0x000000);
Members
Set bottom padding.
Get bottom padding.
Returns all arranged elements.
Set element margin.
Get element margin.
Set horizontal padding, overriding all left and right padding options.
Get horizontal padding.
Set left padding.
Get left padding.
Set width of area to fit elements when arrange. (If not set parent width will be used).
Get width of area to fit elements when arrange. (If not set parent width will be used).
Set padding, overriding all padding options.
Get padding.
Set right padding.
Get right padding.
Set top padding.
Get top padding.
Set items arrange direction.
Get items arrange direction.
Set vertical padding, overriding all top and bottom padding options.
Get vertical padding.
Width of area to fit elements when arrange. (If not set parent width will be used).
- Default Value:
- 0
Arrange direction. Defaults to 'bidirectional' for multi-column layout when type is not specified.
- Default Value:
- "bidirectional"
Methods
Arrange all elements basing in their sizes and component options. Can be arranged vertically, horizontally or bidirectional.
Initiates list component.
Name | Type | Attributes | Description |
---|---|---|---|
options |
{ type? : ListType } & C<ListOptions> |
<optional> |
Removes items from the list. (Does not destroy them)
Name | Type | Description |
---|---|---|
itemID |
number |
Item to remove (starting from 0). |