diff --git a/lib/actions/apiV2.js b/lib/actions/apiV2.js index a4a9d6690..bbc9cc15d 100644 --- a/lib/actions/apiV2.js +++ b/lib/actions/apiV2.js @@ -705,10 +705,6 @@ export const findRoute = (params) => newRoute.patterns = routePatterns // TODO: avoid explicit behavior shift like this newRoute.v2 = true - newRoute.color = getRouteColorBasedOnSettings( - getRouteOperator(route, getState().otp.config.transitOperators), - route - ).split('#')[1] newRoute.mode = checkForRouteModeOverride( newRoute, getState().otp.config?.routeModeOverrides @@ -757,14 +753,12 @@ export function findRoutes() { // To initialize the route viewer, // convert the routes array to a dictionary indexed by route ids. return routes.reduce((result, route) => { - const { agency, id, longName, mode, shortName, type } = route + const { agency, color, id, longName, mode, shortName, type } = + route result[id] = { agencyId: agency.id, agencyName: agency.name, - color: getRouteColorBasedOnSettings( - getRouteOperator(route, config.transitOperators), - route - ).split('#')[1], + color, id, longName, mode: checkForRouteModeOverride( diff --git a/lib/components/viewers/RouteRow.js b/lib/components/viewers/RouteRow.js index 93ad0634a..8b794f7fe 100644 --- a/lib/components/viewers/RouteRow.js +++ b/lib/components/viewers/RouteRow.js @@ -65,6 +65,8 @@ const RouteDetailsContainer = styled.div` display: flex; gap: 12px; margin-left: 5px; + max-height: 180px; + min-height: 36px; overflow: hidden; ` diff --git a/lib/components/viewers/viewers.css b/lib/components/viewers/viewers.css index 5d4f4227b..5f9c9526a 100644 --- a/lib/components/viewers/viewers.css +++ b/lib/components/viewers/viewers.css @@ -96,6 +96,7 @@ gap: 10px; } .otp .route-viewer .header-text.route-expanded span { + height: 100%; margin: 0; padding: 0; } @@ -562,4 +563,4 @@ align-items: center; justify-content: center; padding-top: 10px; -} \ No newline at end of file +}