From 45e16e113412ff19500810ea88e028c1212ad434 Mon Sep 17 00:00:00 2001 From: Ethanfel Date: Sun, 21 Jun 2026 17:59:04 +0200 Subject: [PATCH] fix: hide gate preview element when idle (no stray black box) Co-Authored-By: Claude Opus 4.8 --- web/image_gate.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/image_gate.js b/web/image_gate.js index b30ea8c..69cf85d 100644 --- a/web/image_gate.js +++ b/web/image_gate.js @@ -90,7 +90,10 @@ function previewHeight(node) { } function resizePreview(node) { - if (node._previewWidget) node._previewWidget.computedHeight = previewHeight(node); + // Fully remove the preview element from layout when idle — collapsing the + // widget height to 0 isn't enough: the fixed-height would still paint as + // a black box hanging below the node frame. + if (node._gate) node._gate.wrap.style.display = node._gateActive ? "flex" : "none"; const w = node.size?.[0] || 220; node.setSize([w, node.computeSize()[1]]); node.setDirtyCanvas(true, true);