浏览代码

change literal to config var

master
The Dod 1 天前
父节点
当前提交
28438294b8
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      templates/progbar.html

+ 1
- 1
templates/progbar.html 查看文件

34
     async function updateDistance() {
34
     async function updateDistance() {
35
       var dist = await getDistance();
35
       var dist = await getDistance();
36
       var bar = document.getElementById("distance-bar");
36
       var bar = document.getElementById("distance-bar");
37
-      var percentage = dist>2000 ? 100 : parseInt((100.0*dist)/MAX_DISTANCE);
37
+      var percentage = dist>MAX_DISTANCE ? 100 : parseInt((100.0*dist)/MAX_DISTANCE);
38
       bar.style.width=`${percentage}%`;
38
       bar.style.width=`${percentage}%`;
39
       bar.textContent = dist;
39
       bar.textContent = dist;
40
     }
40
     }

正在加载...
取消
保存