index : btroops | |
Virtual board game-aid for BattleTroops, an infantry combat simulator wargame published by FASA in 1989. |
aboutsummaryrefslogtreecommitdiff |
diff options
Diffstat (limited to 'index.js')
-rw-r--r-- | index.js | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -709,8 +709,14 @@ POINTS.forEach((row, index) => row.forEach(([x, y]) => { document.querySelectorAll('.soldier-record').forEach(el => el.addEventListener('click', e => { - RecordSheet.select(el); - Counter.select(el); + if (el.classList.contains('selected')) { + el.classList.remove('selected'); + RecordSheet.unSelect(); + Counter.unSelect(); + } else { + RecordSheet.select(el); + Counter.select(el); + } let sl = svg.querySelector('.sight-line'); |