[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:
@@ -117,7 +117,9 @@ my.Map = Backbone.View.extend({
|
|||||||
// 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
|
||||||
this.bind('view:show',function(){
|
this.bind('view:show',function(){
|
||||||
self.map.invalidateSize();
|
if (self.map) {
|
||||||
|
self.map.invalidateSize();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var stateData = _.extend({
|
var stateData = _.extend({
|
||||||
|
|||||||
Reference in New Issue
Block a user