From 134697196286b1fa0bd2fb0a5f440ad1ada893f7 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Sun, 10 Nov 2024 20:58:14 +0000 Subject: [PATCH] pass zoom to trackView --- frontend/src/Main.elm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/Main.elm b/frontend/src/Main.elm index 0324b3d..e7aa545 100644 --- a/frontend/src/Main.elm +++ b/frontend/src/Main.elm @@ -216,10 +216,10 @@ tileImg zoom tilenumber = img [ width 256, height 256, src (tileUrl tilenumber zoom) ] [] -trackView : List Point -> Int -> Int -> Svg Msg -trackView points leftedge topedge = +trackView : List Point -> Int -> Int -> Zoom -> Svg Msg +trackView points leftedge topedge zoom = let plot p = - let (x, y) = pixelFromCoord (toCoord p.pos.lat p.pos.lon) 13 + let (x, y) = pixelFromCoord (toCoord p.pos.lat p.pos.lon) zoom x_ = x - leftedge y_ = y - topedge in (String.fromInt x_) ++ ", " ++ @@ -269,7 +269,7 @@ canvas centre zoom width height track = ys = List.range mintile.y maxtile.y epos e = Tuple.mapBoth floor floor e.pointer.clientPos tv = case track of - Present t -> trackView t leftedge topedge + Present t -> trackView t leftedge topedge zoom Failure f -> Debug.log f (div [] [ text "failure", text f]) Loading -> div [] [text "loading"] Empty -> div [] [text "no points"]