Skip to content

Commit

Permalink
Merge pull request #1433 from rohit645/mouse_scroll_zoom
Browse files Browse the repository at this point in the history
Mouse scroll to Zoom in/out in map view
  • Loading branch information
tuxpiper authored Feb 13, 2020
2 parents 81f8b9e + 8f52c07 commit 083403a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/common/services/maps.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ function Maps(ConfigEndpoint, L, _, CONST) {
map.attributionControl.setPrefix(false);
map.zoomControl.setPosition('bottomleft');
map.setMaxBounds([[-90,-360],[90,360]]);
map.scrollWheelZoom.enable();
map.on('popupopen', function (e) {
var px = map.project(e.popup._latlng); // find the pixel location on the map where the popup anchor is
px.y -= e.popup._container.clientHeight / 2; // find the height of the popup container, divide by 2, subtract from the Y axis of marker location
Expand Down

0 comments on commit 083403a

Please sign in to comment.