This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Katie Wu
Posted Jul 22 - Read on Facebook

What should I do if I want to limit scrolling on a ScrollComponent to only DOWNWARD?

3 Comments

Jonas Treub

scrollComponent.content.draggable.updatePosition = (point) ->
[tab]if Math.abs(point.y) < scrollComponent.content.height - scrollComponent.height
[tab][tab]point.y = Math.min(point.y, -scrollComponent.scrollY)
[tab]return point

Jonas Treub

Using the updatePosition function you can override each position of a draggable. You only want to override the Y position if it is within the bounds of the content layer. Otherwise you will miss the bounce back at the bottom

Read the entire post on Facebook