Skip to content

Commit b77d016

Browse files
committed
Hack to deal with hide_sidebar plugin tiing issues
1 parent 1d95927 commit b77d016

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

assets/javascripts/app.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ var App = (function ($, publ) {
151151
toolbar.setPosition("bottom-left");
152152
map.addControl(toolbar);
153153

154-
this.setView();
154+
// this.setView();
155155
this.setGeolocation();
156156
this.setGeocoding();
157157
this.parseHistory();
@@ -173,6 +173,20 @@ var App = (function ($, publ) {
173173
this.setPopover();
174174
}
175175

176+
// Fixing issue with sidebar hide button
177+
$("#hideSidebarButton").on('click', function (evt) {
178+
setTimeout(function(){
179+
map.updateSize();
180+
}, 50);
181+
});
182+
183+
// Sidebar hack, which does some weird resizing otherwise
184+
if ($('#sidebar').not(':visible')) {
185+
setTimeout(function(){
186+
map.updateSize();
187+
}, 50);
188+
}
189+
176190
// When one or more issues is selected, zoom to selected map features
177191
$("table.issues tbody tr").on('click', function (evt) {
178192
var id = $(this).attr("id").split('-')[1];

0 commit comments

Comments
 (0)