Skip to content

Commit

Permalink
Merge pull request #57 from j0Shi82/leaflet-1.7.1-fix
Browse files Browse the repository at this point in the history
fix #56: switch from mousewheel event to wheel to make plugin work with leaflet-1.7.x
  • Loading branch information
elmarquis authored Sep 20, 2020
2 parents 6256797 + 9d81d7b commit e2d66be
Show file tree
Hide file tree
Showing 5 changed files with 3,437 additions and 6 deletions.
4 changes: 2 additions & 2 deletions dist/leaflet-gesture-handling.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@
this._map._container.addEventListener("touchcancel", this._handleTouch);
this._map._container.addEventListener("click", this._handleTouch);

L.DomEvent.on(this._map._container, "mousewheel", this._handleScroll, this);
L.DomEvent.on(this._map._container, "wheel", this._handleScroll, this);
L.DomEvent.on(this._map, "mouseover", this._handleMouseOver, this);
L.DomEvent.on(this._map, "mouseout", this._handleMouseOut, this);

Expand All @@ -374,7 +374,7 @@
this._map._container.removeEventListener("touchcancel", this._handleTouch);
this._map._container.removeEventListener("click", this._handleTouch);

L.DomEvent.off(this._map._container, "mousewheel", this._handleScroll, this);
L.DomEvent.off(this._map._container, "wheel", this._handleScroll, this);
L.DomEvent.off(this._map, "mouseover", this._handleMouseOver, this);
L.DomEvent.off(this._map, "mouseout", this._handleMouseOut, this);

Expand Down
2 changes: 1 addition & 1 deletion dist/leaflet-gesture-handling.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/leaflet-gesture-handling.min.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/js/leaflet-gesture-handling.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export var GestureHandling = L.Handler.extend({

L.DomEvent.on(
this._map._container,
"mousewheel",
"wheel",
this._handleScroll,
this
);
Expand Down Expand Up @@ -64,7 +64,7 @@ export var GestureHandling = L.Handler.extend({

L.DomEvent.off(
this._map._container,
"mousewheel",
"wheel",
this._handleScroll,
this
);
Expand Down
Loading

0 comments on commit e2d66be

Please sign in to comment.