[view-map,bugfix][xs]: only call invalidateMapsize on view:show if map defined.
* this issue arose in case when map is the first view being shown.
This commit is contained in:
parent
bdbfdd7c34
commit
5eb65f2b77
@ -117,7 +117,9 @@ my.Map = Backbone.View.extend({
|
||||
// If the div was hidden, Leaflet needs to recalculate some sizes
|
||||
// to display properly
|
||||
this.bind('view:show',function(){
|
||||
self.map.invalidateSize();
|
||||
if (self.map) {
|
||||
self.map.invalidateSize();
|
||||
}
|
||||
});
|
||||
|
||||
var stateData = _.extend({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user