mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-27 01:39:47 +00:00
Add lowQuality param to IWidget.draw (#843)
Currently widget needs to get access to `LGraphCanvas` instance to know whether the canvas is rendering in low quality (Zoomed out). Usually canvas object is obtained from `ComfyApp` instance. This PR passes the lowQuality value to `IWidget.draw` to decouple the dependency on `LGraphCanvas`.
This commit is contained in:
@@ -3376,7 +3376,7 @@ export class LGraphNode implements Positionable, IPinnable, IColorable {
|
||||
if (WidgetClass) {
|
||||
toClass(WidgetClass, w).drawWidget(ctx, { y, width: widget_width, show_text, margin })
|
||||
} else {
|
||||
w.draw?.(ctx, this, widget_width, y, H)
|
||||
w.draw?.(ctx, this, widget_width, y, H, lowQuality)
|
||||
}
|
||||
ctx.globalAlpha = editorAlpha
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user