diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2020-11-03 15:10:11 -0800 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2020-11-03 15:10:11 -0800 |
commit | 5e96fe64b49bb857fef1a2ac4d6522db332a89a0 (patch) | |
tree | 11a92950231c9b379a3e779c41e676493d785918 /modern/src/reports | |
parent | 155e3b90365994a4bfbf3b43505f0452fb3fe88a (diff) | |
download | trackermap-web-5e96fe64b49bb857fef1a2ac4d6522db332a89a0.tar.gz trackermap-web-5e96fe64b49bb857fef1a2ac4d6522db332a89a0.tar.bz2 trackermap-web-5e96fe64b49bb857fef1a2ac4d6522db332a89a0.zip |
Add current location
Diffstat (limited to 'modern/src/reports')
-rw-r--r-- | modern/src/reports/ReplayPage.js | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/modern/src/reports/ReplayPage.js b/modern/src/reports/ReplayPage.js index 2afa1a2f..6b84d4d9 100644 --- a/modern/src/reports/ReplayPage.js +++ b/modern/src/reports/ReplayPage.js @@ -76,19 +76,20 @@ const ReplayPage = () => { } </Map> <Container maxWidth="sm" className={classes.controlPanel}> - <Paper className={classes.controlContent}> - <Slider - disabled={!positions.length} - max={positions.length - 1} - step={null} - marks={positions.map((_, index) => ({ value: index }))} - value={index} - onChange={(_, index) => setIndex(index)} - valueLabelDisplay="auto" - valueLabelFormat={i => i < positions.length ? formatPosition(positions[i], 'fixTime') : ''} - ValueLabelComponent={TimeLabel} - /> - </Paper> + {!!positions.length && + <Paper className={classes.controlContent}> + <Slider + max={positions.length - 1} + step={null} + marks={positions.map((_, index) => ({ value: index }))} + value={index} + onChange={(_, index) => setIndex(index)} + valueLabelDisplay="auto" + valueLabelFormat={i => i < positions.length ? formatPosition(positions[i], 'fixTime') : ''} + ValueLabelComponent={TimeLabel} + /> + </Paper> + } <div> <Accordion expanded={expanded} onChange={() => setExpanded(!expanded)}> <AccordionSummary expandIcon={<ExpandMoreIcon />}> |