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-05-21 21:05:54 -0700 |
---|---|---|
committer | Catalin Mititiuc <webdevcat@proton.me> | 2024-05-21 21:20:06 -0700 |
commit | 7395df376deac945fa8f10cbc05c318b1d8dc931 (patch) | |
tree | ee3b24de50fbe82a5612a5164a887b697e2fb513 /src/index.js | |
parent | d01e0aa92bdedce5c03245e583d096ea5ce1753d (diff) |
Remove select callbacks and use observable instead
Diffstat (limited to 'src/index.js')
-rw-r--r-- | src/index.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/index.js b/src/index.js index b268b2b..298f961 100644 --- a/src/index.js +++ b/src/index.js @@ -116,7 +116,7 @@ function load() { panzoom.start(svg); gameboard.start(svg); - recordSheet.start(startLocs, gameboard.getUnits(), gameboard.unSelect, gameboard.select); + recordSheet.start(startLocs, gameboard.getUnits()); } document.querySelectorAll('.end-turn').forEach(el => @@ -158,14 +158,13 @@ gameboard.setDistanceCallback((count = '-') => { }); gameboard.setProneFlagCallback(checked => proneToggle.checked = checked); -gameboard.setSelectCallback(data => recordSheet.select(data)); document.querySelectorAll('.end-move').forEach(el => el.addEventListener('click', () => { recordSheet.endMove(); gameboard.endMove(); })); -document.querySelector('#fullscreen').addEventListener('click', e => { +document.querySelector('#fullscreen').addEventListener('click', () => { if (!document.fullscreenElement) { document.documentElement.requestFullscreen(); } else if (document.exitFullscreen) { |