You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a component that uses masonry. When a user clicks on a masonry item, I catch an onClick event, I set item.active to true which will then expand the item. Now that the item is larger I need masonry to layout, but I don't know how I'm supposed to get the masonry-grid reference to masonry. I end triggering it myself with:
But that causes the layout to snap in place, presumably because masonry gets re-initialized. How are people expected to handle resizing masonry-items with ember-masonry-grid?
The text was updated successfully, but these errors were encountered:
I may just be an absolute monster, but I had to do the following to call masonry layout:
In node modules>ember-masonry-grid>addon>components>masonry-grid>component.js above line 94 (masonry.layout(); in didRender method) I inserted the following line: this.sendAction('storeMasonryRef', masonry);
In my controller I created an action (maybe in your case, your component): storeMasonryRef(ref){ this.set('masonryRef', ref); }
Then I can call masonryRef.layout();
Haven't as yet found a better method.
And yes I know it is barbaric
I have a component that uses masonry. When a user clicks on a masonry item, I catch an onClick event, I set
item.active
totrue
which will then expand the item. Now that the item is larger I need masonry tolayout
, but I don't know how I'm supposed to get themasonry-grid
reference to masonry. I end triggering it myself with:In my
hbs
:But that causes the layout to snap in place, presumably because masonry gets re-initialized. How are people expected to handle resizing masonry-items with ember-masonry-grid?
The text was updated successfully, but these errors were encountered: