Edge<T>
Edge
是完整的描述,其中包含 Svelte Flow 為了渲染它所需要知道的一切。
export type Edge<T> =
| DefaultEdge<T>
| SmoothStepEdgeType<T>
| BezierEdgeType<T>;
變體
DefaultEdge<T>
名稱 | 類型 |
---|---|
# id | 字串 |
# type | 字串 |
# style? | 字串 |
# class? | 字串 |
# label? | 字串 |
# source | 字串 |
# target | 字串 |
# sourceHandle | 字串 | null |
# targetHandle | 字串 | null |
# data | T |
# hidden | 布林值 |
# animated | 布林值 |
# selected | 布林值 |
# deletable | 布林值 |
# selectable | 布林值 |
# markerStart | 字串 | EdgeMarker |
# markerEnd | 字串 | EdgeMarker |
# zIndex? | 數字 |
# interactionWidth | 數字 |
# ariaLabel | 字串 |
SmoothStepEdgeType<T>
SmoothStepEdgeType
變體與 DefaultEdge
變體具有相同的欄位,但它還具有以下附加欄位
名稱 | 類型 |
---|---|
# type | "smoothstep" |
# pathOptions? | 物件 |
# pathOptions.offset? | 數字 |
# pathOptions.borderRadius? | 數字 |
BezierEdgeType<T>
BezierEdgeType
變體擁有與 DefaultEdge
變體相同的所有欄位,但它還具有以下額外的欄位:
名稱 | 類型 |
---|---|
# type | "預設" |
# pathOptions? | 物件 |
# pathOptions.curvature? | 數字 |