From b954a50fdffa3eb18e3085213e3035cceb729623 Mon Sep 17 00:00:00 2001 From: OlegIvaniv Date: Thu, 27 Jul 2023 12:10:40 +0200 Subject: [PATCH] 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 * Update position before connection two nodes * Lint fix --------- Signed-off-by: Oleg Ivaniv Co-authored-by: Alex Grozav --- packages/editor-ui/src/views/NodeView.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/editor-ui/src/views/NodeView.vue b/packages/editor-ui/src/views/NodeView.vue index 114750ca8a..cf0d02bede 100644 --- a/packages/editor-ui/src/views/NodeView.vue +++ b/packages/editor-ui/src/views/NodeView.vue @@ -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(); }); }