feat(core): add source and target handle ids to edge removal change

This commit is contained in:
Abdelrahman Awad
2024-01-03 11:13:31 +01:00
committed by Braks
parent 7f18def7fe
commit d78a53fcd6
3 changed files with 29 additions and 3 deletions
+9 -1
View File
@@ -235,11 +235,19 @@ export function createNodeRemoveChange(id: string): NodeRemoveChange {
}
}
export function createEdgeRemoveChange(id: string, source: string, target: string): EdgeRemoveChange {
export function createEdgeRemoveChange(
id: string,
source: string,
target: string,
sourceHandle?: string | null,
targetHandle?: string | null,
): EdgeRemoveChange {
return {
id,
source,
target,
sourceHandle: sourceHandle || null,
targetHandle: targetHandle || null,
type: 'remove',
}
}