Update litegraph (Zoom speed adjustment) (#580)

This commit is contained in:
Chenlei Hu
2024-08-21 17:16:06 -04:00
committed by GitHub
parent 5542845710
commit 17c7f57d8f
5 changed files with 28 additions and 5 deletions

View File

@@ -64,6 +64,15 @@ watch(
{ immediate: true }
)
const zoomSpeed = computed(() => settingStore.get('Comfy.Graph.ZoomSpeed'))
watch(
zoomSpeed,
(newVal: number) => {
if (comfyApp.canvas) comfyApp.canvas['zoom_speed'] = newVal
},
{ immediate: true }
)
watchEffect(() => {
nodeDefStore.showDeprecated = settingStore.get('Comfy.Node.ShowDeprecated')
})
@@ -94,6 +103,7 @@ onMounted(async () => {
await comfyApp.setup(canvasRef.value)
comfyApp.canvas.allow_searchbox = !nodeSearchEnabled.value
comfyApp.canvas.show_info = canvasInfoEnabled.value
comfyApp.canvas['zoom_speed'] = zoomSpeed.value
workspaceStore.spinner = false
window['app'] = comfyApp