CircularLayout

extends Layout

The CircularLayout class represents a layout that positions objects evenly around a circle. To create a CircularLayout object and apply it to a collection, use the layout function:

let cl = msc.layout("circular", {x: 200, y: 200, radius: 150});
collection.layout = cl;

Properties

propertyexplanationtypedefault value
radiusthe radius of the circleNumber100
refElements the reference elements used by this layoutArray[]
typethe type of the layoutString“circular”
xthe x coordinate of the circle centerNumber100
ythe y coordinate of the circle centerNumber100

Methods

methodexplanationreturn type
clone()returns a copy of this layoutCircularLayout

Methods inherited from Layout

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