mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-05 13:10:24 +00:00
refactor: Only show Align options if more than one node is selected
This commit is contained in:
@@ -12977,7 +12977,6 @@ LGraphNode.prototype.executeAction = function(action)
|
||||
callback: LGraphCanvas.onMenuAdd
|
||||
},
|
||||
{ content: "Add Group", callback: LGraphCanvas.onGroupAdd },
|
||||
{ content: "Align", has_submenu: true, callback: LGraphCanvas.onGroupAlign },
|
||||
//{ content: "Arrange", callback: that.graph.arrange },
|
||||
//{content:"Collapse All", callback: LGraphCanvas.onMenuCollapseAll }
|
||||
];
|
||||
@@ -12985,6 +12984,14 @@ LGraphNode.prototype.executeAction = function(action)
|
||||
options.push({ content: "Options", callback: that.showShowGraphOptionsPanel });
|
||||
}*/
|
||||
|
||||
if (Object.keys(this.selected_nodes).length > 1) {
|
||||
options.push({
|
||||
content: "Align",
|
||||
has_submenu: true,
|
||||
callback: LGraphCanvas.onGroupAlign,
|
||||
})
|
||||
}
|
||||
|
||||
if (this._graph_stack && this._graph_stack.length > 0) {
|
||||
options.push(null, {
|
||||
content: "Close subgraph",
|
||||
|
||||
Reference in New Issue
Block a user