$("#sidebar_title").html(I18n.t('browse.start_rjs.data_frame_title'));
$("#sidebar_content").html(sidebarHtml);
- openSidebar({ onclose: stopBrowse });
+ openSidebar();
var vectors = new OpenLayers.Layer.Vector();
}
}
- function stopBrowse() {
+ $("#sidebar").one("closed", function () {
if (map.dataLayer.active) {
map.dataLayer.active = false;
map.dataLayer.setVisibility(false);
map.events.unregister("moveend", map, updateData);
}
- }
+ });
function startDrag() {
$("#browse_select_box").html(I18n.t('browse.start_rjs.drag_a_box'));