summaryrefslogtreecommitdiff
path: root/src/scripts/controllers/simulation/timeline.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/scripts/controllers/simulation/timeline.ts')
-rw-r--r--src/scripts/controllers/simulation/timeline.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/scripts/controllers/simulation/timeline.ts b/src/scripts/controllers/simulation/timeline.ts
index a558afe1..950973a9 100644
--- a/src/scripts/controllers/simulation/timeline.ts
+++ b/src/scripts/controllers/simulation/timeline.ts
@@ -153,9 +153,9 @@ export class TimelineController {
let correction = 0;
if (this.timeUnitFraction * this.timelineWidth > this.timeMarkerWidth) {
correction = (this.timeUnitFraction * this.timelineWidth - this.timeMarkerWidth) *
- (tick / this.simulationController.lastSimulatedTick);
+ ((tick - 1) / this.simulationController.lastSimulatedTick);
}
- return (100 * (this.timeUnitFraction * tick + correction / this.timelineWidth)) + "%";
+ return (100 * (this.timeUnitFraction * (tick - 1) + correction / this.timelineWidth)) + "%";
}
-} \ No newline at end of file
+}