feat: Add node/edge types id

* ID can be used to switch between different types of nodes/edges
* Add example
This commit is contained in:
Braks
2021-10-22 08:49:53 +02:00
parent 26b3901bd5
commit 0a45e09c32
6 changed files with 87 additions and 3 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ import { KeyCode, PanOnScrollMode } from '~/types/panel'
export type ElementId = string
export type FlowElement<T = any> = Node<T> | Edge<T>
export type FlowElement<T = any> = Partial<Node<T>> | Partial<Edge<T>>
export type Elements<T = any> = Array<FlowElement<T>>