Closed tiansial closed 4 years ago
What would be the best way to calculate an element's height/position on onEnter() hook?
Right now I'm using something like this:
function calcListHeight() { locationsList.style.height = window.innerHeight - locationsList.getBoundingClientRect().top + 'px'; requestAnimationFrame(calcListHeight); } requestAnimationFrame(calcListHeight);
But for some reason, this seems overkill.
Hi @tiansial,
Please only post issues related to the library. This is not an issue related to Highway so I have to close it.
Best regards, Anthodpnt
What would be the best way to calculate an element's height/position on onEnter() hook?
Right now I'm using something like this:
But for some reason, this seems overkill.