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#
| property | explanation | type | default value |
|---|
| markRotation | how 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” |
| radius | the radius of the circle | Number | 100 |
refElements  | the reference elements used by this layout | Array | [] |
| type | the type of the layout | String | “circular” |
| x | the x coordinate of the circle center | Number | 100 |
| y | the y coordinate of the circle center | Number | 100 |
Methods#
| method | explanation | return type |
|---|
| clone() | returns a copy of this layout | CircularLayout |
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 |