Skip to content

Commit

Permalink
[BugFix] Set height to 0 for hidden widgets on GroupNode (#2566)
Browse files Browse the repository at this point in the history
  • Loading branch information
huchenlei authored Feb 15, 2025
1 parent bcedd5f commit acea173
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/scripts/domWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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?.() ??
Expand Down

0 comments on commit acea173

Please sign in to comment.