From 519b65ff52476cc21ebdf7f71f05fdac4f6c6b60 Mon Sep 17 00:00:00 2001 From: Behnam Date: Thu, 25 Dec 2025 17:37:05 +0000 Subject: [PATCH] fix: hide image preview and progress indicator when node is collapsed Nodes with showImagePreview (like Split Grid) or showProgressIndicator were still rendering their custom foreground content when minimised. Added collapsed state check to onDrawForeground handlers. Co-Authored-By: Behnam & Claude Code --- src/nodes/base/BaseNode.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/nodes/base/BaseNode.ts b/src/nodes/base/BaseNode.ts index a33e2b0..4389501 100644 --- a/src/nodes/base/BaseNode.ts +++ b/src/nodes/base/BaseNode.ts @@ -467,6 +467,9 @@ export function createNodeClass( const progressNodeRef = this this.onDrawForeground = function (ctx: CanvasRenderingContext2D) { + // Don't draw progress indicator when node is collapsed + if (this.flags?.collapsed) return + const status = progressNodeRef.executionStatus if (!status || status === 'idle') return @@ -587,6 +590,9 @@ export function createNodeClass( // Override onDrawForeground to render images this.onDrawForeground = function (ctx: CanvasRenderingContext2D) { + // Don't draw preview when node is collapsed + if (this.flags?.collapsed) return + // Get preview height from widget or use static value let previewHeight = staticPreviewHeight if (dynamicHeightWidget) {