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
Post a Comment