animation - Assigning different animationOptions to states on Coffeescript -


in code below, both states have same animation properties. how can assign different animation properties each state?

for check in anicheck     check.states.add         one:              opacity: 1             scale: 1         two:             scale: 0     check.states.animationoptions =         curve:"spring(400,25,50)"         delay: 2      iconfav.on events.click, ->         check.states.next("one","two") 

you can run function before switch event.

check.on events.statewillswitch, (oldstate, newstate) ->     if newstate == 'one'         check.animationoptions =              curve: 'spring(400,25,50)'             delay: 2     if newstate == 'two'         check.animationoptions =              curve: 'linear'             delay: 0 

i'm learning , build framer js example reference


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -