Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCatalin Mititiuc <webdevcat@proton.me>2024-08-08 16:12:21 -0700
committerCatalin Mititiuc <webdevcat@proton.me>2024-08-08 16:12:21 -0700
commitca9ad3ac2a8a0b5709ae7f55dcff3a7473bb9203 (patch)
tree006e73211ae3559ce8f80bc1cbe656472e4cdc29 /src/index.js
parent23188152c91a8e638ab832fa1fa122d59d1fc391 (diff)
Add toggle for auto map-centering
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js2
1 files changed, 1 insertions, 1 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';