angular2-masonry icon indicating copy to clipboard operation
angular2-masonry copied to clipboard

Trigger layout method

Open dbartumeu opened this issue 8 years ago • 3 comments

I want to trigger layout method every time that I add some content to the masonry-brick element, there is a way to get the _msnry Objet once layoutComplete is triggered?

dbartumeu avatar Apr 23 '17 02:04 dbartumeu

I have the same problematic ? Do you get a way to do it ?

peterViou avatar Jun 15 '17 12:06 peterViou

any update on this?

simonpeters avatar Sep 11 '17 15:09 simonpeters

Does this help?

In your component get a reference to the component:

@ViewChild(AngularMasonry) private masonry: AngularMasonry;

Then trigger the layout update like this:

                setTimeout( () => {
                    if (this.masonry){
                        this.masonry._msnry.reloadItems();
                        this.masonry.layout();
                    }
                });                

jasonburrows avatar Dec 16 '17 00:12 jasonburrows