mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-09 09:30:06 +00:00
Support batch image upload (#2597)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import type { IWidget, LGraphNode } from '@comfyorg/litegraph'
|
||||
import type { IComboWidget } from '@comfyorg/litegraph/dist/types/widgets'
|
||||
|
||||
export function isImageNode(node: LGraphNode) {
|
||||
return (
|
||||
@@ -8,3 +9,11 @@ export function isImageNode(node: LGraphNode) {
|
||||
node.widgets.findIndex((obj: IWidget) => obj.name === 'image') >= 0)
|
||||
)
|
||||
}
|
||||
|
||||
export function addToComboValues(widget: IComboWidget, value: string) {
|
||||
if (!widget.options) widget.options = { values: [] }
|
||||
if (!widget.options.values) widget.options.values = []
|
||||
if (!widget.options.values.includes(value)) {
|
||||
widget.options.values.push(value)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user