[view/map,bugfix] Reapply fix from 5eb65f, lost due to a bad merge
This commit is contained in:
@@ -127,10 +127,12 @@ my.Map = Backbone.View.extend({
|
|||||||
this.bind('view:show',function(){
|
this.bind('view:show',function(){
|
||||||
// If the div was hidden, Leaflet needs to recalculate some sizes
|
// If the div was hidden, Leaflet needs to recalculate some sizes
|
||||||
// to display properly
|
// to display properly
|
||||||
self.map.invalidateSize();
|
if (self.map){
|
||||||
if (self._zoomPending && self.autoZoom) {
|
self.map.invalidateSize();
|
||||||
self._zoomToFeatures();
|
if (self._zoomPending && self.autoZoom) {
|
||||||
self._zoomPending = false;
|
self._zoomToFeatures();
|
||||||
|
self._zoomPending = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
self.visible = true;
|
self.visible = true;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user