[view/map][s] Recalculate Leaflet sizes when showing the container div
This commit is contained in:
parent
5891149087
commit
23c6a6e81b
@ -42,6 +42,12 @@ my.Map = Backbone.View.extend({
|
||||
this.model.currentDocuments.bind('remove', function(doc){self.redraw('remove',doc)});
|
||||
this.model.currentDocuments.bind('reset', function(){self.redraw('reset')});
|
||||
|
||||
// If the div is hidden, Leaflet needs to recalculate some sizes
|
||||
// to display properly
|
||||
this.bind('view:show',function(){
|
||||
self.map.invalidateSize();
|
||||
});
|
||||
|
||||
this.mapReady = false;
|
||||
|
||||
this.render();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user