From a042537c8eeff2e45bcc5d678e2657f4f542ec93 Mon Sep 17 00:00:00 2001
From: Catalin Mititiuc
Date: Fri, 2 Aug 2024 14:37:20 -0700
Subject: Fix firing arcs for squads
---
src/modules/gameboard.js | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
(limited to 'src/modules/gameboard.js')
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();
});
--
cgit v1.2.3