Add bypass action to selection toolbox (#2616)

This commit is contained in:
Chenlei Hu
2025-02-18 12:25:49 -05:00
committed by GitHub
parent 28dd6a2702
commit 25e5ab3a36
5 changed files with 55 additions and 8 deletions

View File

@@ -4,6 +4,7 @@ import { computed, ref, watchEffect } from 'vue'
import { useCommandStore } from '@/stores/commandStore'
import { useCanvasStore } from '@/stores/graphStore'
import { isLGraphNode } from '@/utils/litegraphUtil'
interface RefreshableItem {
refresh: () => Promise<void> | void
@@ -11,11 +12,6 @@ interface RefreshableItem {
type RefreshableWidget = IWidget & RefreshableItem
const isLGraphNode = (item: unknown): item is LGraphNode => {
const name = item?.constructor?.name
return name === 'ComfyNode' || name === 'LGraphNode'
}
const isRefreshableWidget = (widget: IWidget): widget is RefreshableWidget =>
'refresh' in widget && typeof widget.refresh === 'function'