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 |
|---|
| 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 |