refactor(useHandleConnections): also return edge id

This commit is contained in:
moklick
2024-02-08 13:32:37 +01:00
parent 57270f3eb4
commit c3d5c8cdfa
6 changed files with 28 additions and 18 deletions
@@ -6,7 +6,7 @@
Position,
XYHandle,
isMouseEvent,
type Connection,
type HandleConnection,
areConnectionMapsEqual,
handleConnectionChange
} from '@xyflow/system';
@@ -103,8 +103,8 @@
}
}
let prevConnections: Map<string, Connection> | null = null;
let connections: Map<string, Connection> | undefined;
let prevConnections: Map<string, HandleConnection> | null = null;
let connections: Map<string, HandleConnection> | undefined;
$: if (onconnect || ondisconnect) {
// connectionLookup is not reactive, so we use edges to get notified about updates