aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2024-09-22 11:42:55 +0800
committerHsieh Chin Fan <pham@topo.tw>2024-09-22 11:42:55 +0800
commit698262eb4f618ec6f6ae5b3389b935d7b34f1701 (patch)
tree53eb309f246f94b47be185d077b3b34ee0faf07d /src
parent8cfae8406ddb5b1675f0fc2e82739c0e71e325d4 (diff)
feat: remove onlick event for focusing map
For UX, use may just want to interact with maps but not but them into showcase.
Diffstat (limited to 'src')
-rw-r--r--src/dumbymap.mjs6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/dumbymap.mjs b/src/dumbymap.mjs
index 5f2fcc9..7f5c75c 100644
--- a/src/dumbymap.mjs
+++ b/src/dumbymap.mjs
@@ -379,12 +379,6 @@ export const generateMaps = async (container, callback) => {
379 // Render Maps {{{ 379 // Render Maps {{{
380 380
381 const afterEachMapLoaded = (mapContainer) => { 381 const afterEachMapLoaded = (mapContainer) => {
382 const focusClickedMap = () => {
383 container.querySelectorAll('.map-container')
384 .forEach(c => c.removeAttribute('data-focus'))
385 mapContainer.setAttribute('data-focus', true)
386 }
387 mapContainer.onclick = focusClickedMap
388 mapContainer.setAttribute('tabindex', "-1") 382 mapContainer.setAttribute('tabindex', "-1")
389 383
390 const observer = mapFocusObserver() 384 const observer = mapFocusObserver()