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:
parent
4292624eda
commit
10c1541dbc
1 changed files with 6 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue