From 58e9ac3cdaf3ff595027120a718732f8b7344b14 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 | 19 ++++++++++--------- .../src/timeline/TimelineController.ts | 4 ++-- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/packages/@ourworldindata/grapher/src/timeline/TimelineComponent.tsx b/packages/@ourworldindata/grapher/src/timeline/TimelineComponent.tsx index 3b6d5fb9283..dc3892efe12 100644 --- a/packages/@ourworldindata/grapher/src/timeline/TimelineComponent.tsx +++ b/packages/@ourworldindata/grapher/src/timeline/TimelineComponent.tsx @@ -314,18 +314,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 (