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

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

Getting in to States & using .next()
Is there such thing as .previous()
If I scroll down 50px --> Next State
but If I scroll up 50px --> Previous state.
My guess is to use .current to somehow subtract one to get to the previous state??

5 Comments

Benjamin Den Boer

Hey Noam, yes:
layerA.states.previous()

Noam Elbaz

awesome. Searched but didn't see that in the Documentation.

Koen Bok

Note to self to add this.

Guillermo Romero Jr

hrmm, previous doesn't seem to work. anyone have a workaround?

Niels van Hoorn

With the new animation API,
layer.animate "previous"
and
layer.animate(layer.states.previous)
should work as well

Read the entire post on Facebook