overflow FIRST

This commit is contained in:
Seth Trowbridge 2023-05-23 21:22:13 -04:00
parent d576917f8f
commit e37c1ae568

View File

@ -86,6 +86,7 @@ export function Collapser(inElement:HTMLElement, initialState = false)
inElement.setAttribute("style", "");
}
inTransition = false;
console.log("done", userMode);
userDone(userMode);
}
@ -129,17 +130,20 @@ export function Collapser(inElement:HTMLElement, initialState = false)
console.log(measurements);
}
inElement.style.overflow = "hidden";
inElement.style.width = inElement.offsetWidth + "px";
inElement.style.height = inElement.offsetHeight + "px";
inElement.style.overflow = "hidden";
inTransition = true;
console.log("from", inElement.offsetWidth, inElement.offsetHeight );
frameRequest = requestAnimationFrame(()=>
{
const measure = inOpen ? measurements.Open : measurements.Shut;
inElement.style.width = measure.width + "px";
inElement.style.height = measure.height + "px";
console.log(" to", measure.width, measure.height );
inElement.className = inElement.getAttribute("data-class-keep") + " " + inElement.getAttribute(`data-class-${inOpen?"open":"shut"}`);
});