[Pkg-javascript-commits] [leaflet] 26/301: move a circlemarker's popup with each new position.
    Jonas Smedegaard 
    js at moszumanska.debian.org
       
    Mon Jan 27 22:22:39 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 e5bf57c4f78e4843c7268c2585104a88e52ac700
Author: Steve Kashishian <steve at snkashis.com>
Date:   Wed Jul 31 14:40:13 2013 -0400
    move a circlemarker's popup with each new position.
---
 src/layer/vector/CircleMarker.js | 7 +++++++
 1 file changed, 7 insertions(+)
diff --git a/src/layer/vector/CircleMarker.js b/src/layer/vector/CircleMarker.js
index 5e777ca..226477a 100644
--- a/src/layer/vector/CircleMarker.js
+++ b/src/layer/vector/CircleMarker.js
@@ -22,6 +22,13 @@ L.CircleMarker = L.Circle.extend({
 		this.setRadius(this.options.radius);
 	},
 
+	setLatLng: function (latlng) {
+		L.Circle.prototype.setLatLng.call(this, latlng);
+		if (this._popup && this._popup._isOpen) {
+			this._popup.setLatLng(latlng);
+		}
+	},
+
 	setRadius: function (radius) {
 		this.options.radius = this._radius = radius;
 		return this.redraw();
-- 
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