s-yadav / angulargrid

Pinterest like responsive masonry grid system for angular
MIT License
277 stars 105 forks source link

Performant Scroll No Animation #134

Open otterslide opened 7 years ago

otterslide commented 7 years ago

There is no animation of the elements when performant scroll is turned on.

The performant scroll replaces the DOM elements too quickly, and does not allow for animation. Seems that performant scroll Refresh DOM function is called too often, even when the items have not scroll very much, and even if there are very few items compared to page size, not even enough to fill one page.

Even resizing the browser width without scrolling causes a refresh of the DOM on performant scroll. Because of this, the boxes cannot re-align with a nice smooth animation.

I am also getting a performant scroll call when infiniteScroll changes lastPage to null, which is called right after deleting an item.

Doing this stops the delete re-arrange animation and re-draws the whole grid as soon as an item is deleted. For some reason, the page is not calculated properly and it ends up shrinking my page to less elements than can fit.