Fix option misnamed snapZoom instead of zoomSnap (#4764)

This commit is contained in:
Lou Huang 2016-08-04 08:10:28 -04:00 committed by Iván Sánchez Ortega
parent a1d64678f2
commit 03a72717fc

View File

@ -111,9 +111,9 @@ L.Map.TouchZoom = L.Handler.extend({
.off(document, 'touchmove', this._onTouchMove)
.off(document, 'touchend', this._onTouchEnd);
// Pinch updates GridLayers' levels only when snapZoom is off, so snapZoom becomes noUpdate.
// Pinch updates GridLayers' levels only when zoomSnap is off, so zoomSnap becomes noUpdate.
if (this._map.options.zoomAnimation) {
this._map._animateZoom(this._center, this._map._limitZoom(this._zoom), true, this._map.options.snapZoom);
this._map._animateZoom(this._center, this._map._limitZoom(this._zoom), true, this._map.options.zoomSnap);
} else {
this._map._resetView(this._center, this._map._limitZoom(this._zoom));
}