Skip to content

Commit

Permalink
Merge pull request #807 from opentripplanner/transit-overlay-ui-fix
Browse files Browse the repository at this point in the history
Fix transit overlay highlight color
  • Loading branch information
AdrianaCeric authored Mar 3, 2023
2 parents cf978a4 + efea50e commit 4932e0c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/components/map/connected-transit-vehicle-overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,10 @@ const mapStateToProps = (state) => {
if (viewedRoute?.routeId) {
vehicleList = route?.vehicles?.map((vehicle) => {
vehicle.routeType = route?.mode
vehicle.routeColor = route?.color
vehicle.routeColor =
route.color && !route.color.includes('#')
? '#' + route.color
: route?.color || '#5A5A5A'
// Try to populate this attribute, which is required for the vehicle popup to appear.
vehicle.routeShortName = vehicle.routeShortName || route?.shortName
vehicle.textColor = route?.routeTextColor
Expand Down

0 comments on commit 4932e0c

Please sign in to comment.