debug checkbox displays different tracks

This commit is contained in:
Matthias Wirth
2019-08-04 16:46:55 +02:00
parent 62e44a49a7
commit 3d012675ce
3 changed files with 45 additions and 11 deletions

View File

@@ -420,6 +420,18 @@ function init_page() {
toggleAltitudeChart(true);
});
$('#debug_checkbox').on('click', function() {
toggleDebug();
});
if (localStorage['debug'] === "true") {
debug = true;
$('#debug_checkbox').addClass('settingsCheckboxChecked');
} else {
debug = false;
$('#debug_checkbox').removeClass('settingsCheckboxChecked');
}
$('#selectall_checkbox').on('click', function() {
if ($('#selectall_checkbox').hasClass('settingsCheckboxChecked')) {
deselectAllPlanes();
@@ -1882,6 +1894,18 @@ function filterBlockedMLAT(switchFilter) {
PlaneFilter.blockedMLAT = blockedMLATFilter;
}
function toggleDebug() {
if (localStorage['debug'] === "true") {
debug = false;
localStorage['debug'] = "false";
$('#debug_checkbox').removeClass('settingsCheckboxChecked');
} else {
debug = true;
localStorage['debug'] = "true";
$('#debug_checkbox').addClass('settingsCheckboxChecked');
}
}
function toggleAltitudeChart(switchToggle) {
if (typeof localStorage['altitudeChart'] === 'undefined') {
localStorage['altitudeChart'] = 'show';