Skip to content

Commit bdc4074

Browse files
committed
Combined sidebar event listeners by using custom event on sidebar_hide plugin
1 parent c9059ff commit bdc4074

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

assets/javascripts/app.js

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -185,23 +185,12 @@ var App = (function ($, publ) {
185185
this.setPopover();
186186
}
187187

188-
// Fixing issue with sidebar hide button
189-
$("#hideSidebarButton").on('click', function (evt) {
190-
//setTimeout(function(){
191-
maps.forEach(function (m) {
192-
m.updateSize();
193-
});
194-
//}, 50);
195-
});
196-
197-
// Sidebar hack, which does some weird resizing otherwise
198-
if ($('#sidebar').not(':visible')) {
199-
//setTimeout(function(){
200-
maps.forEach(function (m) {
201-
map.updateSize();
202-
});
203-
//}, 50);
204-
}
188+
// Sidebar hack
189+
$("#sidebar").on('hideSidebar', function (evt) {
190+
maps.forEach(function (m) {
191+
m.updateSize();
192+
});
193+
})
205194

206195
// When one or more issues is selected, zoom to selected map features
207196
$("table.issues tbody tr").on('click', function (evt) {

0 commit comments

Comments
 (0)