From 6b4312aa1f7fc49cd212d9557f71f3624e0f145f Mon Sep 17 00:00:00 2001
From: Catalin Mititiuc
Date: Mon, 20 May 2024 13:59:49 -0700
Subject: Fix show/hide record sheet toggle
---
src/index.js | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
(limited to 'src/index.js')
diff --git a/src/index.js b/src/index.js
index 96b138f..cbd6b3b 100644
--- a/src/index.js
+++ b/src/index.js
@@ -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';
- // }
- // });
-
- // localStorage.setItem('content-visibility', this.checked);
+ 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);
}).bind(contentVisToggleEl);
let mapResourceEl = document.querySelector('object');
--
cgit v1.2.3