Skip to main content

Home > @jsplumbtoolkit/browser-ui > ViewEdgeOptions

ViewEdgeOptions interface

The mapping for the definition of an edge inside a view.

Signature:

export interface ViewEdgeOptions extends ViewOptionsCommon 

Extends: ViewOptionsCommon

Properties

PropertyModifiersTypeDescription
anchor?AnchorSpec(Optional) Spec for the anchor to use for both source and target for edges of this type.
anchors?[AnchorSpec, AnchorSpec](Optional) [source, target] anchor specs edges of this type.
connector?ConnectorSpec(Optional) Name/definition of the connector to use. If you omit this, the default connector will be used.
cssClass?string(Optional) CSS class to add to edges of the type in the UI
detachable?boolean(Optional) Whether or not edges of this type should be detachable with the mouse. Defaults to true.
endpoint?EndpointSpec(Optional) Optional spec to use for both the source and target endpoints for edges of this type.
endpointHoverStyle?EndpointStyle(Optional) Optional paint style to use for hover on both the source and target endpoints for edges of this type.
endpointHoverStyles?[EndpointStyle, EndpointStyle](Optional) Optional paint style to use for hove on the [source, target] endpoints for edges of this type.
endpoints?[EndpointSpec, EndpointSpec](Optional) Optional specs for the [source, target] endpoints for edges of this type.
endpointStyle?EndpointStyle(Optional) Optional paint style to use for both the source and target endpoints for edges of this type.
endpointStyles?[EndpointStyle, EndpointStyle](Optional) Optional paint styles to use for the [source, target] endpoints for edges of this type.
hoverPaintStyle?PaintStyle(Optional) Paint style to use for the edge when the pointer is hovering over it.
label?string(Optional) Optional label to use for the edge. If this is set, a label overlay will be created and the value of label will be used as the overlay's label. This value can be parameterised, in order to extract a value from the edge's backing data, eg. if you set label:"{{name}}" then the Toolkit would attempt to extract a property with key name from the edge's backing data, and use that property's value as the label.
labelClass?string(Optional) Optional css class to set on the label overlay created if label is set. This is a static string and does not support parameterisation like label does.
labelLocation?number(Optional) Optional location for the label. If not provided this defaults to 0.5, but the label location can be controlled via the labelLocationAttribute.
labelLocationAttribute?string(Optional) This defaults to labelLocation, and indicates the name of a property whose value can be expected to hold the location at which the label overlay should be located. The default value for this is labelLocation, but the key here is that the Toolkit looks in the edge data for labelLocation, so the location is dynamic, and can be changed by updating labelLocation. This parameter allows you to change the name of the property that the Toolkit will look for in the edge data.
overlays?Array<OverlaySpec>(Optional) Array of overlays to add to edges of this type.
paintStyle?PaintStyle(Optional) Paint style to use for the edge.
reattach?boolean(Optional) Whether or not when a user detaches a edge of this type it should be automatically reattached. Defaults to false.