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-08 14:54:08 -0700 |
---|---|---|
committer | Catalin Mititiuc <webdevcat@proton.me> | 2024-08-08 14:54:08 -0700 |
commit | b970b34a8848a65a44f1e3a64465270845371492 (patch) | |
tree | 42541303245dd21bb7be09552ddef36a09a59f53 | |
parent | 9e5e82ca17040d3bed971bbb692eebc787db756f (diff) |
Auto-pan to center of counter
-rw-r--r-- | node_modules/pan-zoom/src/modules/pan.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/node_modules/pan-zoom/src/modules/pan.js b/node_modules/pan-zoom/src/modules/pan.js index 596d41a..428f4b4 100644 --- a/node_modules/pan-zoom/src/modules/pan.js +++ b/node_modules/pan-zoom/src/modules/pan.js @@ -27,7 +27,7 @@ export function manualPan(gb, counter) { const counterRect = counter.getBoundingClientRect(); const mapRect = document.querySelector('object').getBoundingClientRect(); - let startPt = new DOMPoint(counterRect.x, counterRect.y); + let startPt = new DOMPoint(counterRect.x + counterRect.width / 2, counterRect.y + counterRect.height / 2); let movePt = new DOMPoint(mapRect.width / 2, mapRect.height / 2); startPt = startPt.matrixTransform(inverseScreenCTM); |