Fix show/hide record sheet toggle

This commit is contained in:
Catalin Constantin Mititiuc 2025-06-16 22:41:31 -07:00
parent 99029c6c93
commit 98834ec607

View File

@ -15,15 +15,15 @@ const mapPlaceholder = document.querySelector('.map-placeholder'),
fileInputEl = document.querySelector('input[type="file"]'),
toggleContentVis = (function () {
// document.querySelectorAll('#content div').forEach(div => {
// if (this.checked) {
// div.style.display = div.id == 'record-sheet' ? 'flex' : 'block';
// } else {
// div.style.display = 'none';
// }
// });
document.querySelectorAll('#content > div').forEach(div => {
if (this.checked) {
div.style.display = div.id == 'record-sheet' ? 'flex' : 'block';
} else {
div.style.display = 'none';
}
});
// localStorage.setItem('content-visibility', this.checked);
localStorage.setItem('content-visibility', this.checked);
}).bind(contentVisToggleEl);
let mapResourceEl = document.querySelector('object');