From ca9ad3ac2a8a0b5709ae7f55dcff3a7473bb9203 Mon Sep 17 00:00:00 2001
From: Catalin Mititiuc
Date: Thu, 8 Aug 2024 16:12:21 -0700
Subject: Add toggle for auto map-centering
---
src/modules/gameboard.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'src/modules')
diff --git a/src/modules/gameboard.js b/src/modules/gameboard.js
index 6359083..4218833 100644
--- a/src/modules/gameboard.js
+++ b/src/modules/gameboard.js
@@ -192,7 +192,7 @@ function select(data, opts) {
if (isSelected || !data) return;
- if (opts?.revealCounter) {
+ if (opts?.revealCounter && document.querySelector('#auto-center-map').checked) {
const gb = svg.querySelector('.gameboard');
if (gb.contains(counter)) manualPan(gb, counter);
}
--
cgit v1.2.3