From c4c3a3ab458546f77291c120326b9f62b984d6bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20P=C3=A4ssler?= Date: Fri, 7 Feb 2020 19:15:40 +0100 Subject: [PATCH] client/canvas: mark cancelled legs --- client/js/canvas.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/client/js/canvas.js b/client/js/canvas.js index 5c4f60b..ca8f7ac 100644 --- 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