summaryrefslogtreecommitdiff
path: root/frontend/src/util/timeline.js
diff options
context:
space:
mode:
authorGeorgios Andreadis <info@gandreadis.com>2020-07-02 18:39:28 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2020-08-24 19:47:21 +0200
commitf119fc78dda4d1e828dde04f378a63a93e3a0a7e (patch)
treebea1eace5d47f21a7ccb835c6a6079bc92e48710 /frontend/src/util/timeline.js
parent7f27a6370a0af25e1bf6ff8f46360c6c26c21e0b (diff)
Add current progress on frontend port
Diffstat (limited to 'frontend/src/util/timeline.js')
-rw-r--r--frontend/src/util/timeline.js14
1 files changed, 2 insertions, 12 deletions
diff --git a/frontend/src/util/timeline.js b/frontend/src/util/timeline.js
index 21258e23..7c8a3ef0 100644
--- a/frontend/src/util/timeline.js
+++ b/frontend/src/util/timeline.js
@@ -2,18 +2,8 @@ export function convertTickToPercentage(tick, maxTick) {
if (maxTick === 0) {
return '0%'
} else if (tick > maxTick) {
- return maxTick / (maxTick + 1) * 100 + '%'
+ return (maxTick / (maxTick + 1)) * 100 + '%'
}
- return tick / (maxTick + 1) * 100 + '%'
-}
-
-export function getDatacenterIdOfTick(tick, sections) {
- for (let i in sections.reverse()) {
- if (tick >= sections[i].startTick) {
- return sections[i].datacenterId
- }
- }
-
- return -1
+ return (tick / (maxTick + 1)) * 100 + '%'
}