mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-04-20 03:13:30 +00:00
Fix tests.
This commit is contained in:
parent
2bef134ebf
commit
0256e7f769
@ -204,13 +204,17 @@ export class EzWidget {
|
|||||||
convertToWidget() {
|
convertToWidget() {
|
||||||
if (!this.isConvertedToInput)
|
if (!this.isConvertedToInput)
|
||||||
throw new Error(`Widget ${this.widget.name} cannot be converted as it is already a widget.`);
|
throw new Error(`Widget ${this.widget.name} cannot be converted as it is already a widget.`);
|
||||||
this.node.menu[`Convert ${this.widget.name} to widget`].call();
|
var menu = this.node.menu["Convert 🔘 to widget.."].item.submenu.options;
|
||||||
|
var index = menu.findIndex(a => a.content == `Convert ${this.widget.name} to widget`);
|
||||||
|
menu[index].callback.call();
|
||||||
}
|
}
|
||||||
|
|
||||||
convertToInput() {
|
convertToInput() {
|
||||||
if (this.isConvertedToInput)
|
if (this.isConvertedToInput)
|
||||||
throw new Error(`Widget ${this.widget.name} cannot be converted as it is already an input.`);
|
throw new Error(`Widget ${this.widget.name} cannot be converted as it is already an input.`);
|
||||||
this.node.menu[`Convert ${this.widget.name} to input`].call();
|
var menu = this.node.menu["Convert input to 🔘.."].item.submenu.options;
|
||||||
|
var index = menu.findIndex(a => a.content == `Convert ${this.widget.name} to input`);
|
||||||
|
menu[index].callback.call();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user