ctucx.git: oeffisearch

[nimlang] fast and simple tripplanner

commit c4c3a3ab458546f77291c120326b9f62b984d6bc
parent ff2320d0f2c31d02b2f380df4297d661b994ffe4
Author: Milan Pässler <me@pbb.lc>
Date: Fri, 7 Feb 2020 19:15:40 +0100

client/canvas: mark cancelled legs
1 file changed, 11 insertions(+), 0 deletions(-)
M
client/js/canvas.js
|
11
+++++++++++
diff --git a/client/js/canvas.js b/client/js/canvas.js
@@ -222,6 +222,17 @@ const renderJourneys = () => {
 				ctx.scale(dpr, dpr);
 			}
 
+			if (leg.cancelled) {
+				ctx.shadowBlur = 5;
+				ctx.strokeStyle = '#cc4444ff';
+				ctx.lineWidth = 5;
+				ctx.beginPath();
+				ctx.moveTo(x, y);
+				ctx.lineTo(x + rectWidth, y + duration);
+				ctx.stroke();
+				ctx.lineWidth = 1;
+			}
+
 			/* draw journey start and end time */
 			let time;
 			// note: leg order is reversed at this point in time