refactor(core): allow setting handleId in useNodeConnections (#1732)

* refactor(core): allow setting handleId in useNodeConnections

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>

* chore(core): deprecate useHandleConnections

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>

* chore(examples): cleanup

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>

* chore(docs): cleanup

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>

* chore(core): cleanup

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>

* chore(core): cleanup

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>

* chore(docs): cleanup

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>

---------

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2025-01-12 10:05:01 +01:00
parent 268ed0e84e
commit 3d1b85fce2
12 changed files with 122 additions and 114 deletions
+3 -3
View File
@@ -349,7 +349,7 @@ export function useActions(state: State, nodeLookup: ComputedRef<NodeLookup>, ed
state.edges,
)
updateConnectionLookup(state.connectionLookup, validEdges)
updateConnectionLookup(state.connectionLookup, edgeLookup.value, validEdges)
state.edges = validEdges
}
@@ -527,7 +527,7 @@ export function useActions(state: State, nodeLookup: ComputedRef<NodeLookup>, ed
state.edges.splice(state.edges.indexOf(prevEdge), 1, validEdge)
updateConnectionLookup(state.connectionLookup, [validEdge])
updateConnectionLookup(state.connectionLookup, edgeLookup.value, [validEdge])
return validEdge
}
@@ -554,7 +554,7 @@ export function useActions(state: State, nodeLookup: ComputedRef<NodeLookup>, ed
const applyEdgeChanges: Actions['applyEdgeChanges'] = (changes) => {
const changedEdges = applyChanges(changes, state.edges)
updateConnectionLookup(state.connectionLookup, changedEdges)
updateConnectionLookup(state.connectionLookup, edgeLookup.value, changedEdges)
return changedEdges
}