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-04-30 14:12:46 -0700 |
---|---|---|
committer | Catalin Mititiuc <webdevcat@proton.me> | 2024-04-30 14:12:46 -0700 |
commit | 09514b6c0cab3904cb4d5bc6bc8560f2293bed0e (patch) | |
tree | bb69c22c9f077de2af1eb9100806454431b7e02a /src/modules/game | |
parent | 82d3a4b415ba920176058d615b697e84a49adabc (diff) |
Refactor cell event listeners
Diffstat (limited to 'src/modules/game')
-rw-r--r-- | src/modules/game/soldier.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/game/soldier.js b/src/modules/game/soldier.js index b01ed15..c4e9753 100644 --- a/src/modules/game/soldier.js +++ b/src/modules/game/soldier.js @@ -45,7 +45,7 @@ export function place(svg, selected, cell) { let points, counterNodeList = getCounterAndClones(svg, selected); - if (counterNodeList.length > 0 && selected.parentElement.hasAttribute('data-x')) { + if (counterNodeList.length > 0 && svg.querySelector('.grid').contains(selected)) { let trace = svg.querySelector(traceSelector(selected)); let prevCoords = [ |