aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorKristian Lyngstol <kly@kly.no>2018-12-02 02:18:52 +0100
committerKristian Lyngstol <kly@kly.no>2018-12-02 02:18:52 +0100
commit7f5654c3fb0569ec984f163a06c7e53eefec8113 (patch)
tree4d79ffd4aad431075df678cf20de376f9c7ea302 /web
parent2b10a9e55a417fbd0eb8e248ef8edceab1d794bb (diff)
front: Tweak format of time stamp during travel
Seeing the day helps immensly, and the rather ugly translate-code avoids overlap
Diffstat (limited to 'web')
-rw-r--r--web/js/nms-map.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/web/js/nms-map.js b/web/js/nms-map.js
index 1ebcf92..5927324 100644
--- a/web/js/nms-map.js
+++ b/web/js/nms-map.js
@@ -218,7 +218,7 @@ nmsMap.drawNow = function ()
} else {
now = new Date(nmsData.now); //Date assumes UTC
}
- now = now.toString().split(' ').splice(1,4).join(' '); //Date returns local time
+ now = now.toString().split(' ').splice(0,5).join(' '); //Date returns local time
if (nmsMap._lastNow == now) {
nmsMap.stats.nowDups++;
return;
@@ -231,6 +231,7 @@ nmsMap.drawNow = function ()
ctx.clearRect(0,0,800,100);
ctx.fillStyle = "white";
ctx.strokeStyle = "black";
+ ctx.translate(200,0);
ctx.lineWidth = nms.fontLineFactor;
ctx.strokeText(now, this._settings.textMargin, 25);
ctx.fillText(now, this._settings.textMargin, 25);