Skip to content

Function: useEdge ​

â–¸ useEdge<Data, CustomEvents>(id?): Object

Composable that provides access to an edge object and it's dom element

If no edge id is provided, the edge id is injected from context

If you do not provide an id, this composable has to be called in a child of your custom edge component, or it will throw

Type parameters ​

NameType
Dataany
CustomEventsextends Record<string, CustomEvent<any[], any>> = any

Parameters ​

NameTypeDescription
id?stringThe id of the edge to access

Returns ​

Object

the edge id, the edge and the edge dom element

NameType
edgeundefined | GraphEdge<Data, CustomEvents, string>
edgeElRef<null | SVGElement>
idstring

Released under the MIT License.