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

What is Framer? Join the Community
Return to index
Niels van Hoorn
Posted Oct 06 - Read on Facebook

The latest stable release of Framer contains an updated version of Framer Library with a breaking change:

layer.states.current has been renamed to layer.states.current.name
layer.states.previous has been renamed to layer.states.previous.name

This can cause unexpected behaviour when doing things like

if layer.states.current == “stateA”
. # do something

So be careful when upgrading your projects or starting new ones! This makes it possible to retrieve the current state object (so the properties that are changed) of a layer through layer.states.current

These changes are part of a bigger upgrade to the animation API, you can read about them here: https://github.com/koenbok/Framer/wiki/New-Animation-API https://github.com/koenbok/Framer/wiki/New-Animation-API

5 Comments

Dmitry Sholkov

Love what you guys are doing with states.

Will there be a way to assign different animation properties (delay, time, repeat) for different layer properties (x, y, scale, rotation, opacity..etc.)?

Say I want to animate a layer to x:200 with a certain curve, and opacity from 0 to 1, but I want to delay fade in by 0.3 sec.

Dmitry Sholkov

another question then. Would be cool to have ability to have a handle that allows to place layer visually as you create state. as it was before.

Tojo Rakoto Ramanantsoa

Is this already valid? Can we already use it? Is the old ones valid too or will we get errors? It would be nice to have the documentations updated too :)

JL Flores Mena

Any updates on when can we expect the full API to be available?
layer.states.next("stateB","stateC") no longer works, and .stateCycle() is not available yet. The current fix is particularly painful because you'd need to use if/else statements for all states in your desired cycle.

Jeongmin Kim

5 minutes ago I opened my old Framer file but it didn't work. After using print, I found a bunch of properties in states... Now I understand why!

Read the entire post on Facebook