From ec4cb40fcc961de820984ce7de14a46eb59fa8ce Mon Sep 17 00:00:00 2001 From: bwees Date: Tue, 30 Jan 2024 13:25:13 -0600 Subject: [PATCH 1/2] transparent stop markers when route is deselected --- app/components/map/MapView.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/components/map/MapView.tsx b/app/components/map/MapView.tsx index 8e4310a..c3873e6 100644 --- a/app/components/map/MapView.tsx +++ b/app/components/map/MapView.tsx @@ -8,6 +8,7 @@ import { GetVehiclesResponseSchema, IGetVehiclesResponse, IMapRoute, IVehicle } import useAppStore from "../../stores/useAppStore"; import BusMarker from "./markers/BusMarker"; import StopMarker from "./markers/StopMarker"; +import { getLighterColor } from "../../utils"; const Map: React.FC = () => { const mapViewRef = useRef(null); @@ -236,8 +237,12 @@ const Map: React.FC = () => { patternPath.patternPoints.map((patternPoint, index2) => { const stop = patternPoint.stop - if (stop && patternPath.directionKey === selectedRouteDirection) { - const lineColor = selectedRoute?.directionList[0]?.lineColor ?? "#FFFF"; + if (stop) { + var lineColor = selectedRoute?.directionList[0]?.lineColor ?? "#FFFF"; + + if (patternPath.directionKey !== selectedRouteDirection) { + lineColor = lineColor + "70"; + } return ( Date: Tue, 30 Jan 2024 13:25:39 -0600 Subject: [PATCH 2/2] no unused imports --- app/components/map/MapView.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/app/components/map/MapView.tsx b/app/components/map/MapView.tsx index c3873e6..50232dd 100644 --- a/app/components/map/MapView.tsx +++ b/app/components/map/MapView.tsx @@ -8,7 +8,6 @@ import { GetVehiclesResponseSchema, IGetVehiclesResponse, IMapRoute, IVehicle } import useAppStore from "../../stores/useAppStore"; import BusMarker from "./markers/BusMarker"; import StopMarker from "./markers/StopMarker"; -import { getLighterColor } from "../../utils"; const Map: React.FC = () => { const mapViewRef = useRef(null);