From a4c0deaa09b6f383d87ff53e70f329db37b89fed Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Sat, 24 Oct 2020 16:09:41 +0200 Subject: [PATCH] fix altitudeChart interaction with shift-H for hiding the buttons --- html/script.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/html/script.js b/html/script.js index 841e572..e4f0bed 100644 --- a/html/script.js +++ b/html/script.js @@ -110,6 +110,7 @@ let lastActive = new Date().getTime(); let inactive = 0; let firstFetchDone = false; let overrideMapType = null; +let altitudeChartDisplay; let shareLink = ''; @@ -1533,6 +1534,8 @@ function initialize_map() { $('#expand_sidebar_control').hide(); toggleSidebarVisibility(); toggleSidebarVisibility(); + if (altitudeChartDisplay != 'show') + $('#altitude_chart').hide(); } hideButtons = !hideButtons; break; @@ -3018,7 +3021,6 @@ function toggleMapDim(switchOn) { } function toggleAltitudeChart(switchToggle) { - let altitudeChartDisplay; if (localStorage['altitudeChart']) { altitudeChartDisplay = localStorage['altitudeChart']; } else if (onMobile) {