[Pkg-javascript-commits] [leaflet] 120/301: only animate tile layer if at least one tile loaded, fix #2071

Jonas Smedegaard js at moszumanska.debian.org
Mon Jan 27 22:22:45 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository leaflet.

commit 64b0e340c05a10621d371bf35528433f9897f9ba
Author: Vladimir Agafonkin <agafonkin at gmail.com>
Date:   Thu Oct 10 18:44:08 2013 +0300

    only animate tile layer if at least one tile loaded, fix #2071
---
 src/layer/tile/TileLayer.js | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/layer/tile/TileLayer.js b/src/layer/tile/TileLayer.js
index 407a954..6878970 100644
--- a/src/layer/tile/TileLayer.js
+++ b/src/layer/tile/TileLayer.js
@@ -228,7 +228,7 @@ L.TileLayer = L.Class.extend({
 			this._updateZIndex();
 
 			if (this._animated) {
-				var className = 'leaflet-tile-container leaflet-zoom-animated';
+				var className = 'leaflet-tile-container';
 
 				this._bgBuffer = L.DomUtil.create('div', className, this._container);
 				this._tileContainer = L.DomUtil.create('div', className, this._container);
@@ -534,6 +534,11 @@ L.TileLayer = L.Class.extend({
 
 	_tileLoaded: function () {
 		this._tilesToLoad--;
+
+		if (this._animated) {
+			L.DomUtil.addClass(this._tileContainer, 'leaflet-zoom-animated');
+		}
+
 		if (!this._tilesToLoad) {
 			this.fire('load');
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/leaflet.git



More information about the Pkg-javascript-commits mailing list