Web Dev Solutions

Catalin Mititiuc

From cff0cc6dd6e244da9c35f620585598a4e396652b Mon Sep 17 00:00:00 2001 From: Catalin Mititiuc Date: Wed, 3 Jul 2024 09:26:48 -0700 Subject: Make stairs visible on roof levels --- src/index.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/index.js') 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(); -- cgit v1.2.3