[Bug] Fix widget placeholder rendering (#3215)

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Chenlei Hu
2025-03-23 23:02:35 -04:00
committed by GitHub
parent f8a2c90138
commit a4b0f5ab5e
4 changed files with 3 additions and 2 deletions

View File

@@ -148,12 +148,13 @@ abstract class BaseDOMWidgetImpl<V extends object | string>
if (this.options.hideOnZoom && lowQuality) {
// Draw a placeholder rectangle
const originalFillStyle = ctx.fillStyle
ctx.beginPath()
ctx.fillStyle = LiteGraph.WIDGET_BGCOLOR
ctx.rect(
this.margin,
y,
y + this.margin,
widget_width - this.margin * 2,
(this.computedHeight ?? widget_height) - this.margin
(this.computedHeight ?? widget_height) - 2 * this.margin
)
ctx.fill()
ctx.fillStyle = originalFillStyle