[Pkg-javascript-commits] [leaflet] 02/78: Prevent race condition with marker position and zoom animation
Jonas Smedegaard
dr at jones.dk
Sat May 7 08:58:41 UTC 2016
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository leaflet.
commit c759481592830f80fad59fe7b63d9e14cb406e2f
Author: Per Liedman <per at liedman.net>
Date: Sun Jan 18 12:15:50 2015 +0100
Prevent race condition with marker position and zoom animation
---
src/layer/marker/Marker.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/layer/marker/Marker.js b/src/layer/marker/Marker.js
index d0a0f7d..4a22440 100644
--- a/src/layer/marker/Marker.js
+++ b/src/layer/marker/Marker.js
@@ -99,7 +99,9 @@ L.Marker = L.Class.extend({
update: function () {
if (this._icon) {
var pos = this._map.latLngToLayerPoint(this._latlng).round();
- this._setPos(pos);
+ L.Util.requestAnimFrame(function () {
+ this._setPos(pos);
+ }, this);
}
return this;
--
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