index : btroops | |
Virtual board game-aid for BattleTroops, an infantry combat simulator wargame published by FASA in 1989. |
aboutsummaryrefslogtreecommitdiff |
diff options
author | Catalin Mititiuc <webdevcat@proton.me> | 2024-07-03 09:26:48 -0700 |
---|---|---|
committer | Catalin Mititiuc <webdevcat@proton.me> | 2024-07-03 09:26:48 -0700 |
commit | cff0cc6dd6e244da9c35f620585598a4e396652b (patch) | |
tree | 93d759cb21c54f31a090d0e2ec562b4bf00a27fa /src/index.js | |
parent | c4047b56d7b75d8b7ba8b884d8ec6b2660036e12 (diff) |
Make stairs visible on roof levels
Diffstat (limited to 'src/index.js')
-rw-r--r-- | src/index.js | 6 |
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(); |