refactor: continue roll

This commit is contained in:
Carlos Valente
2024-05-29 13:25:33 +02:00
committed by Carlos Valente
parent ec55236eb2
commit a53d354b16
2 changed files with 18 additions and 14 deletions
+3 -2
View File
@@ -434,10 +434,11 @@ export function update(): UpdateResult {
}
export function roll(rundown: OntimeEvent[]) {
const selectedEventIndex = runtimeState.runtime.selectedEventIndex;
clear();
runtimeState.runtime.numEvents = rundown.length;
const { nextEvent, currentEvent } = getRollTimers(rundown, runtimeState.clock);
const { nextEvent, currentEvent } = getRollTimers(rundown, runtimeState.clock, selectedEventIndex);
if (currentEvent) {
// there is something running, load