From c57800b4cf5fc2aa047c9f01bae5b5994f89fbe9 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Tue, 24 Sep 2024 20:08:36 +0800 Subject: chore: reformat code --- src/dumbymap.mjs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/dumbymap.mjs') 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) => { placeholder.classList.remove('map-container', 'focus') target.parentElement.replaceChild(placeholder, target) - // HACK Trigger CSS transition, if placeholde is the olny chil element in block, + // FIXME Maybe use @start-style for CSS + // Trigger CSS transition, if placeholde is the olny chil element in block, // reduce its height to zero. - // To make sure the original height of placeholder is applied, callBoundingClientRect() seems work(Why?). + // To make sure the original height of placeholder is applied, DOM changes seems needed // then set data-attribute for CSS selector to change height to 0 placeholder.getBoundingClientRect() placeholder.setAttribute('data-placeholder', target.id) -- cgit v1.2.3-70-g09d2