From 10c1541dbc7cc6787ef9caf476b641660f364993 Mon Sep 17 00:00:00 2001 From: gator Date: Tue, 15 Sep 2026 02:06:51 +0000 Subject: [PATCH] Clamp the view to what the stepper allows, not to the stage Making step 3 clickable was not enough: render clamped VIEW back down to the project's stage on every draw, so the click set VIEW = 3 and the redraw immediately put it back to 2. The Filming panel stayed unreachable. --- script.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/script.html b/script.html index 1c5ff74..9e8705b 100644 --- a/script.html +++ b/script.html @@ -258,7 +258,12 @@ function render(r) { document.getElementById("sub").textContent = s.premise || ""; var stage = stageOf(p.status); - if (VIEW === null || VIEW > stage) VIEW = stage; + // Clamp to what the stepper actually allows, not to the stage. These differ + // for an approved project: it sits at stage 2 but must be able to reach the + // Filming panel, which is where the button to start filming lives. Clamping + // to stage undid the click on every redraw. + var reach = reachOf(p.status); + if (VIEW === null || VIEW > reach) VIEW = Math.min(stage, reach); // Shot controls belong to the layout stage. Elsewhere the shots are shown // but not touchable, which is what "locked" means to shotHtml. var locked = VIEW !== 2;