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

Why is the first item last displayed?? #6

Open
yairopro opened this issue Dec 14, 2017 · 3 comments
Open

Why is the first item last displayed?? #6

yairopro opened this issue Dec 14, 2017 · 3 comments

Comments

@yairopro
Copy link

yairopro commented Dec 14, 2017

Why is the first item last displayed?

masonryissue

@yairopro yairopro changed the title Why is first item last displayed?? Why is the first item last displayed?? Dec 14, 2017
@daKmoR
Copy link
Owner

daKmoR commented Dec 15, 2017

how do you add the elements?

as mansonry itself does not really care about the order in the dom it cares on the order elements are added to the js instance.

you could try calling document.querySelector('#masonry').reInit(); which does a new setup of the js instance.

@yairopro
Copy link
Author

I add elements using dom-repeat.
If I call the reInit function, it reorder the elements well.
But I need to constantly append new elements, making an "infinite-list" effect. And I cannot call reInit each time because:

  1. It refreshs the entire layout, making a glitch.
  2. It scrolls back to top.

@ArthurJahn
Copy link

Same problem here

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

3 participants