EdgeProps
当您实现自定义边时,它会被包装在一个组件中,该组件启用一些基本功能。您的自定义边组件将接收以下 props
export type EdgeProps<T> = {
id: string;
animated: boolean;
data: T;
style: string;
selected: boolean;
source: string;
target: string;
sourceHandleId?: string | null;
targetHandleId?: string | null;
interactionWidth: number;
sourceX: number;
sourceY: number;
targetX: number;
targetY: number;
sourcePosition: Position;
targetPosition: Position;
label?: string;
markerStart?: string;
markerEnd?: string;
pathOptions?: any;
};
字段
名称 | 类型 |
---|---|
# id | string |
# animated | boolean |
# data | T |
# style | string |
# selected | boolean |
# source | string |
# target | string |
# sourceHandleId? | string | null |
# targetHandleId? | string | null |
# interactionWidth | number |
# sourceX | number |
# sourceY | number |
# targetX | number |
# targetY | number |
# sourcePosition | Position |
# targetPosition | Position |
# label? | string |
# labelStyle? | string |
# markerStart? | string |
# markerEnd? | string |
# pathOptions? | any |