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.
This commit is contained in:
gator 2026-09-15 02:06:51 +00:00
parent 4292624eda
commit 10c1541dbc

View file

@ -258,7 +258,12 @@ function render(r) {
document.getElementById("sub").textContent = s.premise || ""; document.getElementById("sub").textContent = s.premise || "";
var stage = stageOf(p.status); 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 // Shot controls belong to the layout stage. Elsewhere the shots are shown
// but not touchable, which is what "locked" means to shotHtml. // but not touchable, which is what "locked" means to shotHtml.
var locked = VIEW !== 2; var locked = VIEW !== 2;