show add junction when nodes are selected

This commit is contained in:
Steve-Mcl 2022-07-13 22:34:22 +01:00
parent 75d3444391
commit 6e5fc29dca
1 changed files with 1 additions and 2 deletions

View File

@ -69,13 +69,12 @@ RED.contextMenu = (function () {
}) })
} }
}, },
(hasSelection || hasLinks) ? { // has nodes or at least 1 wire selected (hasLinks) ? { // has least 1 wire selected
label: RED._("contextMenu.junction"), label: RED._("contextMenu.junction"),
onselect: 'core:split-wires-with-junctions', onselect: 'core:split-wires-with-junctions',
disabled: !hasLinks disabled: !hasLinks
} : { } : {
label: RED._("contextMenu.junction"), label: RED._("contextMenu.junction"),
disabled: !noSelection, // has 0 nodes, 0 links selected (i.e. workspace right click)
onselect: function () { onselect: function () {
const nn = { const nn = {
_def: { defaults: {} }, _def: { defaults: {} },