Update proxy IDs on group node outputs (#2364)
This pull request focuses on updating the proxy IDs for the outputs of group nodes within our project.
This commit is contained in:
commit
d629ff2fb5
1 changed files with 13 additions and 0 deletions
|
|
@ -1117,6 +1117,18 @@ export function updateProxyIdsOnTemplate(
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function updateProxyIdsOnOutputs(
|
||||||
|
outputs: OutputFieldType[] | undefined,
|
||||||
|
idsMap: { [key: string]: string },
|
||||||
|
) {
|
||||||
|
if (!outputs) return;
|
||||||
|
outputs.forEach((output) => {
|
||||||
|
if (output.proxy && idsMap[output.proxy.id]) {
|
||||||
|
output.proxy.id = idsMap[output.proxy.id];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
export function updateEdgesIds(
|
export function updateEdgesIds(
|
||||||
edges: Edge[],
|
edges: Edge[],
|
||||||
idsMap: { [key: string]: string },
|
idsMap: { [key: string]: string },
|
||||||
|
|
@ -1485,6 +1497,7 @@ export function updateGroupRecursion(groupNode: NodeType, edges: Edge[]) {
|
||||||
let newFlow = groupNode.data.node!.flow;
|
let newFlow = groupNode.data.node!.flow;
|
||||||
const idsMap = updateIds(newFlow.data!);
|
const idsMap = updateIds(newFlow.data!);
|
||||||
updateProxyIdsOnTemplate(groupNode.data.node!.template, idsMap);
|
updateProxyIdsOnTemplate(groupNode.data.node!.template, idsMap);
|
||||||
|
updateProxyIdsOnOutputs(groupNode.data.node.outputs, idsMap);
|
||||||
let flowEdges = edges;
|
let flowEdges = edges;
|
||||||
updateEdgesIds(flowEdges, idsMap);
|
updateEdgesIds(flowEdges, idsMap);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue