Edge
- class Edge()
Interface for edges between nodes.
interface
- Edge.dragHandles?
type: EdgeDragHandle[]
List of EdgeDragHandle that can be used to drag the edge with.
If the list is
nulla list containing default drag handle will be created. If the list is an empty list[]no default drag handle will be created. IfisBidirectionalistrueand the list isnulla list containing two default drag handles (one for each end) will be created.
- Edge.id?
type: string|number
An optional explicit edge id.
The edge id is normally computed by the
edgeIdfunction. If this attribute is set it gets returned byedgeIdinstead of the computed id.
- Edge.isBidirectional?
type: boolean
Set this to
trueif the edge should be treated as bidirectional (seedragHandles).
- Edge.markerEnd?
type: Marker
Markers to draw at the end of this edge.
- Edge.markerStart?
type: Marker
Markers to draw at the start of this edge.
- Edge.markers?
type: Marker[]
List of markers to draw for this edge.
- Edge.pathType?
type: string
The id of the path generator used for this edge.
- Edge.source
type: string|number
The id of the source node of this edge.
- Edge.sourceHandle?
type: LinkHandle
The link handle of the source node the edge is attached to.
This attribute is set automatically by the grapheditor.
- Edge.target
type: string|number
The id of the target node of this edge.
- Edge.targetHandle?
type: LinkHandle
The link handle of the target node the edge is attached to.
This attribute is set automatically by the grapheditor.
- Edge.texts?
type: TextComponent[]
List of text components of this edge.
- Edge.type?
type: any
Edge type. Can be used for styling.
DraggedEdge
- class DraggedEdge()
Extra attributes for edges dragged bay a user.
interface
- Extends:
- DraggedEdge.createdFrom?
type: string|number
If edge was created from an existing edge this is the id of the existing edge.
- DraggedEdge.currentTarget
type: Point
The current target coordinates.
- DraggedEdge.id
type: string
Explicit id of the dragged edge.
A dragged edge may have no current target and must to specify an explicit id!
- DraggedEdge.validTargets
type: Set<string>
A set of ids of nodes that are a valid target for this edge.
EdgeDragHandle
- class EdgeDragHandle()
Special marker used as a drag handle for dragging an edge.
interface
- Extends:
- EdgeDragHandle.isReverseHandle?
type: boolean
If true dragging this drag handle will result in a flipped edge beeing dragged.
The flipped edge looks the same as the original edge but has source and target switched. All component positions and relative rotations are updated accordingly. This can be used to implement bidirectional or non-directional behaviour for edges.