fix scroll wheel zoom on thinkpads and similar

This commit is contained in:
Laura Klünder 2017-11-05 18:19:45 +01:00
parent 0e3fa01131
commit 400f2892bb

View file

@ -15,6 +15,17 @@
tile.style.height = tileSize.y + 1 + 'px';
}
});
/*
* Fix scroll wheel zoom on precise scrolling devices
*/
var originalPerformZoom = L.Map.ScrollWheelZoom.prototype._performZoom;
L.Map.ScrollWheelZoom.include({
_performZoom: function () {
if (this._delta) this._delta = (this._delta > 0) ? Math.max(this._delta, 60) : Math.min(this._delta, -60);
originalPerformZoom.call(this);
}
});
}());
c3nav = {