mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
disable merge group menu for single item or non-group item
This commit is contained in:
parent
81a4f42673
commit
07556592c1
@ -178,7 +178,7 @@ RED.group = (function() {
|
|||||||
RED.events.on("view:selection-changed",function(selection) {
|
RED.events.on("view:selection-changed",function(selection) {
|
||||||
RED.menu.setDisabled("menu-item-group-group",!!!selection.nodes);
|
RED.menu.setDisabled("menu-item-group-group",!!!selection.nodes);
|
||||||
RED.menu.setDisabled("menu-item-group-ungroup",!!!selection.nodes || selection.nodes.filter(function(n) { return n.type==='group'}).length === 0);
|
RED.menu.setDisabled("menu-item-group-ungroup",!!!selection.nodes || selection.nodes.filter(function(n) { return n.type==='group'}).length === 0);
|
||||||
RED.menu.setDisabled("menu-item-group-merge",!!!selection.nodes);
|
RED.menu.setDisabled("menu-item-group-merge", !!!selection.nodes || (selection.nodes.length <= 1) || selection.nodes.filter(function(n) { return n.type==='group'}).length === 0);
|
||||||
RED.menu.setDisabled("menu-item-group-remove",!!!selection.nodes || selection.nodes.filter(function(n) { return !!n.g }).length === 0);
|
RED.menu.setDisabled("menu-item-group-remove",!!!selection.nodes || selection.nodes.filter(function(n) { return !!n.g }).length === 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user