zoomAnimation option

This commit is contained in:
Mourner 2011-04-14 18:04:33 +03:00
parent 9fc8f1ff5d
commit 4003a9d9b0
2 changed files with 7 additions and 7 deletions

View File

@ -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
},

View File

@ -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),