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-08-02 14:37:20 -0700 |
---|---|---|
committer | Catalin Mititiuc <webdevcat@proton.me> | 2024-08-02 14:37:20 -0700 |
commit | a042537c8eeff2e45bcc5d678e2657f4f542ec93 (patch) | |
tree | 6d7a5bc0ad04eb6cce6a1948cd8e8e671399bc87 /src/modules/gameboard.js | |
parent | f6ee6e3560022c77724535c2f7abd98c474ced8c (diff) |
Fix firing arcs for squads
Diffstat (limited to 'src/modules/gameboard.js')
-rw-r--r-- | src/modules/gameboard.js | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/modules/gameboard.js b/src/modules/gameboard.js index c486eae..d386855 100644 --- a/src/modules/gameboard.js +++ b/src/modules/gameboard.js @@ -207,14 +207,6 @@ function endMove() { } } -// Work around webkit bug https://bugs.webkit.org/show_bug.cgi?id=233432 -function workaroundForWebKitBug233432(listener) { - return e => { - const elUnderCursor = svg.parentNode.elementFromPoint(e.clientX, e.clientY); - if (!e.target.contains(elUnderCursor)) listener(e); - }; -} - export function start(el) { svg = el; const grid = svg.querySelector('.grid'); @@ -318,6 +310,9 @@ export function start(el) { clearHexDialog.addEventListener('close', e => { if (clearHexDialog.returnValue === 'confirm') { [...frontmost.children].forEach(child => { + if (child.classList.contains('counter')) + firingArc.get(svg, child).forEach(el => el.remove()); + frontmostStore.delete(child); child.remove(); }); |