PackingLayout
extends Layout
The PackingLayout class represents a layout that positions objects by packing them in an area. To create a PackingLayout object and apply it to a collection, use the layout function:
let pl = atlas.layout("packing", {x: 100, y: 100});
collection.layout = pl;
Properties
property | explanation | type | default value |
---|---|---|---|
type | the type of the layout | String | “packing” |
group | the group that uses this layout | Group | |
x | the x coordinate of the center of the enclosing area | Number | |
y | the y coordinate of the center of the enclosing area | Number | |
width | the width of the enclosing area | Number | |
height | the height of the enclosing area | Number |
Methods inherited from Layout
method | explanation | return type |
---|---|---|
clone() | returns a copy of this layout | void |
run() | apply this layout | void |