Only unhide altitude if config allows it

This commit is contained in:
tuffnerdstuff 2021-04-02 13:19:46 +02:00
parent 4ae423a407
commit 33e19cb886

View file

@ -799,7 +799,9 @@ function processUpdate(data, init) {
if (lastPoint !== null && lastPoint.alt !== null && eAltitude !== null) {
alt = lastPoint.alt * ALTITUDE_UNIT.metersMultiplier;
eAltitude.textContent = alt.toFixed(1);
eAltitudeContainer.classList.remove("hidden");
if (SHOW_ALTITUDE_AMSL) {
eAltitudeContainer.classList.remove("hidden");
}
} else {
eAltitudeContainer.classList.add("hidden");
}