Edge<T>

一个 Edge 是完整的描述,包含 Svelte Flow 渲染它所需的一切信息。

export type Edge<T> =
  | DefaultEdge<T>
  | SmoothStepEdgeType<T>
  | BezierEdgeType<T>;

变体

DefaultEdge<T>

#id
string
#type
string
#style?
string
#class?
string
#label?
string
#source
string
#target
string
#sourceHandle
string | null
#targetHandle
string | null
#data
T
#hidden
boolean
#animated
boolean
#selected
boolean
#deletable
boolean
#selectable
boolean
#markerStart
string | EdgeMarker
#markerEnd
string | EdgeMarker
#zIndex?
number
#interactionWidth
number
#ariaLabel
string

SmoothStepEdgeType<T>

The SmoothStepEdgeType variant has all the same fields as the DefaultEdge variant, but it also has the following additional fields

#type
"smoothstep"
#pathOptions?
object
#pathOptions.offset?
number
#pathOptions.borderRadius?
number

BezierEdgeType<T>

The BezierEdgeType variant has all the same fields as the DefaultEdge variant, but it also has the following additional fields

#type
"default"
#pathOptions?
object
#pathOptions.curvature?
number