[BugFix] Set height to 0 for hidden widgets on GroupNode (#2566)

This commit is contained in:
Chenlei Hu
2025-02-15 12:24:38 -05:00
committed by GitHub
parent bcedd5f4ed
commit acea173ba0

View File

@@ -195,6 +195,15 @@ export class DOMWidgetImpl<T extends HTMLElement, V extends object | string>
/** 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?.() ??