From de7d9e45b9b9b1edbe45898d6249195715722ce6 Mon Sep 17 00:00:00 2001 From: "Tanner Collin (aider)" Date: Fri, 15 Aug 2025 02:43:22 +0000 Subject: [PATCH] fix: correct rounding for exclude area slider calculation --- mapper/src/App.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);