From 758f5ce381605eef1fe76bdd1c73c86b0e7db8da 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 a061a9a527c..830b0115403 100644 --- a/packages/@ourworldindata/grapher/src/timeline/TimelineComponent.tsx +++ b/packages/@ourworldindata/grapher/src/timeline/TimelineComponent.tsx @@ -6,7 +6,6 @@ import { isMobile, debounce, Bounds, - timeFromTimebounds, DEFAULT_BOUNDS, } from "@ourworldindata/utils" import { observable, computed, action } from "mobx" @@ -317,18 +316,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 (