mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-22 15:54:09 +00:00
Graph canvas menu (#1023)
* add graph canvas menu * Move to corner * Remove action bar reset zoom button * nit * Add setting --------- Co-authored-by: huchenlei <chenlei.hu@mail.utoronto.ca>
This commit is contained in:
@@ -124,7 +124,7 @@ export const useCommandStore = defineStore('command', () => {
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'Comfy.ResetView',
|
||||
id: 'Comfy.Canvas.ResetView',
|
||||
icon: 'pi pi-expand',
|
||||
label: 'Reset View',
|
||||
function: () => {
|
||||
@@ -180,6 +180,32 @@ export const useCommandStore = defineStore('command', () => {
|
||||
icon: 'pi pi-folder-open',
|
||||
label: 'Browse Templates',
|
||||
function: showTemplateWorkflowsDialog
|
||||
},
|
||||
{
|
||||
id: 'Comfy.Canvas.ZoomIn',
|
||||
icon: 'pi pi-plus',
|
||||
label: 'Zoom In',
|
||||
function: () => {
|
||||
app.canvas.ds.changeScale(app.canvas.ds.scale + 0.1)
|
||||
app.canvas.setDirty(true, true)
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'Comfy.Canvas.ZoomOut',
|
||||
icon: 'pi pi-minus',
|
||||
label: 'Zoom Out',
|
||||
function: () => {
|
||||
app.canvas.ds.changeScale(app.canvas.ds.scale - 0.1)
|
||||
app.canvas.setDirty(true, true)
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'Comfy.Canvas.ToggleLock',
|
||||
icon: 'pi pi-lock',
|
||||
label: 'Toggle Lock',
|
||||
function: () => {
|
||||
app.canvas['read_only'] = !app.canvas['read_only']
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user