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

What is Framer? Join the Community
Return to index
Noam Elbaz
Posted Aug 13 - Read on Facebook

I want an element to rotate relative to its drag distance from origin. (the farther the drag, the larger the rotation). How would I begin thinking of this issue?


Noam Elbaz

Ah... I get it. That's what dragMove is for.

Johannes Eckert

To remember the "origin" I always do something like
layer.originalX = layer.x

I'll use that in my math. You can also do this with layer.originalMidX for example

Noam Elbaz

Great. That helped. Can you explain what .originalMidX does?

Johannes Eckert

The same thing. Its just a custom variabke Name on the layer that you set once to use it later. So at the beginning of your prototype, just save the initial midX into originalMidX so you can use it later

Marc Krenn

Hey Noam,
I've made an example-file for you. If you have any further question, feel free to ask.



Read the entire post on Facebook