1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

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

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: {} },