overflow FIRST
This commit is contained in:
parent
d576917f8f
commit
e37c1ae568
@ -86,6 +86,7 @@ export function Collapser(inElement:HTMLElement, initialState = false)
|
|||||||
inElement.setAttribute("style", "");
|
inElement.setAttribute("style", "");
|
||||||
}
|
}
|
||||||
inTransition = false;
|
inTransition = false;
|
||||||
|
console.log("done", userMode);
|
||||||
userDone(userMode);
|
userDone(userMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,17 +130,20 @@ export function Collapser(inElement:HTMLElement, initialState = false)
|
|||||||
console.log(measurements);
|
console.log(measurements);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inElement.style.overflow = "hidden";
|
||||||
inElement.style.width = inElement.offsetWidth + "px";
|
inElement.style.width = inElement.offsetWidth + "px";
|
||||||
inElement.style.height = inElement.offsetHeight + "px";
|
inElement.style.height = inElement.offsetHeight + "px";
|
||||||
inElement.style.overflow = "hidden";
|
|
||||||
|
|
||||||
inTransition = true;
|
inTransition = true;
|
||||||
|
console.log("from", inElement.offsetWidth, inElement.offsetHeight );
|
||||||
|
|
||||||
frameRequest = requestAnimationFrame(()=>
|
frameRequest = requestAnimationFrame(()=>
|
||||||
{
|
{
|
||||||
const measure = inOpen ? measurements.Open : measurements.Shut;
|
const measure = inOpen ? measurements.Open : measurements.Shut;
|
||||||
inElement.style.width = measure.width + "px";
|
inElement.style.width = measure.width + "px";
|
||||||
inElement.style.height = measure.height + "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"}`);
|
inElement.className = inElement.getAttribute("data-class-keep") + " " + inElement.getAttribute(`data-class-${inOpen?"open":"shut"}`);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user