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-06-27 15:03:35 -0700 |
---|---|---|
committer | Catalin Mititiuc <webdevcat@proton.me> | 2024-06-27 15:03:35 -0700 |
commit | 016ad2e8f6eb4ed750c61cd17898d4a5393929e3 (patch) | |
tree | 52d3443b4c2fdb55771eeeb91429b460df2508c9 /src/index.js | |
parent | 4986357f348a687ee90537d5ed9177e6822ace27 (diff) |
Fix elevation view styles
Diffstat (limited to 'src/index.js')
-rw-r--r-- | src/index.js | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/index.js b/src/index.js index 6e98028..bc4fd8f 100644 --- a/src/index.js +++ b/src/index.js @@ -208,13 +208,11 @@ document.querySelector('#roll-dice').addEventListener('click', () => { }); }); -// document.querySelectorAll('[name="select-elevation"]').forEach(el => { -// const gameboard = document.querySelector('.gameboard'); - -// el.addEventListener('change', function (e) { -// gameboard.dataset.viewElevation = this.value -// }); -// }); +document.querySelectorAll('[name="select-elevation"]').forEach(el => { + el.addEventListener('change', function (e) { + document.querySelector('object').contentDocument.querySelector('.grid').dataset.viewElevation = this.value; + }); +}); contentVisToggleEl.addEventListener('input', toggleContentVis); contentVisToggleEl.checked = (localStorage.getItem('content-visibility') !== 'false'); |