mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-25 09:14:25 +00:00
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:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user