jelgblad / angular2-masonry

https://github.com/desandro/masonry module for Angular2
101 stars 48 forks source link

Prepended elements are considered as appended #44

Open paolomoretti opened 7 years ago

paolomoretti commented 7 years ago

When prepending (unshift) an element to the ngFor array the method _msnry.appended is called (instead of prepended) resulting in the item being at the bottom.

Maybe in AngularMasonryBrick component on ngAfterViewInit there could be a check to see if this._element is this._parent._msnry.items[0] and this._parent._msnry.items.length > 1 then it would be prepended