Explorar el Código

change literal to config var

master
The Dod hace 1 día
padre
commit
28438294b8
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1
    1
      templates/progbar.html

+ 1
- 1
templates/progbar.html Ver fichero

@@ -34,7 +34,7 @@
34 34
     async function updateDistance() {
35 35
       var dist = await getDistance();
36 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 38
       bar.style.width=`${percentage}%`;
39 39
       bar.textContent = dist;
40 40
     }

Loading…
Cancelar
Guardar