From 3341c45e612bcdd4af319d9f6dcc2588934c4310 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sen=C3=A9n=20Rodero=20Rodr=C3=ADguez?= <15726+Senen@users.noreply.github.com> Date: Mon, 27 Mar 2023 15:09:41 +0200 Subject: [PATCH] Disable scroll wheel for zooming in favor of map zoom buttons It's causing annoying behaviour for desktop users when scrolling the page to the bottom and there is more content below the map. The behaviour of touchable devices does not seem to be affected by this change and keeps behaving the same. --- app/assets/javascripts/map.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/map.js b/app/assets/javascripts/map.js index d0b47aa58..1489a61c6 100644 --- a/app/assets/javascripts/map.js +++ b/app/assets/javascripts/map.js @@ -117,7 +117,7 @@ return "" + data.investment_title + ""; }; mapCenterLatLng = new L.LatLng(mapCenterLatitude, mapCenterLongitude); - map = L.map(element.id).setView(mapCenterLatLng, zoom); + map = L.map(element.id, { scrollWheelZoom: false }).setView(mapCenterLatLng, zoom); App.Map.maps.push(map); L.tileLayer(mapTilesProvider, { attribution: mapAttribution