zoomAnimation option
This commit is contained in:
parent
9fc8f1ff5d
commit
4003a9d9b0
@ -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
|
||||
},
|
||||
|
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user