aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/dumbymap.mjs
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2024-09-24 20:08:36 +0800
committerHsieh Chin Fan <pham@topo.tw>2024-09-25 10:49:45 +0800
commitc57800b4cf5fc2aa047c9f01bae5b5994f89fbe9 (patch)
treeb36bd40d82544f79919584e56eed344c84f7c901 /src/dumbymap.mjs
parent54f0c9381fce41c4ca46baebfd6281a8f9f9ff93 (diff)
chore: reformat code
Diffstat (limited to 'src/dumbymap.mjs')
-rw-r--r--src/dumbymap.mjs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dumbymap.mjs b/src/dumbymap.mjs
index b5afb6a..7408529 100644
--- a/src/dumbymap.mjs
+++ b/src/dumbymap.mjs
@@ -274,9 +274,10 @@ export const generateMaps = (container, callback) => {
274 placeholder.classList.remove('map-container', 'focus') 274 placeholder.classList.remove('map-container', 'focus')
275 target.parentElement.replaceChild(placeholder, target) 275 target.parentElement.replaceChild(placeholder, target)
276 276
277 // HACK Trigger CSS transition, if placeholde is the olny chil element in block, 277 // FIXME Maybe use @start-style for CSS
278 // Trigger CSS transition, if placeholde is the olny chil element in block,
278 // reduce its height to zero. 279 // reduce its height to zero.
279 // To make sure the original height of placeholder is applied, callBoundingClientRect() seems work(Why?). 280 // To make sure the original height of placeholder is applied, DOM changes seems needed
280 // then set data-attribute for CSS selector to change height to 0 281 // then set data-attribute for CSS selector to change height to 0
281 placeholder.getBoundingClientRect() 282 placeholder.getBoundingClientRect()
282 placeholder.setAttribute('data-placeholder', target.id) 283 placeholder.setAttribute('data-placeholder', target.id)