From db680c96adb62f185c15e21772de81dc21fc0e9f Mon Sep 17 00:00:00 2001 From: Chenlei Hu Date: Mon, 10 Mar 2025 14:31:50 -0400 Subject: [PATCH] [Bug] Fix node empty space on converted widget (#740) Resolves https://github.com/Comfy-Org/litegraph.js/issues/739 This is a temporary measurement to fix the issue. We should probably consider build a more robust layout mechanism later. --- src/LGraphNode.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LGraphNode.ts b/src/LGraphNode.ts index 1b273d409..fc95fb64d 100644 --- a/src/LGraphNode.ts +++ b/src/LGraphNode.ts @@ -1517,7 +1517,7 @@ export class LGraphNode implements Positionable, IPinnable, IColorable { const { inputs, outputs } = this let rows = Math.max( - inputs ? inputs.length : 1, + inputs ? inputs.filter(input => !isWidgetInputSlot(input)).length : 1, outputs ? outputs.length : 1, ) const size = out || new Float32Array([0, 0])