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
markRotationhow each child is oriented as it’s placed around the circle: "outward" (faces away from center), "inward" (faces toward center), "tangentialClockwise" / "tangentialCounterClockwise" (faces along the tangent, in that direction of travel), or "upright" (orientation never changes, regardless of position)String“inward”
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