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

What is Framer? Join the Community
Return to index
Edward Sanchez
Posted Oct 22 - Read on Facebook

How do I reference the x position of a specific state?

LFQueueOpen: {x: 431, width: 100, height: 48}

I want to reference the x of LFQueueOpen


How do I go back to my first state? It seems that the on load properties of a layer count as a state, but if I'm on state 3 I don't know how to go back to that default.



Edward Sanchez

To answer my own second question:
layerA.states.switch("default") goes to the first position. Would be nice if this went on documentation.

Andrew Nalband

I don't know that there's a way to reference the x value of a state. You can switch to that state and then get the x value of the layer - selection.x in your case. What are you trying to achieve by referencing the x value? Perhaps there's another way to get the result you want

Edward Sanchez

eek it IS there! but yeah, couldn't find it... It feels like it belongs under "switch" too.

Read the entire post on Facebook