diff --git a/src/map/Map.js b/src/map/Map.js index 137dafa4..2f399eda 100644 --- a/src/map/Map.js +++ b/src/map/Map.js @@ -26,8 +26,11 @@ L.Map = L.Class.extend({ // controls zoomControl: true, - // misc + // animation fadeAnimation: L.DomUtil.TRANSITION && !L.Browser.android, + zoomAnimation: L.DomUtil.TRANSITION, + + // misc trackResize: true, closePopupOnClick: true }, diff --git a/src/map/ext/Map.ZoomAnimation.js b/src/map/ext/Map.ZoomAnimation.js index 4a95fb60..0d40d5b4 100644 --- a/src/map/ext/Map.ZoomAnimation.js +++ b/src/map/ext/Map.ZoomAnimation.js @@ -1,11 +1,8 @@ -L.Map.include(!(L.Transition && L.Transition.implemented()) ? {} : { +L.Map.include(!L.DomUtil.TRANSITION ? {} : { _zoomToIfCenterInView: function(center, zoom, centerOffset) { - - if (this._animatingZoom) { - return true; - } - if (!L.Transition.NATIVE) { return false; } + if (this._animatingZoom) { return true; } + if (!this.options.zoomAnimation) { return false; } var zoomDelta = zoom - this._zoom, scale = Math.pow(2, zoomDelta),