Detecting when the scrollable element is at the start or end of the scrollable viewport
kfirba opened this issue · 1 comments
kfirba commented
Hey!
We want to add navigation arrows on each side of the scrollable viewport that can also trigger scroll (by a predefined amount of pixels). When we reach the end or the start of the scrollable viewport, we would like to hide the corresponding arrow.
Taking a quick look at the code base, it seems like you are already calculating those metrics at applyBoundForce()
. Do you think you can add those metrics to the getState
method, thus making them available in the onUpdate()
callback?
Thanks!
ilyashubin commented
Hello! Good idea. Added property borderCollision
to state object
https://github.com/ilyashubin/scrollbooster/releases/tag/v2.1.0