[Pkg-javascript-commits] [leaflet] 61/301: call _onViewReset() not until map is loaded (center and zoom are set)
Jonas Smedegaard
js at moszumanska.debian.org
Mon Jan 27 22:22:41 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 3370942b3671e4755cf20896170318a8a56e6f5f
Author: fastrde <strachanski at googlemail.com>
Date: Sat Aug 17 02:08:24 2013 +0200
call _onViewReset() not until map is loaded (center and zoom are set)
---
src/map/handler/Map.Drag.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/map/handler/Map.Drag.js b/src/map/handler/Map.Drag.js
index e75345e..89aebfe 100644
--- a/src/map/handler/Map.Drag.js
+++ b/src/map/handler/Map.Drag.js
@@ -32,7 +32,7 @@ L.Map.Drag = L.Handler.extend({
this._draggable.on('predrag', this._onPreDrag, this);
map.on('viewreset', this._onViewReset, this);
- this._onViewReset();
+ map.once('load', this._onViewReset, this);
}
}
this._draggable.enable();
--
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