diff --git a/frontend/src/Main.elm b/frontend/src/Main.elm index 3f0f12a..837b976 100644 --- a/frontend/src/Main.elm +++ b/frontend/src/Main.elm @@ -461,6 +461,17 @@ trackView leftedge topedge zoom selection points = in (String.fromInt x_) ++ ", " ++ (String.fromInt y_) ++ ", " line = String.concat (List.map plot points) + selectedPoints = + Maybe.map + (\(s, e) -> + List.filter (\p -> p.time >= s && p.time <= e) points) + selection + selectionLine = + case selectedPoints of + Just spoints -> + polyline [ S.points (String.concat (List.map plot spoints)) ] [] + Nothing -> g [] [] + in svg [ H.style "width" "100%" @@ -470,13 +481,15 @@ trackView leftedge topedge zoom selection points = [ g [ fill "none" , stroke "blue" - , strokeWidth "7" + , strokeWidth "5" , strokeOpacity "0.5"] [ polyline [ fill "none" - , S.points line + , S.points line ] [] + , g [ stroke "red", strokeWidth "7", strokeOpacity "0.9" ] + [ selectionLine ] ] ]