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

What is Framer? Join the Community
Return to index
Emily Rautenberg
Posted Sep 06 - Read on Facebook

Hi all! I'm still pretty new to Framer, so I'm not sure if this is a bug or is intentional. A few times now, I have been working on a prototype in Framer, tested it in Preview, and it works fine, then when I pushed it to a cloud foundry instance, found random bugs that did not exist in preview. I figured out that the bugs were specifically related to when I was animating a layer, then animating back to it's default state. For simplicity's sake, I was basically doing this:

layerA = new Layer
y: 0

layerA.animate
y: layerA.states.default.y + 10

then later on...
layerA.animate
y: layerA.states.default.y

When I debugged layerA's default state in the Framer Preview, the default y coordinate was 0, as expected. In the browser, however, I was getting different values that I assumed were residual from other animations, or possibly due to my window size. As soon as I added this after declaring the layer, however, that default value was correctly populated as 0:

layerA.stateSwitch("default")

Has anyone else run into something similar before, or is
this just not how default states are designed to be used?

2 Comments

Aalok Trivedi

Why not just make one state and animate that? Then all you have to do is:

layerA.states.state1 =
y: layerA.y + 10

layerA.animate("state1")

Then to switch back:
layerA.animate("default")

Jon Madison

Are you using chrome for the preview?

Do you get the same experience in preview as you do on your safari browser?

I’m currently battling some egregious performance issues that don’t show up with the same magnitude on Chrome, but cause me problems in safari and safari mobile+Framer app

Read the entire post on Facebook