mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-26 01:09:46 +00:00
Fit view to bounds (#1474)
* fit view: - fit view to canvas selection - fit view to whole graph when nothing is selected - add button to graph canvas menu - assign default keybinding '.' * Adjust on changed APIs * Update litegraph --------- Co-authored-by: huchenlei <huchenlei@proton.me>
This commit is contained in:
@@ -292,6 +292,12 @@ export const useCommandStore = defineStore('command', () => {
|
||||
app.canvas.setDirty(true, true)
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'Comfy.Canvas.FitView',
|
||||
icon: 'pi pi-expand',
|
||||
label: 'Fit view to selected nodes',
|
||||
function: () => app.canvas.fitViewToSelectionAnimated()
|
||||
},
|
||||
{
|
||||
id: 'Comfy.Canvas.ToggleLock',
|
||||
icon: 'pi pi-lock',
|
||||
|
||||
Reference in New Issue
Block a user