allow widget expand to fill available vertical space

This commit is contained in:
Terry Jia
2025-10-23 20:35:08 -04:00
parent 671e33cf09
commit 2c33e21390
3 changed files with 30 additions and 6 deletions

View File

@@ -102,6 +102,11 @@ export interface DOMWidgetOptions<V extends object | string>
*/
beforeResize?: (this: BaseDOMWidget<V>, node: LGraphNode) => void
afterResize?: (this: BaseDOMWidget<V>, node: LGraphNode) => void
/**
* Whether this widget needs vertical space (flex-1 layout).
* When true, the widget will expand to fill available vertical space.
*/
needsVerticalSpace?: boolean
}
export const isDOMWidget = <T extends HTMLElement, V extends object | string>(