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

What is Framer? Join the Community
Return to index
Ron Sparks
Posted Jul 07 - Read on Facebook

Wondering if anyone else has had this issue.

The short. I've been animating just fine using something like LayerA.states.switch() for Y position and now it's acting like it's switchInstant()

The y position is no longer animating when I call the states.switch() and instead the Layer is just appearing at the location it should animate to.

Wondering if anyone else has seen this happen with a larger/processor intense prototype?

3 Comments

Trevor Phillippi

Can you link an example?

Ron Sparks

I can't because of it's client work also it's huge with video content.

The code works in an older version. I'm going to look and see if I doing something like double calling the event to change the state or something....

Code looks something like this:
http://codepen.io/ronsparks/pen/rLzLxw?editors=0010

(with no format)
# event that changes state
all.on Events.Click, (event, layer) ->
event1_item_scroll.states.switch("open")
event1_item_title.states.switch("open")

# in a loop I build states for layers
window["#{compName}_item_scroll"].states.add
hidden:
y: 0
opacity: 0
backgroundColor:"rgba(255,255,255,0.52)"
open:
y: 440*eventItemCount
opacity: 1
backgroundColor:"rgba(255,255,255,0.52)"

Ron Sparks

okay following up on my own bad issue...

Basically I had an event which called something like LayerA.states.switch("open") there was also a funciton inside the event and so I was calling the switch for LayerA twice...

The result was a state conflict that made animation instant :)
I used a diff tool too see what was happening

Read the entire post on Facebook