diff options
| author | Ariel Costas Guerrero <ariel@costas.dev> | 2025-12-25 02:10:25 +0100 |
|---|---|---|
| committer | Ariel Costas Guerrero <ariel@costas.dev> | 2025-12-25 02:10:25 +0100 |
| commit | 843cfb208849d652da16e943247057cf5a251254 (patch) | |
| tree | fc082f90ec7872c293aca5f9dc2dc998ff66d69d /src/frontend/app | |
| parent | 800fd816132c38617b2cc16f4eecf95f38d09841 (diff) | |
Fix shit with map
Diffstat (limited to 'src/frontend/app')
| -rw-r--r-- | src/frontend/app/components/shared/AppMap.tsx | 4 | ||||
| -rw-r--r-- | src/frontend/app/root.css | 9 | ||||
| -rw-r--r-- | src/frontend/app/routes/map.tsx | 10 |
3 files changed, 11 insertions, 12 deletions
diff --git a/src/frontend/app/components/shared/AppMap.tsx b/src/frontend/app/components/shared/AppMap.tsx index adf860d..2c8d097 100644 --- a/src/frontend/app/components/shared/AppMap.tsx +++ b/src/frontend/app/components/shared/AppMap.tsx @@ -144,7 +144,7 @@ export const AppMap = forwardRef<MapRef, AppMapProps>( } } }; - }, [syncState, updateMapState]); + }, [mapPositionMode, mapRef.current, updateMapState]); const getLatitude = (center: any) => Array.isArray(center) ? center[0] : center.lat; @@ -181,7 +181,7 @@ export const AppMap = forwardRef<MapRef, AppMapProps>( return ( <Map ref={mapRef} - mapLib={maplibregl as any} + mapLib={maplibregl} mapStyle={mapStyle} style={{ width: "100%", height: "100%", ...style }} initialViewState={viewState} diff --git a/src/frontend/app/root.css b/src/frontend/app/root.css index 8ac6bf1..9f79b08 100644 --- a/src/frontend/app/root.css +++ b/src/frontend/app/root.css @@ -47,8 +47,9 @@ color-scheme: light; --font-display: "Outfit Variable", ui-sans-serif, system-ui, sans-serif; - --font-ui: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", - "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + --font-ui: + ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", + "Segoe UI Symbol", "Noto Color Emoji"; font-family: var(--font-ui); } @@ -215,6 +216,6 @@ textarea { color: var(--ml-c-link-2); } -.maplibregl-ctrl-icon:before { - display: none; +.maplibregl-ctrl button .maplibregl-ctrl-icon:before { + display: none !important; } diff --git a/src/frontend/app/routes/map.tsx b/src/frontend/app/routes/map.tsx index 45dd935..a8c74b4 100644 --- a/src/frontend/app/routes/map.tsx +++ b/src/frontend/app/routes/map.tsx @@ -1,7 +1,7 @@ import StopDataProvider from "../data/StopDataProvider"; import "./map.css"; -import { useEffect, useRef, useState } from "react"; +import { useRef, useState } from "react"; import { useTranslation } from "react-i18next"; import { Layer, @@ -10,16 +10,14 @@ import { type MapRef, } from "react-map-gl/maplibre"; import { useNavigate } from "react-router"; -import { PlannerOverlay } from "~/components/PlannerOverlay"; -import { AppMap } from "~/components/shared/AppMap"; import { StopSummarySheet, type StopSheetProps, } from "~/components/map/StopSummarySheet"; -import { APP_CONSTANTS } from "~/config/constants"; +import { PlannerOverlay } from "~/components/PlannerOverlay"; +import { AppMap } from "~/components/shared/AppMap"; import { usePageTitle } from "~/contexts/PageTitleContext"; import { usePlanner } from "~/hooks/usePlanner"; -import { useApp } from "../AppContext"; import "../tailwind-full.css"; // Componente principal del mapa @@ -142,7 +140,7 @@ export default function StopMap() { "stop-renfe", "feve", "stop-feve", - "#stop-generic", + "stop-generic", ], "icon-size": [ "interpolate", |
