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 | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -653,11 +653,16 @@ const RecordSheet = new function() { const SightLine = new function() { this.clear = function() { let sl = grid.querySelector('line.sight-line'); + let target = grid.querySelector(`use[href="#point"].sight-line-target`); if (sl) { sl.remove(); } + if (target) { + target.classList.remove('sight-line-target'); + } + this.clearHexes(); }; @@ -808,6 +813,8 @@ POINTS.forEach((row, index) => row.forEach(([x, y]) => { if (sl.classList.contains('active')) { SightLine.clear(); + } else { + group.querySelector(`use[href="#point"]`).classList.add('sight-line-target'); } group.dispatchEvent(new MouseEvent('pointerover')); |