From 38fbae99fd4f2f4ab176b6192171df6ebc3aaf9b Mon Sep 17 00:00:00 2001 From: Will Miao <13051207myq@gmail.com> Date: Sat, 26 Apr 2025 12:00:36 +0800 Subject: [PATCH] feat: limit maximum height of loras widget to accommodate up to 5 entries. Fixes https://github.com/willmiao/ComfyUI-Lora-Manager/issues/109 --- web/comfyui/loras_widget.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/comfyui/loras_widget.js b/web/comfyui/loras_widget.js index a5210234..242d37ed 100644 --- a/web/comfyui/loras_widget.js +++ b/web/comfyui/loras_widget.js @@ -900,7 +900,7 @@ export function addLorasWidget(node, name, opts, callback) { }); // Calculate height based on number of loras and fixed sizes - const calculatedHeight = CONTAINER_PADDING + HEADER_HEIGHT + (lorasData.length * LORA_ENTRY_HEIGHT); + const calculatedHeight = CONTAINER_PADDING + HEADER_HEIGHT + (Math.min(lorasData.length, 5) * LORA_ENTRY_HEIGHT); updateWidgetHeight(calculatedHeight); };