Fix sequence prompt text field heights
tests / windows-storage (push) Canceled after 0s
tests / test (push) Canceled after 0s

This commit is contained in:
2026-10-16 12:02:25 +00:00
parent 291c0d7f96
commit 7255088c79
+16
View File
@@ -2,6 +2,11 @@ import { app } from "../../scripts/app.js";
const CLASS = "DumasH3SequencePromptBuilder";
const MAX_CLIPS = 16;
const FIXED_TEXT_WIDGETS = [
["shared_directive", 84],
["soundscape", 60],
["music", 60],
];
const DURATION_OPTIONS = [
["1–5", 5, 2, 0.21], ["6–22", 22, 7, 0.92], ["23–39", 39, 12, 1.63],
["40–56", 56, 17, 2.33], ["57–73", 73, 22, 3.04], ["74–90", 90, 27, 3.75],
@@ -58,6 +63,17 @@ function configure(node) {
if (!countWidget || !secondsWidget || !stateWidget) return;
hide(secondsWidget);
hide(stateWidget);
FIXED_TEXT_WIDGETS.forEach(([name, height]) => {
const widget = get(node, name);
if (!widget) return;
widget.options ||= {};
widget.options.multiline = true;
widget.__dumasFixedHeight = height;
widget.computeSize = (width) => [
Math.max(300, Number(width) || Number(node.size?.[0]) || 420),
height,
];
});
const panel = el("div");
panel.style.cssText = "box-sizing:border-box;position:relative;width:calc(100% + 14px);margin-left:-7px;min-width:420px;padding:9px;color:#d9e3dc;background:#292929;border:1px solid #454545;border-radius:4px;font:12px Arial;pointer-events:auto";
const host = el("div"); host.style.cssText = "box-sizing:border-box;pointer-events:auto;background:#292929;width:100%"; host.append(panel);