noIsolation and noSidebar URL query options

sidebarWidth=440px : shows sidebar and sets width.

hideButtons : hide all the buttons
This commit is contained in:
Matthias Wirth
2020-03-01 00:11:19 +01:00
parent 7ab5dfeb28
commit 4cd9adca3d
4 changed files with 29 additions and 3 deletions

View File

@@ -572,6 +572,13 @@ function initialize() {
if (!isNaN(tmp))
largeMode = tmp;
}
if (search.has('hideSidebar'))
localStorage['sidebar_visible'] = "false";
if (search.has('sidebarWidth')) {
localStorage['sidebar_width'] = search.get('sidebarWidth');
localStorage['sidebar_visible'] = "true";
}
} catch (error) {
console.log(error);
}
@@ -1099,6 +1106,17 @@ function parse_history() {
} else {
sortByAltitude();
}
if (hideButtons) {
$('#large_mode_control').hide();
$('#header_top').hide();
$('#header_side').hide();
$('#splitter').hide();
$('#jumpSearch').hide();
$('#filterButton').hide();
$('.ol-control').hide();
}
}
// Make a LineString with 'points'-number points
@@ -3428,7 +3446,8 @@ function processURLParams(){
}
if (icao != null) {
toggleIsolation("on", false);
if (!search.has('noIsolation'))
toggleIsolation("on", false);
if (Planes[icao] || globeIndex) {
console.log('Selected ICAO id: '+ icao);
var selectOptions = {follow: follow};
@@ -3452,6 +3471,9 @@ function processURLParams(){
OLMap.getView().setZoom(zoom);
}
if (search.has('hideButtons'))
hideButtons = true;
} catch (error) {
console.log(error);
}