Show correct times

This commit is contained in:
Nicolas Mowen 2024-02-02 10:29:18 -07:00
parent 4b0de0015f
commit b54bdd6b64

View File

@ -154,6 +154,10 @@ export default function DesktopTimelineView({
const isSelected = const isSelected =
timeline.range.start == selectedPlayback.range.start; timeline.range.start == selectedPlayback.range.start;
const graphData = timelineGraphData[timeline.range.start]; const graphData = timelineGraphData[timeline.range.start];
const start = new Date(timeline.range.start * 1000);
const end = new Date(
Math.min(timeline.range.end * 1000, new Date().getTime())
);
return ( return (
<div <div
@ -178,10 +182,10 @@ export default function DesktopTimelineView({
} }
options={{ options={{
snap: null, snap: null,
min: new Date(timeline.range.start * 1000), min: start,
max: new Date(timeline.range.end * 1000), max: end,
start: new Date(timeline.range.start * 1000), start: start,
end: new Date(timeline.range.end * 1000), end: end,
zoomable: false, zoomable: false,
height: "120px", height: "120px",
}} }}