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-04-24 15:08:07 -0700 |
---|---|---|
committer | Catalin Mititiuc <webdevcat@proton.me> | 2024-04-24 15:08:07 -0700 |
commit | bdeddc71eb64c60e8a6db64cb401b6e3a5f5571a (patch) | |
tree | 9ad95a43de060bfef36e12e1c8f357777c79583d /src/index.js | |
parent | 525ab3423728a0485c6b64cca00eed59990ddcfc (diff) |
Remove references to 'container' in counter.js; fix dblclick not working right
Diffstat (limited to 'src/index.js')
-rw-r--r-- | src/index.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/index.js b/src/index.js index 89893b6..b4216be 100644 --- a/src/index.js +++ b/src/index.js @@ -121,7 +121,8 @@ window.addEventListener('load', () => { game.unSelect(); RecordSheet.unSelect(); } else { - game.select(el.dataset.troopAllegiance, el.dataset.troopNumber); + const { troopAllegiance: allegiance, troopNumber: number } = el.dataset; + game.select({ dataset: { allegiance, number }}); } }) ); @@ -156,7 +157,8 @@ window.addEventListener('load', () => { .forEach(el => el.classList.remove('movement-ended')); game.endTurn(allegiance); - game.select(records.at(0).dataset.troopAllegiance, records.at(0).dataset.troopNumber); + const { troopAllegiance, troopNumber } = records.at(0).dataset; + game.select({ dataset: { allegiance: troopAllegiance, number: troopNumber }}); }) ); |