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

What is Framer? Join the Community
Return to index
Charlie Sneath
Posted Sep 22 - Read on Facebook

EDIT: Figured it out. Got the initial settings for draggable constraints on the ScrollComponent, which can be used to switch the layer back to regular scrolling behavior after it's been constrained.

(Note: the draggable constraints are being set on the content layer with in the scroll component.)

scrollComponent.content.draggable.constraints =
x: 0
y: -(scrollComponent.content.height - Screen.height)
height: scrollComponent.content.height * 2 - Screen.height
width: Screen.height


Is it possible to toggle constraints for draggable layers? I'm trying to work with a tall, scrollable area that has 2 states:

1) freely scrollable without constraint

2) scrolling is constrained within a small area (expected use of constraint feature)

As soon as I include the constraints, I seem to be locked in this behavior. Turning `draggable.enabled = false` removes ability to scroll, and trying to reset with `draggable.contraints = null` also doesn't work.

Maybe I'm misunderstanding how to use this?

Thanks for any ideas!


Jordan Robert Dobson

Can you not adjust the constraints?

Jordan Robert Dobson

Reset them to a new value besides null. Like Screen?

Charlie Sneath

I'm setting the drag constraint on the content layer inside a ScrollComponent

Read the entire post on Facebook