Re-enable add node / add group tests (#2815)

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Chenlei Hu
2025-03-02 21:58:43 -05:00
committed by GitHub
parent 8584f982a0
commit f16ef00055
12 changed files with 18 additions and 23 deletions

View File

@@ -32,16 +32,17 @@ app.registerExtension({
this.graph_mouse[1]
)
if (!group) {
options.push({
content: 'Add Group For Selected Nodes',
disabled: !this.selectedItems?.size,
callback: () => {
const group = new LGraphGroup()
addNodesToGroup(group, this.selectedItems)
this.graph.add(group)
this.graph.change()
}
})
if (this.selectedItems.size > 0) {
options.push({
content: 'Add Group For Selected Nodes',
callback: () => {
const group = new LGraphGroup()
addNodesToGroup(group, this.selectedItems)
this.graph.add(group)
this.graph.change()
}
})
}
return options
}