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

Dynamic responsiveness #88

Closed
robertzxz opened this issue Oct 23, 2021 · 2 comments
Closed

Dynamic responsiveness #88

robertzxz opened this issue Oct 23, 2021 · 2 comments

Comments

@robertzxz
Copy link

So when I open the page in a small window and start making it bigger the responsiveness of my layout works perfectly
BUT when I do it in a opposite direction it doesn't. When I refresh the page the layout goes back to normal.
Any ideas?

@robertzxz
Copy link
Author

So since I cant find a way to initialize masonry to manually call the layout method, i tried changing the boolean of updateMasonryLayout variable to initiate it but it wont call it?

@wynfred
Copy link
Owner

wynfred commented Oct 26, 2021

Hi, this lib doesn't have a built in function to do that. You'll need to listen to the change of window size and call the layout function.
updateMasonryLayout should trigger the layout when its value changes, or you can use this to get a reference of the masonry object.
@ViewChild(NgxMasonryComponent) masonry: NgxMasonryComponent;

@wynfred wynfred closed this as completed Dec 16, 2021
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