Skip to content

Commit

Permalink
Add setting
Browse files Browse the repository at this point in the history
  • Loading branch information
huchenlei committed Sep 30, 2024
1 parent f545b46 commit 8927785
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/components/graph/GraphCanvas.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<SideToolbar />
</template>
<template #graph-canvas-panel>
<GraphCanvasMenu />
<GraphCanvasMenu v-if="canvasMenuEnabled" />
</template>
</LiteGraphCanvasSplitterOverlay>
<TitleEditor />
Expand Down Expand Up @@ -59,6 +59,9 @@ const modelToNodeStore = useModelToNodeStore()
const betaMenuEnabled = computed(
() => settingStore.get('Comfy.UseNewMenu') !== 'Disabled'
)
const canvasMenuEnabled = computed(() =>
settingStore.get('Comfy.Graph.CanvasMenu')
)
watchEffect(() => {
const canvasInfoEnabled = settingStore.get('Comfy.Graph.CanvasInfo')
Expand Down
7 changes: 6 additions & 1 deletion src/stores/coreSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export const CORE_SETTINGS: SettingParams[] = [
type: 'boolean',
defaultValue: true
},

{
id: 'Comfy.NodeSearchBoxImpl',
category: ['Comfy', 'Node Search Box', 'Implementation'],
Expand Down Expand Up @@ -381,5 +380,11 @@ export const CORE_SETTINGS: SettingParams[] = [
type: 'hidden',
options: ['Sidebar', 'Topbar'],
defaultValue: 'Sidebar'
},
{
id: 'Comfy.Graph.CanvasMenu',
name: 'Show graph canvas menu',
type: 'boolean',
defaultValue: true
}
]

0 comments on commit 8927785

Please sign in to comment.