ctucx.git: trainsearch

web based trip-planner, fork of https://cyberchaos.dev/yuka/trainsearch

commit 815911026e89d637a0233bede4983244eaa5bd3a
parent 98fb0e041284aa4851344c2c5d79b3fc5cca40a9
Author: Yureka <yuka@yuka.dev>
Date: Fri, 24 Dec 2021 09:18:02 +0100

fix drawing of yellow line in canvas
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/client/src/canvas.js b/client/src/canvas.js
@@ -178,7 +178,7 @@ const renderJourneys = () => {
 		time = new Date(Number(time) + 3600000);//Math.floor(120/scaleFactor));
 	}
 	ctx.fillStyle = '#fa5';
-	y = (new Date() / 1000 - firstDeparture) * scaleFactor + 32;
+	y = (new Date() - firstDeparture) * scaleFactor + 32;
 	ctx.fillRect(0, y-2, canvas.width / dpr, 5);
 
 	const p = new Path2D('M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z');