Bring flight-plan to front if selected

This commit is contained in:
Raffson 2024-03-09 19:16:01 +01:00
parent eb6afbdf02
commit f6985d9f70
No known key found for this signature in database
GPG Key ID: B0402B2C9B764D99

View File

@ -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) {