feat(core): add edge id to handle connections

This commit is contained in:
braks
2024-06-06 10:45:38 +02:00
committed by Braks
parent fa7087f7ff
commit 1bb7a19e1b
4 changed files with 31 additions and 21 deletions
+5 -4
View File
@@ -7,6 +7,7 @@ import type {
Edge,
GraphEdge,
GraphNode,
HandleConnection,
Node,
State,
ValidConnectionFunc,
@@ -162,15 +163,15 @@ export function updateConnectionLookup(connectionLookup: ConnectionLookup, edges
* @internal
*/
export function handleConnectionChange(
a: Map<string, Connection>,
b: Map<string, Connection>,
cb?: (diff: Connection[]) => void,
a: Map<string, HandleConnection>,
b: Map<string, HandleConnection>,
cb?: (diff: HandleConnection[]) => void,
) {
if (!cb) {
return
}
const diff: Connection[] = []
const diff: HandleConnection[] = []
for (const key of a.keys()) {
if (!b.has(key)) {