feat(core): add option to avoid replacing edge id when updating

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
braks
2023-02-22 20:20:11 +01:00
committed by Braks
parent aafd8622f4
commit 4bf4b6386e
3 changed files with 8 additions and 5 deletions
+2 -1
View File
@@ -426,7 +426,8 @@ export function useActions(state: State, getters: ComputedGetters): Actions {
state.hooks.edgesChange.trigger(changes)
}
const updateEdge: Actions['updateEdge'] = (oldEdge, newConnection) => updateEdgeAction(oldEdge, newConnection, state.edges)
const updateEdge: Actions['updateEdge'] = (oldEdge, newConnection, shouldReplaceId = true) =>
updateEdgeAction(oldEdge, newConnection, state.edges, shouldReplaceId)
const applyNodeChanges: Actions['applyNodeChanges'] = (changes) => applyChanges(changes, state.nodes)