nowaalex / af-utils

Simple open-source tools that just work (usually fast)
https://af-utils.com
MIT License
75 stars 5 forks source link

Window scrolling #29

Closed siamak closed 10 months ago

siamak commented 1 year ago

Is there any method for support window scrolling instead box scrolling?

nowaalex commented 1 year ago

Right now no, working on it)

nowaalex commented 1 year ago

Example @siamak Implemented setScroller & setContainer, which makes window scroll possible. However window scrolling has performance issues on Chrome, which could be solved by disabling threaded scrolling in chrome://flags. Investigating this. On Firefox should work normally. Best solution for now is to attach setScroller to some outermost scrollable div with overflow:auto and height: 100vh. Also remember about estimatedItemSize, because the less is the difference between real and estimated sizes - the smoother scrolling experience is.