Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCatalin Mititiuc <webdevcat@proton.me>2024-07-03 09:26:48 -0700
committerCatalin Mititiuc <webdevcat@proton.me>2024-07-03 09:26:48 -0700
commitcff0cc6dd6e244da9c35f620585598a4e396652b (patch)
tree93d759cb21c54f31a090d0e2ec562b4bf00a27fa /src/index.js
parentc4047b56d7b75d8b7ba8b884d8ec6b2660036e12 (diff)
Make stairs visible on roof levels
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/index.js b/src/index.js
index 24e017d..2ab35fa 100644
--- a/src/index.js
+++ b/src/index.js
@@ -249,6 +249,12 @@ document.querySelectorAll('[name="select-elevation"]').forEach(el => {
});
});
+document.querySelector('#toggle-grid-vis input').addEventListener('change', function () {
+ const svg = document.querySelector('object').contentDocument.querySelector('svg');
+ svg.querySelector('.grid').style.display = this.checked ? 'inline' : 'none';
+ svg.querySelector('#dots').style.display = this.checked ? 'inline' : 'none';
+});
+
contentVisToggleEl.addEventListener('input', toggleContentVis);
contentVisToggleEl.checked = (localStorage.getItem('content-visibility') !== 'false');
toggleContentVis();