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);