index : btroops | |
Virtual board game-aid for BattleTroops, an infantry combat simulator wargame published by FASA in 1989. |
aboutsummaryrefslogtreecommitdiff |
diff options
Diffstat (limited to 'src/modules/pan-zoom.js')
-rw-r--r-- | src/modules/pan-zoom.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/modules/pan-zoom.js b/src/modules/pan-zoom.js index 11471f6..d13c90f 100644 --- a/src/modules/pan-zoom.js +++ b/src/modules/pan-zoom.js @@ -14,8 +14,10 @@ function restorePanZoomVal(el) { function addEventListeners(svg, el) { svg.addEventListener('wheel', e => zoom(el, e, zoomFactor), { passive: false }); svg.addEventListener('pointerdown', e => { - e.target.setPointerCapture(e.pointerId); - pan(svg, el, e), { passive: false }; + if (e.button === 0) { + e.target.setPointerCapture(e.pointerId); + pan(svg, el, e), { passive: false }; + } }); } |