Skip to content

Masonry Item auto adjust to use the vertical space #58

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

Closed
clavinovahan opened this issue Sep 17, 2020 · 3 comments
Closed

Masonry Item auto adjust to use the vertical space #58

clavinovahan opened this issue Sep 17, 2020 · 3 comments

Comments

@clavinovahan
Copy link

We use the latest version of ngx-masonry with Angular 10. When one of masonry item's height changed to smaller, the item below does not automatically move up to take the empty space. Is there something not working with Angular 10 or we need to catch item size change event and call masonry.layout() to update whole layout or there is some other way?

BTW, we tried to call masonry.layout() and it does work but there is no animation for the item below to move up. So the questions are

  1. Is forcing method call layout() the only way to make the item below to move up?
  2. If so, any idea to make the animation - the card below to move up to take the extra space left due to item above size changed to smaller?
@wynfred
Copy link
Owner

wynfred commented Sep 17, 2020

Hi, yes, you need to call layout() in order to move items up.
About the animation, the masonry-layout library does support the animation of moving items but it's disabled because of an issue in production, so you have to use Angular animation. However, I'm not sure how to do it or maybe it's not possible.

@clavinovahan
Copy link
Author

Thanks for the response. What issue in production? Any idea how to enable the animation?

@wynfred
Copy link
Owner

wynfred commented Sep 21, 2020

The issue is #8
You could try version 1.x but there might be other issues.

@wynfred wynfred closed this as completed Nov 2, 2020
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

2 participants