From 0439ccf76f9ccf68c7572deadf38d6a157c439e7 Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Thu, 21 Sep 2017 15:10:15 +0200 Subject: Implement last-simulated-tick and states fetching --- src/components/timeline/TimelineControlsComponent.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/components/timeline/TimelineControlsComponent.js') diff --git a/src/components/timeline/TimelineControlsComponent.js b/src/components/timeline/TimelineControlsComponent.js index 3f37c3bc..2e093583 100644 --- a/src/components/timeline/TimelineControlsComponent.js +++ b/src/components/timeline/TimelineControlsComponent.js @@ -5,10 +5,10 @@ function getXPercentage(tick, maxTick) { if (maxTick === 0) { return "0%"; } else if (tick > maxTick) { - return "100%"; + return ((maxTick / (maxTick + 1)) * 100) + "%"; } - return (tick / maxTick) + "%"; + return ((tick / (maxTick + 1)) * 100) + "%"; } const TimelineControlsComponent = ({currentTick, lastSimulatedTick, sectionTicks}) => ( -- cgit v1.2.3