Make events for clusters start with cluster, clusterclick etc.

This commit is contained in:
danzel
2012-07-24 13:26:47 +12:00
parent a8dc5f315b
commit 602a5ae1d2
5 changed files with 34 additions and 37 deletions
+7
View File
@@ -32,6 +32,13 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
this._currentShownBounds = null;
},
//Overrides FeatureGroup._propagateEvent
_propagateEvent: function (e) {
if (e.target instanceof L.MarkerCluster) {
e.type = 'cluster' + e.type;
}
L.FeatureGroup.prototype._propagateEvent.call(this, e);
},
_sqDist: function (p1, p2) {
var dx = p2.x - p1.x,