Skip to content

Commit

Permalink
Merge pull request #1076 from opentripplanner/support-no-route-view-m…
Browse files Browse the repository at this point in the history
…ode-icons

Support hiding mode icons in route viewer
  • Loading branch information
miles-grant-ibigroup authored Nov 28, 2023
2 parents c02ac29 + 01fcffa commit 50bbe82
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions example-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ itinerary:
# BUS: # Any OTP mode
# color: 00FF00 # HEX color without the # (like GTFS)
# textColor: FFFFFF # HEX color without the # (like GTFS)
# routeIcons: false # If set to false, no mode icons in the route viewer
# - feedId: TriMet
# agencyId: TRIMET
# name: TriMet
Expand Down
2 changes: 1 addition & 1 deletion lib/components/viewers/RouteRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export class RouteRow extends PureComponent {
>
<RouteDetailsContainer>
<OperatorLogo operator={operator} />
{route.mode && (
{route.mode && operator.routeIcons !== false && (
<ModeIconElement>
<ModeIcon
aria-label={getFormattedMode(
Expand Down
1 change: 1 addition & 0 deletions lib/util/config-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ export interface ModeColorConfig {
export interface TransitOperatorConfig extends TransitOperator {
colorMode?: 'gtfs' | 'gtfs-softened' | 'disabled'
modeColors?: Record<string, ModeColorConfig>
routeIcons?: boolean
}

/** Route Viewer config */
Expand Down

0 comments on commit 50bbe82

Please sign in to comment.