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

propertyexplanationtypedefault value
heightthe height of the layout areaNumber500
leftthe x offset of the layout areaNumber100
orientationthe orientation of the treeString“horizontal”
refElements the reference elements used by this layoutArray[]
topthe y offset of the layout areaNumber100
typethe type of the layoutString“tidytree”
widththe width of the layout areaNumber500

Methods

methodexplanationreturn type
clone()returns a copy of this layoutTidyTreeLayout

Methods inherited from Layout

methodexplanationreturn type
addRefElement(re)adds a reference element to this layoutvoid
clearRefElements()removes all reference elements from this layoutvoid