Skip to content

Commit fe2a016

Browse files
committed
#14: make popups show before table rendering
1 parent a047030 commit fe2a016

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/app/views/building_comparison/building_comparison.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ define([
129129
this.listenTo(this.state, 'change:metrics', this.onMetricsChange);
130130
this.listenTo(this.state, 'change:sort', this.onSort);
131131
this.listenTo(this.state, 'change:order', this.onSort);
132-
this.listenTo(this.state, 'change:building', this.render);
132+
this.listenTo(this.state, 'building_layer_popup_shown', this.render);
133133
$(window).scroll(_.bind(this.onScroll, this));
134134
},
135135

src/app/views/map/building_layer.js

+4
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ define([
9898
.setLatLng(presenter.toLatLng())
9999
.setContent(template({labels: presenter.toPopulatedLabels()}))
100100
.openOn(this.leafletMap);
101+
102+
setTimeout(function(){
103+
this.state.trigger('building_layer_popup_shown');
104+
}.bind(this),1);
101105
},
102106

103107
onFeatureClick: function(event, latlng, _unused, data){

0 commit comments

Comments
 (0)