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 | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -928,6 +928,12 @@ recordSheetVisibility.addEventListener('input', e => { localStorage.setItem('recordsVisibility', recordSheetVisibility.checked); }); +document.querySelectorAll('#toggle-firing-arc-vis input').forEach(el => el.addEventListener('input', e => { + let clipPaths = svg.querySelectorAll(`clipPath[data-troop-allegiance="${el.dataset.allegiance}"]`); + + clipPaths.forEach(cp => cp.style.display = el.checked ? 'none' : ''); +})); + (function debug() { function drawLine(x1, y1, x2, y2) { let start = ptGrp.querySelector(`[data-x="${x1}"][data-y="${y1}"]`); |