[Pkg-javascript-commits] [leaflet] 276/301: do not change internal properties in invalidateSize() when map is not loaded

Jonas Smedegaard js at moszumanska.debian.org
Mon Jan 27 22:22:56 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 0859c48fbff0ce5b4a587fbf4a419b6250fdcae4
Author: Ilya Zverev <zverik at textual.ru>
Date:   Fri Nov 29 14:46:05 2013 +0400

    do not change internal properties in invalidateSize() when map is not loaded
---
 src/map/Map.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/map/Map.js b/src/map/Map.js
index b073e7a..b207019 100644
--- a/src/map/Map.js
+++ b/src/map/Map.js
@@ -224,6 +224,8 @@ L.Map = L.Class.extend({
 	},
 
 	invalidateSize: function (options) {
+		if (!this._loaded) { return this; }
+
 		options = L.extend({
 			animate: false,
 			pan: true
@@ -233,8 +235,6 @@ L.Map = L.Class.extend({
 		this._sizeChanged = true;
 		this._initialCenter = null;
 
-		if (!this._loaded) { return this; }
-
 		var newSize = this.getSize(),
 		    oldCenter = oldSize.divideBy(2).round(),
 		    newCenter = newSize.divideBy(2).round(),

-- 
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