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

What is Framer? Join the Community
Return to index
Daniel Alvarez
Posted Mar 07 - Read on Facebook

This is my first time working with Framer in a real project. I have no real experience.

Is is possible to set the overdrag attribute to just one side?

I got a slider which is Screen.width, it starts at the bottom-right corner and it can be slid to the left. I want to apply the overdrag to block it from dragging it to the right when it is in its initial state.


Steve Ruiz

Here's the solution. What you'll need to do is set an event listener for when the layer is dragging, and tell it to check whether the layer's offset (the distance the layer has moved since it began dragging) is less than or equal to the point where you want the drag to stop, minus the distance from that point that the layer was when it began to drag - and, if this is true, to set the layer's position to that point. Confusing? It works!

Read the entire post on Facebook