remove scroll buttons and message
no need for it, dragging works fine
This commit is contained in:
parent
baf3046149
commit
8c1eb9f77f
@ -180,7 +180,6 @@ type Msg
|
|||||||
= MapZoomIn
|
= MapZoomIn
|
||||||
| MapZoomOut
|
| MapZoomOut
|
||||||
| MapScale Float
|
| MapScale Float
|
||||||
| Scroll Int Int
|
|
||||||
| PointerDown (Int, Int)
|
| PointerDown (Int, Int)
|
||||||
| PointerMove (Int, Int)
|
| PointerMove (Int, Int)
|
||||||
| PointerUp (Int, Int)
|
| PointerUp (Int, Int)
|
||||||
@ -205,8 +204,6 @@ newModel msg model =
|
|||||||
MapScale y ->
|
MapScale y ->
|
||||||
let dir = floor(abs(y)/y)
|
let dir = floor(abs(y)/y)
|
||||||
in { model | zoom = incZoom model.zoom dir }
|
in { model | zoom = incZoom model.zoom dir }
|
||||||
Scroll x y ->
|
|
||||||
{ model | centre = translatePixels model.centre (toZoom model.zoom) (x,y) }
|
|
||||||
|
|
||||||
PointerDown (x,y) ->
|
PointerDown (x,y) ->
|
||||||
{ model | drag = Dragging (x,y) (x,y) }
|
{ model | drag = Dragging (x,y) (x,y) }
|
||||||
@ -448,10 +445,6 @@ viewDiv model =
|
|||||||
, span []
|
, span []
|
||||||
[ button [ onClick MapZoomOut ] [ text "-" ]
|
[ button [ onClick MapZoomOut ] [ text "-" ]
|
||||||
, button [ onClick MapZoomIn ] [ text "+" ]
|
, button [ onClick MapZoomIn ] [ text "+" ]
|
||||||
, button [ onClick (Scroll 0 -10) ] [ text "^" ]
|
|
||||||
, button [ onClick (Scroll 0 10) ] [ text "V" ]
|
|
||||||
, button [ onClick (Scroll -10 0) ] [ text "<" ]
|
|
||||||
, button [ onClick (Scroll 10 0) ] [ text ">" ]
|
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
, div [ style "display" "flex"
|
, div [ style "display" "flex"
|
||||||
|
Loading…
Reference in New Issue
Block a user