mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 11:11:53 +00:00
[Cleanup] Remove WidgetOptions.forceInput (#3362)
This commit is contained in:
@@ -433,8 +433,7 @@ function getConfig(this: LGraphNode, widgetName: string) {
|
|||||||
function isConvertibleWidget(widget: IWidget, config: InputSpec): boolean {
|
function isConvertibleWidget(widget: IWidget, config: InputSpec): boolean {
|
||||||
return (
|
return (
|
||||||
// @ts-expect-error InputSpec is not typed correctly
|
// @ts-expect-error InputSpec is not typed correctly
|
||||||
(VALID_TYPES.includes(widget.type) || VALID_TYPES.includes(config[0])) &&
|
VALID_TYPES.includes(widget.type) || VALID_TYPES.includes(config[0])
|
||||||
!widget.options?.forceInput
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -147,7 +147,6 @@ export const useLitegraphService = () => {
|
|||||||
widget.label = st(nameKey, widget.label ?? inputName)
|
widget.label = st(nameKey, widget.label ?? inputName)
|
||||||
widget.options ??= {}
|
widget.options ??= {}
|
||||||
Object.assign(widget.options, {
|
Object.assign(widget.options, {
|
||||||
forceInput: inputSpec.forceInput,
|
|
||||||
advanced: inputSpec.advanced,
|
advanced: inputSpec.advanced,
|
||||||
hidden: inputSpec.hidden
|
hidden: inputSpec.hidden
|
||||||
})
|
})
|
||||||
|
|||||||
4
src/types/litegraph-augmentation.d.ts
vendored
4
src/types/litegraph-augmentation.d.ts
vendored
@@ -26,10 +26,6 @@ declare module '@comfyorg/litegraph/dist/types/widgets' {
|
|||||||
* The minimum size of the node if the widget is present.
|
* The minimum size of the node if the widget is present.
|
||||||
*/
|
*/
|
||||||
minNodeSize?: Size
|
minNodeSize?: Size
|
||||||
/**
|
|
||||||
* Whether the widget is forced to be an input.
|
|
||||||
*/
|
|
||||||
forceInput?: boolean
|
|
||||||
/**
|
/**
|
||||||
* Whether the widget defaults to input state. Can still be converted back
|
* Whether the widget defaults to input state. Can still be converted back
|
||||||
* to widget state.
|
* to widget state.
|
||||||
|
|||||||
Reference in New Issue
Block a user