From 2babd3635de1d7e0318aead936e8b6b3eb83e545 Mon Sep 17 00:00:00 2001 From: Chris Dumas Date: Thu, 15 Oct 2026 09:45:42 +0000 Subject: [PATCH] Trim DOM widget vertical wrapper padding --- web/sequence_prompt_builder.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/sequence_prompt_builder.js b/web/sequence_prompt_builder.js index 19f8ec7..3df1ff5 100644 --- a/web/sequence_prompt_builder.js +++ b/web/sequence_prompt_builder.js @@ -261,7 +261,10 @@ function configure(node) { // the old slot-count estimate left a large blank tail in the node. // Measure the actual DOM panel instead of guessing from slot count. const panelHeight = Math.ceil(panel.getBoundingClientRect().height || panel.scrollHeight || 0); - display.computeSize = (width) => [Math.max(420, Number(width) || 420), panelHeight + 2]; + // LiteGraph adds roughly 7px above and below a DOM widget wrapper; + // those pixels are not part of the panel and otherwise appear as a + // vertical tail beneath/around the editor. + display.computeSize = (width) => [Math.max(420, Number(width) || 420), Math.max(0, panelHeight - 14)]; }; const refresh = () => { state = readState(stateWidget, Number(countWidget.value) || 2, Number(secondsWidget.value) || 4); render(); setState(); }; countWidget.callback = ((previous) => function(...args) { const result = previous?.apply(this, args); refresh(); return result; })(countWidget.callback);