Home > @jsplumbtoolkit/layout-spring > SpringLayout
SpringLayout class
Warning: This API is now obsolete.
As of 5.7.0 the
ForceDirectedlayout is now available, which is a rewrite of this layout with several placement improvements and a shorter run time.
A layout that treats edges as springs, and places each vertex in proximity to other vertices to which it is connected.
Signature:
export declare class SpringLayout extends AbsoluteBackedLayout<SpringLayoutParameters>
Extends: AbsoluteBackedLayout<SpringLayoutParameters>
Constructors
| Constructor | Modifiers | Description |
|---|---|---|
| (constructor)(params) | Constructs a new instance of the SpringLayout class |
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| _cache | Array<ElementRecord> | ||
| _elements | Record<string, ElementRecord> | ||
| _moveCount | number | ||
| currentParameters | SpringLayoutParameters | ||
| defaultMagnetized | boolean | ||
| maxx | number | ||
| maxy | number | ||
| minx | number | ||
| miny | number | ||
| type | string | ||
| type | static | string | |
| xScale | number | ||
| yScale | number |