index : btroops | |
Virtual board game-aid for BattleTroops, an infantry combat simulator wargame published by FASA in 1989. |
aboutsummaryrefslogtreecommitdiff |
diff options
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(); |