diff --git a/web/sequence_prompt_builder.js b/web/sequence_prompt_builder.js index 0567ecf..e15a112 100644 --- a/web/sequence_prompt_builder.js +++ b/web/sequence_prompt_builder.js @@ -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);