More _noHas hacks. Will work around this properly at some stage, fixes #60 again.

This commit is contained in:
danzel
2013-06-14 14:15:34 +12:00
parent fc9d8953ca
commit 1440b56b4e
+4
View File
@@ -714,7 +714,9 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
//Shared animation code
_animationAddLayerNonAnimated: function (layer, newCluster) {
if (newCluster === layer) {
layer._noHas = true;
L.FeatureGroup.prototype.addLayer.call(this, layer);
delete layer._noHas;
} else if (newCluster._childCount === 2) {
newCluster._addToMap();
@@ -862,7 +864,9 @@ L.MarkerClusterGroup.include(!L.DomUtil.TRANSITION ? {
_animationAddLayer: function (layer, newCluster) {
var me = this;
layer._noHas = true;
L.FeatureGroup.prototype.addLayer.call(this, layer);
delete layer._noHas;
if (newCluster !== layer) {
if (newCluster._childCount > 2) { //Was already a cluster