Skip to main content

BrowserUIEdgeOptions

Common options for edges in the Browser UI package.

Properties

activeEdit?

optional activeEdit: boolean

Defaults to true, meaning if edges are editable then any new edge is automatically marked edited and its geometry is stored.


allowUnattached?

optional allowUnattached: boolean

Whether or not to allow edges whose source and/or target is not connected to a vertex but is anchored to some point on the canvas. If you need more fine-grained control (such as some edge types should support this and others should not), use the allowUnattached flag of an edge type. Defaults to false.

Inherited from

UIEdgeOptions.allowUnattached


anchor?

optional anchor: AnchorSpec

Default anchor to use for both source and target of edges.

Inherited from

UIEdgeOptions.anchor


anchors?

optional anchors: [AnchorSpec, AnchorSpec]

Anchors to use as source, target of edges. This will take precedence over anchor.

Inherited from

UIEdgeOptions.anchors


astarGridCellSize?

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

Inherited from

UIEdgeOptions.astarGridCellSize


astarVertexBorder?

optional 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

Inherited from

UIEdgeOptions.astarVertexBorder


astarVertexBuffer?

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

Inherited from

UIEdgeOptions.astarVertexBuffer


avoidVertices?

optional avoidVertices: boolean

If true, edges will attempt to avoid vertices.

Inherited from

UIEdgeOptions.avoidVertices


connector?

optional connector: ConnectorSpec

Default connector to use for edges. This will be used in the event that VisuallyJs does not find a connector spec for a given edge in its type definition.

Inherited from

UIEdgeOptions.connector


detachable?

optional detachable: boolean

Whether or not edges should be detachable via pointer/touch events by default. The default value for this is true. This behaviour can be overridden by individual edge type definitions.

Inherited from

UIEdgeOptions.detachable


discardEditsOnDrag?

optional discardEditsOnDrag: boolean

Defaults to false. When true, dragging either the source or target of some edge that has edits will cause those edits to be discarded. When false - the default value - Visually JS attempts to retain as many of the edits as possible while still catering for the fact that the source or target has moved.

Inherited from

UIEdgeOptions.discardEditsOnDrag


editable?

optional editable: boolean

If true, an EdgePathEditor will be registered on the Surface, with which you can interact via the startEditingPath(..) and stopEditingPath() methods on the Surface.


editOnTap?

optional editOnTap: boolean

Defaults to true, meaning that when a user taps an edge it goes into edit mode.


inputMethod?

optional inputMethod: EdgeInputMethod

Input method for edges. Defaults to drag.


layerIndex?

optional layerIndex: number

This setting is only relevant when you are using an SVG container. By default, edges are drawn in a layer that appears in the DOM after the vertex layer, meaning edges will show above vertices. If you set this to 0, you can force the edge layer to the back.


outlineColor?

optional outlineColor: string

The default color to paint a connector's outline path. Defaults to "transparent". Can be overridden on a per-edge basis via the outlineColor setting.

Inherited from

UIEdgeOptions.outlineColor


outlineWidth?

optional outlineWidth: number

Default width to paint the outline path behind edge paths. Defaults to 20 pixels. Can be overridden on a per-edge basis via the outlineWidth setting.

Inherited from

UIEdgeOptions.outlineWidth


overlays?

optional overlays: OverlaySpec[]

Default overlays to draw on each edge.

Inherited from

UIEdgeOptions.overlays


paintOutline?

optional paintOutline: boolean

Defaults to true. Paints an outline path behind the path drawn for an edge, which makes it easier for users to interact with the element on the canvas. The default width of the outline is specified by the outlineWidth setting.

Inherited from

UIEdgeOptions.paintOutline


propertyMappings?

optional propertyMappings: EdgePropertyMappings

Optional set of mappings from property values to edge definitions.


reattach?

optional reattach: boolean

Whether or not edges that have been detached from their source or target via pointer/touch events should be reattached if they are dropped into whitespace. The default value for this is false: edges dropped in whitespace are discarded. This behaviour can be overridden in individual edge type definitions.

Inherited from

UIEdgeOptions.reattach


simpleEdgeStyles?

optional simpleEdgeStyles: boolean

Defaults to true. Instructs the Surface to automatically extract color, lineWidth, outlineWidth, outlineColor, and dashArray values from the backing data for edges, and to use these to set the appearance of a connection for that edge.

Inherited from

UIEdgeOptions.simpleEdgeStyles


sourceMarker?

optional sourceMarker: OverlaySpec

Shorthand for adding an overlay at location 0, with direction set to -1.

Inherited from

UIEdgeOptions.sourceMarker


targetMarker?

optional targetMarker: OverlaySpec

Shorthand for adding an overlay at location 1

Inherited from

UIEdgeOptions.targetMarker