From acea173ba0ba9432332e39c82193d86839bfee89 Mon Sep 17 00:00:00 2001 From: Chenlei Hu Date: Sat, 15 Feb 2025 12:24:38 -0500 Subject: [PATCH] [BugFix] Set height to 0 for hidden widgets on GroupNode (#2566) --- src/scripts/domWidget.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/scripts/domWidget.ts b/src/scripts/domWidget.ts index 1e9f6bf901..92b4e1b512 100644 --- a/src/scripts/domWidget.ts +++ b/src/scripts/domWidget.ts @@ -195,6 +195,15 @@ export class DOMWidgetImpl /** Extract DOM widget size info */ computeLayoutSize(node: LGraphNode) { + // @ts-expect-error custom widget type + if (this.type === 'hidden') { + return { + minHeight: 0, + maxHeight: 0, + minWidth: 0 + } + } + const styles = getComputedStyle(this.element) let minHeight = this.options.getMinHeight?.() ??