round new map position before animating pan

This commit is contained in:
Alex Fedosov 2015-11-23 19:05:39 +06:00
parent 63f239a20f
commit 3a2331d6c1

View File

@ -69,7 +69,7 @@ L.Map.include({
if (options.animate !== false) {
L.DomUtil.addClass(this._mapPane, 'leaflet-pan-anim');
var newPos = this._getMapPanePos().subtract(offset);
var newPos = this._getMapPanePos().subtract(offset).round();
this._panAnim.run(this._mapPane, newPos, options.duration || 0.25, options.easeLinearity);
} else {
this._rawPanBy(offset);