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

What is Framer? Join the Community
Return to index
Nayong Park
Posted Jan 16 - Read on Facebook

I've been currently working on drag a module horizontally and I got a problem to put direction restriction. I tried to prevent left drag direction. How can I do right drag only? I used this but not working: # Prevent dragging left
topScreen.draggable.maxDragFrame = topScreen.frame
topScreen.draggable.maxDragFrame.width *= 2

1 Comments

Eelco Lempsink

Can you share a bit more about what you want to achieve? Would you still like to be able to scroll left/right while scrolling on only lock direction while done, should it bounce, etc? I think the approach I would take would be to try to achieve this using event handlers, keeping track of the scroll state and resetting it to a certain position. For instance, this is an example of a scroll component that will lock the position after the scroll animation ends using the content inset: https://framer.cloud/JFsHk

Read the entire post on Facebook