Dogstudio / highway

Highway - A Modern Javascript Transitions Manager
https://highway.js.org/
MIT License
1.43k stars 92 forks source link

Calculate Element Height/Position onEnter #63

Closed tiansial closed 4 years ago

tiansial commented 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.

Anthodpnt commented 4 years ago

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