IslandStack
import { IslandStack } from 'pixi-silk/ui/island';
A row or a column of items, centred across the axis. Sizes come from each item’s local bounds,
so items can draw around any origin. Call IslandStack.layout again after an item
changes size. An island stacks its items in one of these.
Extends#
Container
Constructors#
Constructor#
new IslandStack(items?: Container<ContainerChild>[], options?: IslandStackOptions): IslandStack;
Parameters#
| Parameter | Type | Default value |
|---|---|---|
items | Container<ContainerChild>[] | [] |
options | IslandStackOptions | {} |
Returns#
IslandStack
Overrides#
Container.constructor
Properties#
Accessors#
across#
Get Signature#
get across(): number;
Size of the widest item across the axis, local units.
Returns
number
along#
Get Signature#
get along(): number;
Length of the stack along its axis, local units.
Returns
number
Methods#
layout()#
layout(width?: number, height?: number): this;
Places the items. With a box (width by height) the stack is centred in it, otherwise it
starts at (0, 0).
Parameters#
| Parameter | Type |
|---|---|
width? | number |
height? | number |
Returns#
this