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-06-11 15:20:40 -0700 |
---|---|---|
committer | Catalin Mititiuc <webdevcat@proton.me> | 2024-06-11 15:20:40 -0700 |
commit | 0a2c97ee4b30d23ce108a9060b9fd131e93c5284 (patch) | |
tree | 2ea712a0db18c77a20e4546dd92b05049e19403f /src | |
parent | c811acfedbc1da60b0053a9494b76545cc1262bd (diff) |
Remove some commented-out code
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/pan-zoom.js | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/modules/pan-zoom.js b/src/modules/pan-zoom.js index 3818444..97c44e1 100644 --- a/src/modules/pan-zoom.js +++ b/src/modules/pan-zoom.js @@ -12,13 +12,10 @@ function restorePanZoomVal(svg) { } function addEventListeners(svg) { - // svg.addEventListener('wheel', e => zoom(svg, e, zoomFactor), { passive: false }); - // svg.addEventListener('pointerdown', e => pan(svg, e), { passive: false }); + const targetEl = svg.querySelector('.gameboard'); - const group = svg.querySelector('.gameboard'); - - svg.addEventListener('wheel', e => zoom(group, e, zoomFactor), { passive: false }); - svg.addEventListener('pointerdown', e => pan(svg, group, e), { passive: false }); + svg.addEventListener('wheel', e => zoom(targetEl, e, zoomFactor), { passive: false }); + svg.addEventListener('pointerdown', e => pan(svg, targetEl, e), { passive: false }); } function storePanZoomVal(transformMatrix) { |