From f6985d9f70e7c376a33ebdbf82faf74b5f1b887f Mon Sep 17 00:00:00 2001 From: Raffson Date: Sat, 9 Mar 2024 19:16:01 +0100 Subject: [PATCH] Bring flight-plan to front if selected --- client/src/components/flightplan/FlightPlan.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/client/src/components/flightplan/FlightPlan.tsx b/client/src/components/flightplan/FlightPlan.tsx index ff5e36d3..103fa84c 100644 --- a/client/src/components/flightplan/FlightPlan.tsx +++ b/client/src/components/flightplan/FlightPlan.tsx @@ -46,7 +46,12 @@ function FlightPlanPath(props: FlightPlanProps) { // behind everything than was added before them. Anything added after always // goes on top. useEffect(() => { - polylineRef.current?.bringToBack(); + if (props.selected) { + polylineRef.current?.bringToFront(); + } + else { + polylineRef.current?.bringToBack(); + } }); if (waypoints == null) {