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

What is Framer? Join the Community
Return to index
Godrich Wild Man
Posted Aug 23 - Read on Facebook

Hi, guys!

I have more two questions :-)

How do I prevent a draggable object to move in other directions?

I copied the example of the Potluck splash screen (http://examples.framerjs.com/#potluck-onboarding.framer) and, while it works ok on my prototype, it still allows me to drag the object to up, down or any other direction, rather than only enable to drag it from the left side of my screen.

The other question I have is regarding masks. I have a folder with some images that I want to click and animate them in my prototype. So I simply created a mask in the parent folder (PSD) in order to ensure that images don't come out of the screen when animated, but it doesn't works. Am I missing something here?

Thanks in advance! You guys has helped me a lot.

3 Comments

Ed Chao

myLayer.draggable.speedX = 0 (this keeps you from dragging along the X axis, replace with Y for the other vertical direction)

Kevin Cannon

Is there a way to set drag bounds yet?
I was trying to make a draggable set of screens. Like home on iOS or Android, but I can still drag things left when i'm on the left-most screen. I tried just doing something like if layer.x < 0 layer.x = 0, but it didn't work very well.

Godrich Wild Man

Thanks, is working!

In fact, I forgot to add the draggable property before the speedY attribute :-)

Read the entire post on Facebook