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

What is Framer? Join the Community
Return to index
Benjamin Lehn
Posted Oct 14 - Read on Facebook

My syntax here is wrong, but is something like this possible?

layer.draggable.enabled = true
----noDrag: { draggable.enabled: false }
layer.on Events.Click, - >

the goal is to toggle the draggable state on a layer on click


Koen Bok

I think you are looking for something like this:

Benjamin Lehn

That works well for the blur property, but I'm not sure about how to create a layer state where draggable is disabled, like:

----fixed: { layer.draggable.enabled = false }

George Kedenburg III

Benjamin, this is what you're looking for:

George Kedenburg III

It seems simple on paper, but it does require a little bit more logic than you realize, because we need to determine if the user is clicking or dragging. Without that, the initial drag click will reset the draggability.

Read the entire post on Facebook