mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-06 05:30:08 +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',
|
||||
|
||||
@@ -134,7 +134,7 @@ export const CORE_KEYBINDINGS: Keybinding[] = [
|
||||
combo: {
|
||||
key: 'p'
|
||||
},
|
||||
commandId: 'Comfy.Canvas.ToggleSelectedNodes.Pin',
|
||||
commandId: 'Comfy.Canvas.ToggleSelected.Pin',
|
||||
targetSelector: '#graph-canvas'
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user