diff options
Diffstat (limited to 'src/dumbymap.mjs')
-rw-r--r-- | src/dumbymap.mjs | 5 |
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) |