diff --git a/public_html/index.html b/public_html/index.html
index 962390c..dc051f1 100644
--- a/public_html/index.html
+++ b/public_html/index.html
@@ -221,6 +221,10 @@
diff --git a/public_html/script.js b/public_html/script.js
index ea3431f..dc45eb6 100644
--- a/public_html/script.js
+++ b/public_html/script.js
@@ -268,6 +268,10 @@ function initialize() {
});
+ $('#altitude_checkbox').on('click', function() {
+ toggleAltitudeChart(true);
+ });
+
$('#selectall_checkbox').on('click', function() {
if ($('#selectall_checkbox').hasClass('settingsCheckboxChecked')) {
deselectAllPlanes();
@@ -285,6 +289,7 @@ function initialize() {
filterGroundVehicles(false);
filterBlockedMLAT(false);
+ toggleAltitudeChart(false);
// Get receiver metadata, reconfigure using it, then continue
// with initialization
@@ -1531,6 +1536,24 @@ function filterBlockedMLAT(switchFilter) {
PlaneFilter.blockedMLAT = blockedMLATFilter;
}
+function toggleAltitudeChart(switchToggle) {
+ if (typeof localStorage['altitudeChart'] === 'undefined') {
+ localStorage['altitudeChart'] = 'show';
+ }
+ var altitudeChartDisplay = localStorage['altitudeChart'];
+ if (switchToggle === true) {
+ altitudeChartDisplay = (altitudeChartDisplay === 'show') ? 'hidden' : 'show';
+ }
+ if (altitudeChartDisplay === 'show') {
+ $('#altitude_checkbox').addClass('settingsCheckboxChecked');
+ $('#altitude_chart').show();
+ } else {
+ $('#altitude_checkbox').removeClass('settingsCheckboxChecked');
+ $('#altitude_chart').hide();
+ }
+ localStorage['altitudeChart'] = altitudeChartDisplay;
+}
+
function onResetAltitudeFilter(e) {
$("#altitude_filter_min").val("");
$("#altitude_filter_max").val("");