Update Build

This commit is contained in:
danzel
2012-08-27 13:55:55 +12:00
parent 6c4c0f1e33
commit a0f0f1b1df
2 changed files with 10 additions and 2 deletions

View File

@@ -131,6 +131,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
//Overrides FeatureGroup.onRemove
onRemove: function (map) {
console.log('MCG.onRemove');
this._map.off('zoomend', this._zoomEnd, this);
this._map.off('moveend', this._moveEnd, this);
@@ -229,7 +230,9 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
},
_zoomEnd: function () {
if (!this._map) { //May have been removed from the map by a zoomEnd handler
return;
}
this._mergeSplitClusters();
this._zoom = this._map._zoom;
@@ -1628,12 +1631,17 @@ L.MarkerClusterGroup.include({
_spiderfierOnRemove: function () {
this._map.off('click', this._unspiderfyWrapper, this);
this._map.off('zoomstart', this._unspiderfyZoomStart, this);
this._map.off('zoomanim', this._unspiderfyZoomAnim, this);
},
//On zoom start we add a zoomanim handler so that we are guaranteed to be last (after markers are animated)
//This means we can define the animation they do rather than Markers doing an animation to their actual location
_unspiderfyZoomStart: function () {
if (!this._map) { //May have been removed from the map by a zoomEnd handler
return;
}
this._map.on('zoomanim', this._unspiderfyZoomAnim, this);
},
_unspiderfyZoomAnim: function (zoomDetails) {

View File

File diff suppressed because one or more lines are too long