mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
[backport cloud/1.37] control widget fixes (#8163)
Manual backport of #8112 and #8160 to `cloud/1.37` ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8163-backport-cloud-1-37-control-widget-fixes-2ed6d73d3650815cb458e8adc44ad4bc) by [Unito](https://www.unito.io) --------- Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 58 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 58 KiB |
@@ -2540,6 +2540,7 @@ export class Subgraph
|
||||
|
||||
this.inputNode.configure(data.inputNode)
|
||||
this.outputNode.configure(data.outputNode)
|
||||
for (const node of this.nodes) node.updateComputedDisabled()
|
||||
}
|
||||
|
||||
override configure(
|
||||
|
||||
@@ -141,6 +141,7 @@ export abstract class BaseWidget<
|
||||
// @ts-expect-error Prevent naming conflicts with custom nodes.
|
||||
labelBaseline,
|
||||
promoted,
|
||||
linkedWidgets,
|
||||
...safeValues
|
||||
} = widget
|
||||
|
||||
|
||||
@@ -139,6 +139,9 @@ export function addValueControlWidgets(
|
||||
'Allows the linked widget to be changed automatically, for example randomizing the noise seed.'
|
||||
valueControl[IS_CONTROL_WIDGET] = true
|
||||
updateControlWidgetLabel(valueControl)
|
||||
Object.defineProperty(valueControl, 'disabled', {
|
||||
get: () => targetWidget.computedDisabled
|
||||
})
|
||||
const widgets: [IComboWidget, ...IStringWidget[]] = [valueControl]
|
||||
|
||||
const isCombo = isComboWidget(targetWidget)
|
||||
@@ -160,6 +163,9 @@ export function addValueControlWidgets(
|
||||
updateControlWidgetLabel(comboFilter)
|
||||
comboFilter.tooltip =
|
||||
"Allows for filtering the list of values when changing the value via the control generate mode. Allows for RegEx matches in the format /abc/ to only filter to values containing 'abc'."
|
||||
Object.defineProperty(comboFilter, 'disabled', {
|
||||
get: () => targetWidget.computedDisabled
|
||||
})
|
||||
|
||||
widgets.push(comboFilter)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user