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

What is Framer? Join the Community
Return to index
Ed Lea
Posted Dec 21 - Read on Facebook

I have a draggable layer that should either snap to y = 400 or y = 0. It should animate to one of those two depending on how much the user has dragged.

For example:

layer.on Events.DragEnd, ->
if layer.y < 300
layer.y = 0
else
layer.y = 400

I want dragged amount to determine the final position. The problem I'm having is that the overdrag is resetting the layer and that is overriding layer.y that I want to set.

Is there a way to pass the "final destination" to the draggable animation?