mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-24 08:44:06 +00:00
Only show delete in selection toolbox for reroute (#2670)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import type { ColorOption, IWidget } from '@comfyorg/litegraph'
|
||||
import { LGraphNode, isColorable } from '@comfyorg/litegraph'
|
||||
import { LGraphGroup, LGraphNode, isColorable } from '@comfyorg/litegraph'
|
||||
import type { IComboWidget } from '@comfyorg/litegraph/dist/types/widgets'
|
||||
import _ from 'lodash'
|
||||
|
||||
@@ -21,8 +21,11 @@ export function addToComboValues(widget: IComboWidget, value: string) {
|
||||
}
|
||||
|
||||
export const isLGraphNode = (item: unknown): item is LGraphNode => {
|
||||
const name = item?.constructor?.name
|
||||
return name === 'ComfyNode' || name === 'LGraphNode'
|
||||
return item instanceof LGraphNode
|
||||
}
|
||||
|
||||
export const isLGraphGroup = (item: unknown): item is LGraphGroup => {
|
||||
return item instanceof LGraphGroup
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user