DEMOS
DOCS
FEATURES
DOWNLOAD
PURCHASE
CONTACT
BLOG
Show:

jsPlumbToolkit.Layouts.Spring Class

Extends jsPlumbToolkit.Layouts.AbstractLayout

Provides a force directed graph layout in which connections between nodes are modelled as springs. By default, this Layout switches on the magnetizer, to ensure that no nodes overlap. You can switch it off via the magnetize:false argument in the layout parameters of a render call.

Constructor

jsPlumbToolkit.Layouts.Spring

(
  • params
)

Parameters:

  • params Object

    Constructor parameters

    • [absoluteBacked=true] Boolean optional

      Whether or not the layout will fall back to absolute positions stored in the data.

    • [stiffness=200] Number optional

      A measure of how stiff the springs are modelled to be.

    • [repulsion=200] Number optional

      A measure of how much each Node repels every other Node.

    • [damping=0.5] Number optional

      A measure of how quickly the system settles. This parameter should always be set to a value less than 1. A higher value for this parameter will cause the layout to take longer to run.

    • [limit=1000] Number optional

      The threshold below which the system is assumed to be stable enough for the layout to exit. This value is related to the values you provide for stiffness and repulsion (and damping, of course, but to a lesser extent).

Item Index