update(nodes): Add draggable,selectable and connectable as props to nodes

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-12-20 19:29:52 +01:00
parent e91188de5c
commit 947baefa02
3 changed files with 18 additions and 20 deletions
+5
View File
@@ -77,6 +77,9 @@ export const parseNode = (node: Node, nodeExtent: CoordinateExtent, defaults?: P
},
isParent: !!(node.children && node.children.length),
dragging: false,
draggable: undefined,
selectable: undefined,
connectable: undefined,
...defaults,
}
: defaults
@@ -101,6 +104,8 @@ export const parseEdge = (edge: Edge, defaults?: Partial<GraphEdge>): GraphEdge
sourceY: 0,
targetX: 0,
targetY: 0,
updatable: undefined,
selectable: undefined,
...defaults,
}
: defaults