aboutsummaryrefslogtreecommitdiff
path: root/modern/src/other
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-06-15 18:33:07 -0700
committerAnton Tananaev <anton@traccar.org>2022-06-15 18:33:07 -0700
commitc407acaadc5dadbc7db917a11c8294aa7710b2cc (patch)
tree48d1463cfd9405293afaf66c93059cd942a68593 /modern/src/other
parentdaea8361ee612f8cdd0723e24b74d07afd564170 (diff)
downloadtrackermap-web-c407acaadc5dadbc7db917a11c8294aa7710b2cc.tar.gz
trackermap-web-c407acaadc5dadbc7db917a11c8294aa7710b2cc.tar.bz2
trackermap-web-c407acaadc5dadbc7db917a11c8294aa7710b2cc.zip
Fix replay limits (fix #963)
Diffstat (limited to 'modern/src/other')
-rw-r--r--modern/src/other/ReplayPage.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/modern/src/other/ReplayPage.js b/modern/src/other/ReplayPage.js
index fb6e00a5..fdd78765 100644
--- a/modern/src/other/ReplayPage.js
+++ b/modern/src/other/ReplayPage.js
@@ -182,13 +182,13 @@ const ReplayPage = () => {
/>
<div className={classes.controls}>
{`${index + 1}/${positions.length}`}
- <IconButton onClick={() => setIndex((index) => index - 1)} disabled={playing}>
+ <IconButton onClick={() => setIndex((index) => index - 1)} disabled={playing || index <= 0}>
<FastRewindIcon />
</IconButton>
- <IconButton onClick={() => setPlaying(!playing)}>
+ <IconButton onClick={() => setPlaying(!playing)} disabled={index >= positions.length - 1}>
{playing ? <PauseIcon /> : <PlayArrowIcon /> }
</IconButton>
- <IconButton onClick={() => setIndex((index) => index + 1)} disabled={playing}>
+ <IconButton onClick={() => setIndex((index) => index + 1)} disabled={playing || index >= positions.length - 1}>
<FastForwardIcon />
</IconButton>
{formatTime(positions[index].fixTime)}