Only do Marker/Path zoom animation if options.zoomAnimation is on (Aka we are doing the zoom animation), be pointless otherwise ;)

This commit is contained in:
danzel 2012-06-21 11:15:02 +12:00
parent df07bf0ae6
commit 106228647e
3 changed files with 3 additions and 3 deletions

View File

@ -25,7 +25,7 @@ L.Marker = L.Class.extend({
map.on('viewreset', this._reset, this);
if (L.Browser.any3d && map.options.animateMarkerZoom) {
if (map.options.zoomAnimation && map.options.animateMarkerZoom) {
map.on('zoomanim', this._zoomAnimation, this);
}

View File

@ -120,7 +120,7 @@ L.Map.include({
this._pathRoot = L.Path.prototype._createElement('svg');
this._panes.overlayPane.appendChild(this._pathRoot);
if (L.Browser.any3d) {
if (this.options.zoomAnimation) {
this.on('zoomanim', this._animatePathZoom);
this.on('zoomend', this._endPathZoom);
}

View File

@ -119,7 +119,7 @@ L.Map.include((L.Path.SVG && !window.L_PREFER_CANVAS) || !L.Browser.canvas ? {}
this._panes.overlayPane.appendChild(root);
if (L.Browser.any3d) {
if (this.options.zoomAnimation) {
this.on('zoomanim', this._animatePathZoom);
this.on('zoomend', this._endZoom);
}