Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/index.js2
-rw-r--r--src/modules/gameboard.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/index.js b/src/index.js
index 89af2a1..ec652b3 100644
--- a/src/index.js
+++ b/src/index.js
@@ -269,7 +269,7 @@ document.querySelectorAll('[name="select-elevation"]').forEach(el => {
});
});
-document.querySelector('#toggle-grid-vis input').addEventListener('change', function () {
+document.querySelector('#toggle-grid-vis').addEventListener('change', function () {
const svg = document.querySelector('object').contentDocument.querySelector('svg');
svg.querySelector('.grid').style.display = this.checked ? 'inline' : 'none';
svg.querySelector('#dots').style.display = this.checked ? 'inline' : 'none';
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);
}