Skip to main content

AddEdgeOptions

Options for the addEdge method in the VisuallyJsModel class.

Properties

anchors?

optional anchors: object

Optional anchors for the edge.

source?

optional source: SingleAnchorSpec

target?

optional target: SingleAnchorSpec


cost?

optional cost: number

Optional edge cost. Defaults to 1.


data?

optional data: ObjectData & LineStyle

Optional backing data for the edge.


directed?

optional directed: boolean

By default edges are not directed. This is used only when computing paths between vertices.


geometry?

optional geometry: any

Optional edge geometry.


source

source: string | PointXY | Vertex

Source for the edge - a vertex, vertex id, or canvas location.


target

target: string | PointXY | Vertex

Target for the edge - a vertex, vertex id, or canvas location.