mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2025-12-31 17:20:50 +08:00
fix: hide badge when collapsed
This commit is contained in:
parent
5cfa207530
commit
9f561e71f4
@ -55,7 +55,7 @@ sys.path.append('../..')
|
|||||||
from torchvision.datasets.utils import download_url
|
from torchvision.datasets.utils import download_url
|
||||||
|
|
||||||
# ensure .js
|
# ensure .js
|
||||||
print("### Loading: ComfyUI-Manager (V0.22)")
|
print("### Loading: ComfyUI-Manager (V0.22.1)")
|
||||||
|
|
||||||
comfy_ui_required_revision = 1240
|
comfy_ui_required_revision = 1240
|
||||||
comfy_ui_revision = "Unknown"
|
comfy_ui_revision = "Unknown"
|
||||||
|
|||||||
@ -1558,7 +1558,7 @@ app.registerExtension({
|
|||||||
nodeType.prototype.onDrawForeground = function (ctx) {
|
nodeType.prototype.onDrawForeground = function (ctx) {
|
||||||
const r = onDrawForeground?.apply?.(this, arguments);
|
const r = onDrawForeground?.apply?.(this, arguments);
|
||||||
|
|
||||||
if(badge_mode != 'none') {
|
if(!this.flags.collapsed && badge_mode != 'none') {
|
||||||
let text = nicknames[nodeData.name.trim()];
|
let text = nicknames[nodeData.name.trim()];
|
||||||
if(text.length > 20) {
|
if(text.length > 20) {
|
||||||
text = text.substring(0,17)+"..";
|
text = text.substring(0,17)+"..";
|
||||||
@ -1596,7 +1596,7 @@ app.registerExtension({
|
|||||||
node.onDrawForeground = function (ctx) {
|
node.onDrawForeground = function (ctx) {
|
||||||
const r = onDrawForeground?.apply?.(this, arguments);
|
const r = onDrawForeground?.apply?.(this, arguments);
|
||||||
|
|
||||||
if(badge_mode != 'none') {
|
if(!this.flags.collapsed && badge_mode != 'none') {
|
||||||
let text = nicknames[node.type.trim()];
|
let text = nicknames[node.type.trim()];
|
||||||
|
|
||||||
if(text.length > 20) {
|
if(text.length > 20) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user