first working version with using $state for nodes & edges

This commit is contained in:
peterkogo
2024-12-09 12:07:10 +01:00
parent 4fcde6f6bf
commit d0fce3984d
24 changed files with 400 additions and 366 deletions
@@ -28,9 +28,9 @@ export default function drag(domNode: Element, params: UseDragParams) {
const { snapGrid, viewport } = store;
return {
nodes: get(store.nodes),
nodes: store.nodes,
nodeLookup: store.nodeLookup,
edges: get(store.edges),
edges: store.edges,
nodeExtent: store.nodeExtent,
snapGrid: snapGrid ? snapGrid : [0, 0],
snapToGrid: !!snapGrid,