EdgeProps
When you implement a custom edge it is wrapped in a component that enables some basic functionality. Your custom edge component receives the following 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;
};
Fields
Name | Type |
---|---|
# 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 |