preventDefault on MozMousePixelScroll
This prevents scrolling without changing the zoom delta calculations. Fixes #1794
This commit is contained in:
parent
bc40266bc9
commit
725124931f
@ -9,11 +9,13 @@ L.Map.mergeOptions({
|
||||
L.Map.ScrollWheelZoom = L.Handler.extend({
|
||||
addHooks: function () {
|
||||
L.DomEvent.on(this._map._container, 'mousewheel', this._onWheelScroll, this);
|
||||
L.DomEvent.on(this._map._container, 'MozMousePixelScroll', L.DomEvent.preventDefault);
|
||||
this._delta = 0;
|
||||
},
|
||||
|
||||
removeHooks: function () {
|
||||
L.DomEvent.off(this._map._container, 'mousewheel', this._onWheelScroll);
|
||||
L.DomEvent.off(this._map._container, 'MozMousePixelScroll', L.DomEvent.preventDefault);
|
||||
},
|
||||
|
||||
_onWheelScroll: function (e) {
|
||||
|
Loading…
Reference in New Issue
Block a user