feat(editor): Compute node position and connections when creating new nodes in new canvas (no-changelog) (#9830)

This commit is contained in:
Alex Grozav
2024-06-25 12:11:44 +03:00
committed by GitHub
parent b55fc60993
commit 31c456700a
15 changed files with 1628 additions and 858 deletions

View File

@@ -68,6 +68,18 @@ export function parseCanvasConnectionHandleString(handle: string | null | undefi
};
}
export function createCanvasConnectionHandleString({
mode,
type = NodeConnectionType.Main,
index = 0,
}: {
mode: 'inputs' | 'outputs';
type?: NodeConnectionType;
index?: number;
}) {
return `${mode}/${type}/${index}`;
}
export function mapCanvasConnectionToLegacyConnection(
sourceNode: INodeUi,
targetNode: INodeUi,