From 7f5654c3fb0569ec984f163a06c7e53eefec8113 Mon Sep 17 00:00:00 2001 From: Kristian Lyngstol Date: Sun, 2 Dec 2018 02:18:52 +0100 Subject: front: Tweak format of time stamp during travel Seeing the day helps immensly, and the rather ugly translate-code avoids overlap --- web/js/nms-map.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'web/js/nms-map.js') 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); -- cgit v1.2.3