From 7566184d9d347214ac3e6e17a5428641d448aacb Mon Sep 17 00:00:00 2001 From: sophiamersmann Date: Mon, 15 Apr 2024 12:18:14 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20(timeline)=20show=20current=20ti?= =?UTF-8?q?me=20point=20correctly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/timeline/TimelineComponent.tsx | 20 +++++++++---------- .../src/timeline/TimelineController.ts | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/@ourworldindata/grapher/src/timeline/TimelineComponent.tsx b/packages/@ourworldindata/grapher/src/timeline/TimelineComponent.tsx index 3b6d5fb9283..d1accd58f6e 100644 --- a/packages/@ourworldindata/grapher/src/timeline/TimelineComponent.tsx +++ b/packages/@ourworldindata/grapher/src/timeline/TimelineComponent.tsx @@ -5,7 +5,6 @@ import { isMobile, debounce, Bounds, - timeFromTimebounds, DEFAULT_BOUNDS, } from "@ourworldindata/utils" import { observable, computed, action } from "mobx" @@ -314,18 +313,19 @@ export class TimelineComponent extends React.Component<{ render(): JSX.Element { const { manager, controller } = this - const { startTimeProgress, endTimeProgress, minTime, maxTime } = - controller - const { startHandleTimeBound, endHandleTimeBound } = manager + const { + startTimeProgress, + endTimeProgress, + minTime, + maxTime, + startTime, + endTime, + } = controller const formattedMinTime = this.formatTime(minTime) const formattedMaxTime = this.formatTime(maxTime) - const formattedStartTime = this.formatTime( - timeFromTimebounds(startHandleTimeBound, minTime, maxTime) - ) - const formattedEndTime = this.formatTime( - timeFromTimebounds(endHandleTimeBound, minTime, maxTime) - ) + const formattedStartTime = this.formatTime(startTime) + const formattedEndTime = this.formatTime(endTime) return (