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

What is Framer? Join the Community
Return to index
Jonathon Toon
Posted Aug 20 - Read on Facebook

Is it possible to chain event functions to multiple layers with a single instance instead of writing the same function multiple times?

Eg: (layer1, layer2, layer2).on Events.TouchStart, ->...

2 Comments

Cemre Güngör

you could use [layer1, layer2, layer3].forEach (layer) -> ...

Jonathon Toon

Oh right, so regular Coffeescript works? Awesome.

Read the entire post on Facebook