TidyTreeLayout
extends Layout
The TidyTreeLayout class represents a layout that positions objects using the tidy tree algorithm within a bounding box of width × height, offset by left and top. To create a TidyTreeLayout object and apply it to a collection, use the layout function:
let tl = msc.layout("tidytree", {orientation: "vertical"});
collection.layout = tl;
Properties#
| property | explanation | type | default value |
|---|
| height | the height of the layout area | Number | 500 |
| left | the x offset of the layout area | Number | 100 |
| orientation | the orientation of the tree | String | “horizontal” |
refElements  | the reference elements used by this layout | Array | [] |
| top | the y offset of the layout area | Number | 100 |
| type | the type of the layout | String | “tidytree” |
| width | the width of the layout area | Number | 500 |
Methods#
| method | explanation | return type |
|---|
| clone() | returns a copy of this layout | TidyTreeLayout |
Methods inherited from Layout#
| method | explanation | return type |
|---|
| addRefElement(re) | adds a reference element to this layout | void |
| clearRefElements() | removes all reference elements from this layout | void |