fix scroll wheel zoom on thinkpads and similar
This commit is contained in:
parent
0e3fa01131
commit
400f2892bb
1 changed files with 11 additions and 0 deletions
|
@ -15,6 +15,17 @@
|
||||||
tile.style.height = tileSize.y + 1 + 'px';
|
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 = {
|
c3nav = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue