From a53080cda003e7821f6cf1f55b73600daf7519e8 Mon Sep 17 00:00:00 2001 From: Ariel Costas Guerrero Date: Fri, 14 Nov 2025 20:06:33 +0100 Subject: Fix map markers --- src/frontend/app/components/StopMapSheet.tsx | 4 ++-- src/frontend/app/data/LineColors.ts | 5 +++-- src/frontend/app/routes/stops-$id.tsx | 19 ++++++++----------- 3 files changed, 13 insertions(+), 15 deletions(-) (limited to 'src/frontend') diff --git a/src/frontend/app/components/StopMapSheet.tsx b/src/frontend/app/components/StopMapSheet.tsx index a0d30f4..2dc85db 100644 --- a/src/frontend/app/components/StopMapSheet.tsx +++ b/src/frontend/app/components/StopMapSheet.tsx @@ -145,7 +145,7 @@ export const StopMap: React.FC = ({ height: 14, background: "#1976d2", border: "2px solid white", - borderRadius: "50%", + borderRadius: "5%", boxShadow: "0 0 0 2px rgba(0,0,0,0.2)", }} title={`Stop ${stop.stopId}`} @@ -165,7 +165,6 @@ export const StopMap: React.FC = ({ anchor="center" >
= ({ lineHeight: 1, border: "1px solid #fff", boxShadow: "0 1px 2px rgba(0,0,0,0.3)", + transform: `rotate(${-p.orientationDegrees}deg)`, }} > {c.line} diff --git a/src/frontend/app/data/LineColors.ts b/src/frontend/app/data/LineColors.ts index 00ed890..0d23211 100644 --- a/src/frontend/app/data/LineColors.ts +++ b/src/frontend/app/data/LineColors.ts @@ -88,10 +88,11 @@ export function getLineColor( region: RegionId, line: string, ): LineColorInfo { - const formattedLine = /^[a-zA-Z]/.test(line) ? line : `L${line}`; + let formattedLine = /^[a-zA-Z]/.test(line) ? line : `L${line}`; + formattedLine = formattedLine.toLowerCase().trim(); if (region === "vigo") { - return vigoLineColors[formattedLine] ?? defaultLineColor; + return vigoLineColors[formattedLine.toLowerCase().trim()] ?? defaultLineColor; } else if (region === "santiago") { return santiagoLineColors[formattedLine] ?? defaultLineColor; } diff --git a/src/frontend/app/routes/stops-$id.tsx b/src/frontend/app/routes/stops-$id.tsx index 92d76a3..30a8d1b 100644 --- a/src/frontend/app/routes/stops-$id.tsx +++ b/src/frontend/app/routes/stops-$id.tsx @@ -213,10 +213,7 @@ export default function Estimates() { } return ( - + <>

@@ -251,12 +248,6 @@ export default function Estimates() {

)} -
- - {t("estimates.experimental_feature", "Experimental feature")} - -
- {(isManualRefreshing || dataLoading) && (
@@ -268,6 +259,12 @@ export default function Estimates() {
+
+ + {t("estimates.experimental_feature", "Experimental feature")} + +
+
{dataLoading ? ( @@ -304,6 +301,6 @@ export default function Estimates() { )}
- + ); } -- cgit v1.3