mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-09-15 05:57:57 +00:00
Improve node input/widget conversion sub-menus (#3281)
* Make input/widget conversion sub-menus optional
* Improve input/widget conversion sub-menu text
- Fix incorrect text for conversion from widget to input, previously it
effectively said "convert input to input"
- Use "input" instead of "🔘". The former is clearer and consistent
with the rest of the application.
- Use title case (consistent with the rest of the menu entries).
- Strip the trailing periods. There is already a visual indicator for
sub-menus, and no other sub-menus use trailing periods.
This commit is contained in:
committed by
GitHub
parent
d64e217427
commit
a88b0ebc2d
@@ -204,7 +204,7 @@ export class EzWidget {
|
||||
convertToWidget() {
|
||||
if (!this.isConvertedToInput)
|
||||
throw new Error(`Widget ${this.widget.name} cannot be converted as it is already a widget.`);
|
||||
var menu = this.node.menu["Convert 🔘 to widget.."].item.submenu.options;
|
||||
var menu = this.node.menu["Convert Input to Widget"].item.submenu.options;
|
||||
var index = menu.findIndex(a => a.content == `Convert ${this.widget.name} to widget`);
|
||||
menu[index].callback.call();
|
||||
}
|
||||
@@ -212,7 +212,7 @@ export class EzWidget {
|
||||
convertToInput() {
|
||||
if (this.isConvertedToInput)
|
||||
throw new Error(`Widget ${this.widget.name} cannot be converted as it is already an input.`);
|
||||
var menu = this.node.menu["Convert input to 🔘.."].item.submenu.options;
|
||||
var menu = this.node.menu["Convert Widget to Input"].item.submenu.options;
|
||||
var index = menu.findIndex(a => a.content == `Convert ${this.widget.name} to input`);
|
||||
menu[index].callback.call();
|
||||
}
|
||||
|
Reference in New Issue
Block a user