Pin selected items (Nodes + Groups) (#1427)

* Pin selected items (Nodes + Groups)

* Update litegraph

* Add playwright test

* nit

* Update test expectations [skip ci]

---------

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Chenlei Hu
2024-11-04 17:36:33 -05:00
committed by GitHub
parent 3148c90e28
commit 2161ae4e5b
9 changed files with 30 additions and 6 deletions

View File

@@ -428,6 +428,19 @@ export const useCommandStore = defineStore('command', () => {
})
}
},
{
id: 'Comfy.Canvas.ToggleSelected.Pin',
icon: 'pi pi-pin',
label: 'Pin/Unpin Selected Items',
versionAdded: '1.3.33',
function: () => {
for (const item of app.canvas.selectedItems) {
if (item instanceof LGraphNode || item instanceof LGraphGroup) {
item.pin(!item.pinned)
}
}
}
},
{
id: 'Comfy.Canvas.ToggleSelectedNodes.Collapse',
icon: 'pi pi-minus',