Interface BrowserJsPlumbDefaults

Defaults for the BrowserUI implementation of jsPlumb.

interface BrowserJsPlumbDefaults {
    astarGridCellSize?: number;
    astarVertexBorder?: number;
    astarVertexBuffer?: number;
    discardEdgeEditsOnDrag?: boolean;
    dragOptions?: DragOptions;
    edgesAvoidVertices?: boolean;
    elementsDraggable?: boolean;
    endpoint?: EndpointSpec;
    hoverEvents?: boolean;
    managedElementsSelector?: string;
    resizeObserver?: boolean;
}

Hierarchy (view full)

Properties

astarGridCellSize?: number

Size of each cell in the grid that the AStar routine uses to calculate paths that avoid vertices. This defaults to 10 pixels and is not something you'll really need to change. If you do change it, keep in mind that a) a smaller grid size increases the runtime of the routine, and b) a large grid size will render the UI unusable.

astarVertexBorder?: number

Number of cells to pad each vertex with that act as its border: edges will be routed around the border wherever possible. Defaults to 2

astarVertexBuffer?: number

Number of cells to pad each vertex with that act as its buffer: edges will be routed around the buffer wherever possible. Defaults to 2 - but note this value is added the vertex border, whose default is 2, so the computed default is 4 grid cells.

discardEdgeEditsOnDrag?: boolean

Defaults to false, meaning that JsPlumb will alter the geometry of some edge that has path edits whenever the source or target is dragged, when necessary. This applies to the Orthogonal connector, or the Straight connector with orthogonal constraint. If you set this to true, JsPlumb will clear any path edits whenever the source or target is dragged, and use the default path computation.

dragOptions?: DragOptions

Options for dragging - containment, grid, callbacks etc.

edgesAvoidVertices?: boolean

If true, edges will avoid vertices. This only works if you are using the Straight connector; the setting will be ignored otherwise. This option is only ever set internally.

elementsDraggable?: boolean

Whether or not elements should be draggable. Default value is true.

endpoint?: EndpointSpec

Default Endpoint to use.

hoverEvents?: boolean

Defaults to false, which is a breaking change in 6.6.0. When true, jsPlumb tracks mouseover/mouseout/mouseenter/mouseexit events for overlays, endpoints, elements and connections. Most of the reasoning for having this ability was related to the initial canvas renderer, and with SVG/CSS this functionality is, for the most part, not needed. But you can switch it on if you need to.

6.6.0

managedElementsSelector?: string

Specifies the CSS selector used to identify managed elements. This option is not something that most users of jsPlumb will need to set.

resizeObserver?: boolean

Defaults to true, indicating that a ResizeObserver will be used, where available, to allow jsPlumb to revalidate elements whose size in the DOM have been changed, without the library user having to call revalidate()

Version :