mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
fix(editor): Redraw node connections if adding more than one node to canvas (#6755)
* fix(editor): Redraw node connections if adding more than one node to canvas Signed-off-by: Oleg Ivaniv <me@olegivaniv.com> * Update position before connection two nodes * Lint fix --------- Signed-off-by: Oleg Ivaniv <me@olegivaniv.com> Co-authored-by: Alex Grozav <alex@grozav.com>
This commit is contained in:
parent
0e9703bba8
commit
b954a50fdf
|
@ -3765,9 +3765,6 @@ export default defineComponent({
|
|||
const lastAddedNode = this.nodes[this.nodes.length - 1];
|
||||
const previouslyAddedNode = this.nodes[this.nodes.length - 2];
|
||||
|
||||
await this.$nextTick();
|
||||
this.connectTwoNodes(previouslyAddedNode.name, 0, lastAddedNode.name, 0);
|
||||
|
||||
// Position the added node to the right side of the previously added one
|
||||
lastAddedNode.position = [
|
||||
previouslyAddedNode.position[0] +
|
||||
|
@ -3775,6 +3772,9 @@ export default defineComponent({
|
|||
NodeViewUtils.GRID_SIZE,
|
||||
previouslyAddedNode.position[1],
|
||||
];
|
||||
await this.$nextTick();
|
||||
this.connectTwoNodes(previouslyAddedNode.name, 0, lastAddedNode.name, 0);
|
||||
|
||||
actionWatcher();
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue