mirror of
https://git.datalinker.icu/ltdrdata/ComfyUI-Manager
synced 2025-12-09 22:24:23 +08:00
fix: badge drawer is overriding node.onDrawForeground
This commit is contained in:
parent
62c9c00b20
commit
86ecc194ac
@ -29,7 +29,7 @@ except:
|
|||||||
print(f"[WARN] ComfyUI-Manager: Your ComfyUI version is outdated. Please update to the latest version.")
|
print(f"[WARN] ComfyUI-Manager: Your ComfyUI version is outdated. Please update to the latest version.")
|
||||||
|
|
||||||
|
|
||||||
version = [2, 3, 1]
|
version = [2, 3, 2]
|
||||||
version_str = f"V{version[0]}.{version[1]}" + (f'.{version[2]}' if len(version) > 2 else '')
|
version_str = f"V{version[0]}.{version[1]}" + (f'.{version[2]}' if len(version) > 2 else '')
|
||||||
print(f"### Loading: ComfyUI-Manager ({version_str})")
|
print(f"### Loading: ComfyUI-Manager ({version_str})")
|
||||||
|
|
||||||
|
|||||||
@ -1271,7 +1271,10 @@ app.registerExtension({
|
|||||||
async nodeCreated(node, app) {
|
async nodeCreated(node, app) {
|
||||||
if(!node.badge_enabled) {
|
if(!node.badge_enabled) {
|
||||||
node.getNickname = function () { return getNickname(node, node.comfyClass.trim()) };
|
node.getNickname = function () { return getNickname(node, node.comfyClass.trim()) };
|
||||||
const orig = node.__proto__.onDrawForeground;
|
let orig = node.onDrawForeground;
|
||||||
|
if(!orig)
|
||||||
|
orig = node.__proto__.onDrawForeground;
|
||||||
|
|
||||||
node.onDrawForeground = function (ctx) {
|
node.onDrawForeground = function (ctx) {
|
||||||
drawBadge(node, orig, arguments)
|
drawBadge(node, orig, arguments)
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user