Function: useEdge ​
â–¸ useEdge<Data
, CustomEvents
>(id?
): Object
This composable 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 ​
Name | Type |
---|---|
Data | any |
CustomEvents | extends Record <string , CustomEvent <any [], any >> = any |
Parameters ​
Name | Type | Description |
---|---|---|
id? | string | The id of the edge to access |
Returns ​
Object
the edge id, the edge and the edge dom element
Name | Type |
---|---|
edge | undefined | GraphEdge <Data , CustomEvents , string > |
edgeEl | Ref <null | SVGElement > |
id | string |