[Refactor] Move goToNode to litegraphService (#2101)

This commit is contained in:
Chenlei Hu
2024-12-30 16:38:10 -05:00
committed by GitHub
parent 3bf0dfd218
commit 9f23f81879
4 changed files with 15 additions and 10 deletions

View File

@@ -110,6 +110,7 @@ import { ComfyNode } from '@/types/comfyWorkflow'
import { useSettingStore } from '@/stores/settingStore'
import { useCommandStore } from '@/stores/commandStore'
import { app } from '@/scripts/app'
import { useLitegraphService } from '@/services/litegraphService'
const IMAGE_FIT = 'Comfy.Queue.ImageFit'
const confirm = useConfirm()
@@ -255,7 +256,7 @@ const menuItems = computed<MenuItem[]>(() => [
{
label: t('g.goToNode'),
icon: 'pi pi-arrow-circle-right',
command: () => app.goToNode(menuTargetNode.value?.id),
command: () => useLitegraphService().goToNode(menuTargetNode.value?.id),
visible: !!menuTargetNode.value
}
])