mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 03:01:54 +00:00
Fix custom widgets with draw may break rendering (#1072)
This commit is contained in:
@@ -3440,11 +3440,10 @@ export class LGraphNode implements Positionable, IPinnable, IColorable {
|
|||||||
if (widget.computedDisabled) ctx.globalAlpha *= 0.5
|
if (widget.computedDisabled) ctx.globalAlpha *= 0.5
|
||||||
const width = widget.width || nodeWidth
|
const width = widget.width || nodeWidth
|
||||||
|
|
||||||
const widgetInstance = toConcreteWidget(widget, this, false)
|
if (typeof widget.draw === "function") {
|
||||||
if (widgetInstance) {
|
widget.draw(ctx, this, width, y, H, lowQuality)
|
||||||
widgetInstance.drawWidget(ctx, { width, showText })
|
|
||||||
} else {
|
} else {
|
||||||
widget.draw?.(ctx, this, width, y, H, lowQuality)
|
toConcreteWidget(widget, this, false)?.drawWidget(ctx, { width, showText })
|
||||||
}
|
}
|
||||||
ctx.globalAlpha = editorAlpha
|
ctx.globalAlpha = editorAlpha
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user