EdgeProps
When you implement a custom edge it is wrapped in a component that enables some basic
functionality. The EdgeProps type takes a generic parameter to specify the type of edges
you use in your application:
type AppEdgeProps = EdgeProps<MyEdgeType>;Your custom edge component receives the following props:
Fields
When you implement a custom edge it is wrapped in a component that enables some
basic functionality. The EdgeProps type is the props that are passed to this.
id: EdgeType["id"]Unique id of an edge.type?: EdgeType["type"]Type of edge defined inedgeTypes.animated?: EdgeType["animated"]data?: EdgeType["data"]Arbitrary data passed to an edge.style?: EdgeType["style"]selected?: EdgeType["selected"]source: EdgeType["source"]Id of source node.target: EdgeType["target"]Id of target node.selectable?: EdgeType["selectable"]deletable?: EdgeType["deletable"]sourceX: numbersourceY: numbertargetX: numbertargetY: numbersourcePosition: PositiontargetPosition: Positionlabel?: ReactNodeThe label or custom element to render along the edge. This is commonly a text label or some custom controls.labelStyle?: CSSPropertiesCustom styles to apply to the label.labelShowBg?: booleanlabelBgStyle?: CSSPropertieslabelBgPadding?: [number, number]labelBgBorderRadius?: numbersourceHandleId?: string | nulltargetHandleId?: string | nullmarkerStart?: stringmarkerEnd?: stringpathOptions?: anyinteractionWidth?: number