[BugFix] Auto grow node if widgets need more space (#556)

This commit is contained in:
Chenlei Hu
2025-02-20 12:45:31 -05:00
committed by GitHub
parent 1dee497e40
commit dcac6dba80

View File

@@ -3374,6 +3374,15 @@ export class LGraphNode implements Positionable, IPinnable, IColorable {
w.y = y
y += w.computedHeight
}
// Grow the node if necessary.
// Ref: https://github.com/Comfy-Org/ComfyUI_frontend/issues/2652
// TODO: Move the layout logic before drawing of the node shape, so we don't
// need to trigger extra round of rendering.
if (y > bodyHeight) {
this.setSize([this.size[0], y])
this.graph.setDirtyCanvas(false, true)
}
}
/**