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

What is Framer? Join the Community
Return to index
Dean Broadley
Posted Oct 28 - Read on Facebook

Hi Guys, I've started using Framer and it's awesome! Really improving my workflow. I've been having trouble with one thing though...Im trying to limit a layer's draggable direction on the x axis. I've managed to limit the layer from dragging to the left, but i need to do the opposite, limit it from dragging to the right. Any ideas?


Emanuele Salamone

Sure, you should use the draggable.maxDragFrame, something like this:
myLayer.draggable.maxDragFrame =
x: 0, y:0, width: 320, height: 160
Set the frame really big on width to be able to drag on right.

Dean Broadley

Thanks! I am currently using something like that, but i must be implementing it incorrectly because it still only limits the left drag.

This is what i have:
LayerName.draggable.maxDragFrame = LayerName.frame
LayerName.draggable.maxDragFrame.width *= 2

Dean Broadley

Oh so, basically what i want is to only be able to drag to the left and not to the right...If that makes sense :P

Dean Broadley

Aaaand...I figured it out! haha.

Alejandro Cámara López


Dean Broadley

Hi, so i used something closer to what Emanuele suggested.

LayerName.draggable.maxDragFrame = {x: -(Screen.width), y:0, width:(Screen.width*2), height:Screen.height}

So the draggable width area is double the screen width and it is set to one-half to the "left"

Hope that makes sense

Alejandro Cámara López

Aaag! I get it! nice

Koen Bok

I know this part of draggable needs improvement. I'm working on it :-)

Read the entire post on Facebook