Do not hardcode input nodes depth in child nodes

This commit is contained in:
Federico Meini 2024-10-11 17:26:42 +02:00
parent 8734dc99fc
commit 118661d33b
No known key found for this signature in database

View file

@ -186,7 +186,7 @@ export default defineComponent({
const workflow = this.workflow;
const parentNodes = [...workflow.getParentNodes(this.rootNode, NodeConnectionType.Main)]
.reverse()
.map((parent): IConnectedNode => ({ name: parent, depth: 1, indicies: [] }));
.map((parent, index): IConnectedNode => ({ name: parent, depth: index + 1, indicies: [] }));
return parentNodes;
},