Update build

This commit is contained in:
danzel
2013-11-14 09:40:33 +13:00
parent f693a49dec
commit 432cd19403
2 changed files with 26 additions and 6 deletions
+25 -5
View File
@@ -1035,9 +1035,28 @@ L.MarkerCluster = L.Marker.extend({
return this._childCount;
},
//Zoom to the extents of this cluster
//Zoom to the minimum of showing all of the child markers, or the extents of this cluster
zoomToBounds: function () {
this._group._map.fitBounds(this._bounds);
var childClusters = this._childClusters.slice(),
map = this._group._map,
boundsZoom = map.getBoundsZoom(this._bounds),
zoom = this._zoom + 1,
i;
while (childClusters.length > 0 && boundsZoom > zoom) {
zoom++;
var newClusters = [];
for (i = 0; i < childClusters.length; i++) {
newClusters = newClusters.concat(childClusters[i]._childClusters);
}
childClusters = newClusters;
}
if (boundsZoom > zoom) {
this._group._map.setView(this._latlng, zoom);
} else {
this._group._map.fitBounds(this._bounds);
}
},
getBounds: function () {
@@ -1717,6 +1736,8 @@ L.MarkerCluster.include({
delete m._spiderLeg;
}
}
group._spiderfied = null;
}
});
@@ -1959,10 +1980,9 @@ L.MarkerClusterGroup.include({
if (this._map.options.zoomAnimation) {
this._map.on('zoomstart', this._unspiderfyZoomStart, this);
} else {
//Browsers without zoomAnimation don't fire zoomstart
this._map.on('zoomend', this._unspiderfyWrapper, this);
}
//Browsers without zoomAnimation or a big zoom don't fire zoomstart
this._map.on('zoomend', this._noanimationUnspiderfy, this);
if (L.Path.SVG && !L.Browser.touch) {
this._map._initPathRoot();
+1 -1
View File
File diff suppressed because one or more lines are too long