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 |