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

What is Framer? Join the Community
Return to index
Rob Jones
Posted May 23 - Read on Facebook

This might be more JS than Framer, but I was looking at the animation chaining example on the site and was curious about why the "return" labels were added:

return hingeAnimation.on('end', function() {
return notification.animate({
properties: {
y: 768,
rotationZ: 45
curve: 'cubic-bezier',
time: 2

The example works fine without them... just curious


Tisho Georgiev

The returns were added, because this particular example was automatically translated from coffeescript. If you look at the coffeescript version of the example, there are no returns. Since coffeescript has implicit returns (the result of the last statement in a function is always its return value), they get added.

You're absolutely right that they aren't needed, and I should probably edit down the JS version of the example to avoid confusion.

Read the entire post on Facebook