From 75d3444391306155aaa3655e39f92a184bf77c53 Mon Sep 17 00:00:00 2001 From: Steve-Mcl Date: Wed, 13 Jul 2022 12:43:58 +0100 Subject: [PATCH] Ensure added junc(s) are selected Feature parity with insert node, insert links etc --- .../@node-red/editor-client/src/js/ui/contextMenu.js | 1 + .../node_modules/@node-red/editor-client/src/js/ui/view-tools.js | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/contextMenu.js b/packages/node_modules/@node-red/editor-client/src/js/ui/contextMenu.js index 03517e65b..df37a6d89 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/contextMenu.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/contextMenu.js @@ -97,6 +97,7 @@ RED.contextMenu = (function () { RED.nodes.addJunction(nn); RED.history.push(historyEvent); RED.nodes.dirty(true); + RED.view.select({nodes: [nn] }); RED.view.redraw(true) } }, diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/view-tools.js b/packages/node_modules/@node-red/editor-client/src/js/ui/view-tools.js index 7aa9919e3..bc81d4a43 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/view-tools.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/view-tools.js @@ -1187,6 +1187,7 @@ RED.view.tools = (function() { removedLinks: Array.from(removedLinks) }) RED.nodes.dirty(true) + RED.view.select({nodes: addedJunctions }); } RED.view.redraw(true); }