Don't send the selected flight plan to the back.

We want the selected flight plan to show on top of all the other flight
plans, and because we can't properly z-order with the other elements of
the map (see the code comment), this is probably the best we can do.

This means that the selected flight will be drawn on top of the front
line again, and will in some cases intercept mouse clicks meant for the
front line, but it's much less of a problem than when all the paths were
drawn on top.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3305.
This commit is contained in:
Dan Albert 2023-12-21 15:34:34 -08:00
parent 167cea08f6
commit ef69275f34

View File

@ -46,7 +46,9 @@ function FlightPlanPath(props: FlightPlanProps) {
// behind everything than was added before them. Anything added after always // behind everything than was added before them. Anything added after always
// goes on top. // goes on top.
useEffect(() => { useEffect(() => {
polylineRef.current?.bringToBack(); if (!props.selected) {
polylineRef.current?.bringToBack();
}
}); });
if (waypoints == null) { if (waypoints == null) {