mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-28 23:30:16 +08:00
cleanup return value of seedWidget
This commit is contained in:
parent
662f297a1c
commit
21b0104602
@ -284,7 +284,8 @@ app.registerExtension({
|
|||||||
// so let's check for those first
|
// so let's check for those first
|
||||||
let combinedWidgetType = type + ":" + widgetName;
|
let combinedWidgetType = type + ":" + widgetName;
|
||||||
if (combinedWidgetType in ComfyWidgets) {
|
if (combinedWidgetType in ComfyWidgets) {
|
||||||
widget = (ComfyWidgets[combinedWidgetType](this, "value", inputData, app) || {}).widget;
|
// widget = (ComfyWidgets[combinedWidgetType](this, "value", inputData, app) || {}).widget;
|
||||||
|
widget = (ComfyWidgets[combinedWidgetType](this, widgetName, inputData, app) || {}).widget;
|
||||||
} else {
|
} else {
|
||||||
// we did not find a subtype, so proceed with "<type>" only
|
// we did not find a subtype, so proceed with "<type>" only
|
||||||
if (type in ComfyWidgets) {
|
if (type in ComfyWidgets) {
|
||||||
@ -302,7 +303,7 @@ app.registerExtension({
|
|||||||
|
|
||||||
if (node?.widgets && widget) {
|
if (node?.widgets && widget) {
|
||||||
|
|
||||||
const theirWidget = node.widgets.find((w) => w.name === widgetName);
|
const theirWidget = node.widgets.find((w) => w.name === widgetName);
|
||||||
if (theirWidget) {
|
if (theirWidget) {
|
||||||
widget.value = theirWidget.value;
|
widget.value = theirWidget.value;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -59,7 +59,7 @@ function seedWidget(node, inputName, inputData) {
|
|||||||
const seedControl = addSeedControlWidget(node, seed.widget, "randomize");
|
const seedControl = addSeedControlWidget(node, seed.widget, "randomize");
|
||||||
|
|
||||||
seed.widget.linkedWidgets = [seedControl];
|
seed.widget.linkedWidgets = [seedControl];
|
||||||
return { widget: seed, seedControl };
|
return seed;
|
||||||
}
|
}
|
||||||
|
|
||||||
const MultilineSymbol = Symbol();
|
const MultilineSymbol = Symbol();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user