From f59c15b4a0f17aba552baba5d90a6be0680a615d Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Sun, 27 Jul 2025 16:57:44 +0200 Subject: journey: Fix route highlighting Polyline is still wrong --- templates/journey.html.ep | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'templates') diff --git a/templates/journey.html.ep b/templates/journey.html.ep index 09ce159..f9c78ec 100644 --- a/templates/journey.html.ep +++ b/templates/journey.html.ep @@ -257,11 +257,12 @@ % my $before = 1; % my $within = 0; % my $at_startstop = 0; + % my $i = 0; % for my $station (@{$journey->{route}}) { - % if (($station->[1] and $station->[1] == $journey->{from_eva}) or $station->[0] eq $journey->{from_name}) { + % if ($i == $journey->{route_dep_index}) { % $within = 1; $at_startstop = 1; % } - % elsif (($station->[1] and $station->[1] == $journey->{to_eva}) or $station->[0] eq $journey->{to_name}) { + % elsif ($i == $journey->{route_arr_index}) { % $within = 0; $at_startstop = 1; % } % else { @@ -298,6 +299,7 @@ % $before = 0; % }
+ % $i += 1; % } -- cgit v1.2.3