Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Miscalculating height of the container after layout #3

Open
mdings opened this issue Jul 13, 2016 · 0 comments
Open

Miscalculating height of the container after layout #3

mdings opened this issue Jul 13, 2016 · 0 comments

Comments

@mdings
Copy link

mdings commented Jul 13, 2016

Hi Paul,

Why are you subtracting the pageYoffset from the total height when the layout is done positioning?

container.style.height = (totalHeight - window.pageYOffset) + "px";

I would say that the total height is solely calculated from the elements, regardless of the scroll position at that moment. Or is there a specific reason to do so?

I have a case in which the total height is not calculated correctly: I am dynamically adding elements when the user scrolls to the bottom of the page. When this occurs the elements are reset and the layout method is recalled. However, the total height is wrong because of the subtraction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant