aboutsummaryrefslogtreecommitdiffstats
path: root/src/Mapbox
diff options
context:
space:
mode:
authorRahul Butani <rrbutani@users.noreply.github.com>2019-02-04 05:38:38 -0600
committerJakub Hampl <kopomir@gmail.com>2019-02-04 11:38:38 +0000
commitc7dffe54d8debd1851d027553afc4ea4d1047f4a (patch)
tree0348d66cfd91220b182ce051f73ce17d9a5f9e02 /src/Mapbox
parent00600a345eb595e8dc18cf499fb6635a932a8cb7 (diff)
Handle (Float, Float) pixel values (#5)
Versions of Google Chrome (and possibly other browsers) seem to return decimal pixel values for some zoom values. This results in silent errors; for Example01 specifically this causes Hover and Click events (onMouseMove and onClick) respectively to never make it to the update function.
Diffstat (limited to 'src/Mapbox')
-rw-r--r--src/Mapbox/Element.elm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Mapbox/Element.elm b/src/Mapbox/Element.elm
index 8eb9132..9b29392 100644
--- a/src/Mapbox/Element.elm
+++ b/src/Mapbox/Element.elm
@@ -232,7 +232,7 @@ type alias TouchEvent =
decodePoint =
- Decode.map2 (\a b -> ( a, b )) (Decode.field "x" Decode.int) (Decode.field "y" Decode.int)
+ Decode.map2 (\a b -> ( round a, round b )) (Decode.field "x" Decode.float) (Decode.field "y" Decode.float)
decodeEventData =