client/canvas: mark cancelled legs

This commit is contained in:
Milan Pässler 2020-02-07 19:15:40 +01:00
parent ff2320d0f2
commit c4c3a3ab45

View file

@ -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