add check

This commit is contained in:
Joeri Exelmans 2025-10-19 15:15:05 +02:00
parent 5e60b3dc95
commit 5bd886b930

View file

@ -172,6 +172,7 @@ export function TopPanel({rt, rtIdx, time, setTime, onInit, onClear, onRaise, on
function onSkip() { function onSkip() {
const now = performance.now(); const now = performance.now();
if (nextTimedTransition) {
setTime(time => { setTime(time => {
if (time.kind === "paused") { if (time.kind === "paused") {
return {kind: "paused", simtime: nextTimedTransition[0]}; return {kind: "paused", simtime: nextTimedTransition[0]};
@ -181,6 +182,7 @@ export function TopPanel({rt, rtIdx, time, setTime, onInit, onClear, onRaise, on
} }
}); });
} }
}
function onSlower() { function onSlower() {
onTimeScaleChange((timescale/2).toString(), performance.now()); onTimeScaleChange((timescale/2).toString(), performance.now());