mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-07 16:40:05 +00:00
Merge pull request #176 from RobTheFiveNine/enhancement/node-menu-sorting
Add ability to automatically sort node types / categories in the context menu
This commit is contained in:
@@ -96,6 +96,7 @@
|
||||
Globals: {}, //used to store vars between graphs
|
||||
|
||||
searchbox_extras: {}, //used to add extra features to the search box
|
||||
auto_sort_node_types: false, // If set to true, will automatically sort node types / categories in the context menus
|
||||
|
||||
/**
|
||||
* Register a node class so it can be listed when the user wants to create a new one
|
||||
@@ -416,7 +417,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
return r;
|
||||
return this.auto_sort_node_types ? r.sort() : r;
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -440,7 +441,7 @@
|
||||
for (var i in categories) {
|
||||
result.push(i);
|
||||
}
|
||||
return result;
|
||||
return this.auto_sort_node_types ? result.sort() : result;
|
||||
},
|
||||
|
||||
//debug purposes: reloads all the js scripts that matches a wildcard
|
||||
|
||||
Reference in New Issue
Block a user