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.
This commit is contained in:
Senén Rodero Rodríguez
2023-03-27 15:09:41 +02:00
parent 39574040e0
commit 3341c45e61

View File

@@ -117,7 +117,7 @@
return "<a href='/budgets/" + data.budget_id + "/investments/" + data.investment_id + "'>" + data.investment_title + "</a>";
};
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