Skip to content

Commit

Permalink
switch from mousewheel event to wheel one to make plugin work with le…
Browse files Browse the repository at this point in the history
…aflet-1.7.x
  • Loading branch information
j0Shi82 committed Sep 20, 2020
1 parent 6256797 commit 9d81d7b
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 9d81d7b

Please sign in to comment.