diff --git a/mapper/src/App.js b/mapper/src/App.js index 2174ac5..755e47a 100644 --- a/mapper/src/App.js +++ b/mapper/src/App.js @@ -436,8 +436,8 @@ function Menu({data, duration, setDuration, end, setEnd, slider, setSlider, subm const endUnix = moment(longestSegment.end).unix(); const endOfWindowUnix = end.unix(); - const newSliderStart = Math.round((startUnix - endOfWindowUnix) / duration.secs + duration.num); - const newSliderEnd = Math.round((endUnix - endOfWindowUnix) / duration.secs + duration.num); + const newSliderStart = Math.floor((startUnix - endOfWindowUnix) / duration.secs + duration.num); + const newSliderEnd = Math.ceil((endUnix - endOfWindowUnix) / duration.secs + duration.num); const clampedStart = Math.max(0, newSliderStart); const clampedEnd = Math.min(duration.num, newSliderEnd);