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

What is Framer? Join the Community
Return to index
Nathan Manousos
Posted May 17 - Read on Facebook

Is there a way to capture the current state of a layer as a state? I tried layer.states.add('original', layer.properties) but when I switch to that state, the layer becomes hidden.

6 Comments

Koen Bok

You ran into a bug :-/ that should totally be possible. I justed fixed it here: https://github.com/koenbok/Framer/commit/e86abfa3d8071493cd85f42b97c8d95b2323d751

Thanks for finding! You can download the fixed build at http://builds.framerjs.com

Koen Bok

Also note that every layer states object gets a "default" state by default which is the original state.

Nathan Manousos

Nice, thanks for the quick update :)

Nathan Manousos

In my quick test, it seemed like 'default' was updated when I changed the properties directly, but maybe I overlooked something.

Koen Bok

"default" gets created at the moment you call layer.states for the first time, could that explain?

Nathan Manousos

Ah, most likely.

Read the entire post on Facebook