Function: useNode ​
â–¸ useNode<Data
, CustomEvents
>(id?
): Object
Access a node, it's parent (if one exists) and connected edges
If no node id is provided, the node id is injected from context
Meaning if you do not provide an id, this composable has to be called in a child of your custom node component, or it will throw
Type parameters ​
Name | Type |
---|---|
Data | any |
CustomEvents | extends Record <string , CustomEvent <any [], any >> = any |
Parameters ​
Name | Type |
---|---|
id? | string |
Returns ​
Object
Name | Type |
---|---|
connectedEdges | ComputedRef <GraphEdge <any , any , string >[]> |
id | string |
node | GraphNode <Data , CustomEvents , string > |
nodeEl | null | Ref <HTMLDivElement > |
parentNode | ComputedRef <undefined | GraphNode <any , any , string >> |