From e15a3b61d27b39e8d74d99f559dc7f4e7e416ffe Mon Sep 17 00:00:00 2001 From: amercader Date: Tue, 24 Feb 2015 09:22:01 +0000 Subject: [PATCH] Fix visibility check on map view. Fixes #463 The following check was failing on the first load, so autozoom didn't work: https://github.com/okfn/recline/blob/3f4a30e054652d06b92cfe372ce66c8b5c79d4ca/src/view.map.js#L232 --- src/view.map.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/view.map.js b/src/view.map.js index bf864c46..76c9e675 100644 --- a/src/view.map.js +++ b/src/view.map.js @@ -53,7 +53,7 @@ my.Map = Backbone.View.extend({ initialize: function(options) { var self = this; - this.visible = true; + this.visible = this.$el.is(':visible'); this.mapReady = false; // this will be the Leaflet L.Map object (setup below) this.map = null;