ademilter / bricklayer

Lightweight and independent Pinterest-like cascading grid layout library
http://bricklayer.js.org
Other
2.46k stars 121 forks source link

keep scroll position on resize #25

Open kilianso opened 7 years ago

kilianso commented 7 years ago

I use bricklayer for a very long feed of social media posts and as soon as bricklayer needs to recalculate the columns (resize or change the orientation) it jumps to the top of the page, which is very bad for the user experience. It would be nice to include an option to prevent this and stay at the last scrollposition on resize/orientation change.

f commented 7 years ago

We need to calculate which element is close to the top scroll position, store it and rescroll to it after redraw.

I'm going to think about it.