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

What is Framer? Join the Community
Return to index
Sergey Voronov
Posted Oct 29 - Read on Facebook

On yesterdays Framer JS London meetup we were discussing that pointing to sublayers can be painful thing:) So I found a way to do it with "dot" -

layerA = new Layer

layerA.layerB=layerB = new Layer
superLayer:layerA

print layerA.layerB

Of course this is no news for people who actually knows what they are doing with coffescript:) But for me it was a big discovery.

http://share.framerjs.com/rrbe7iqk8r3b/

4 Comments

Sigurd Tapio Mannsåker

Just make sure never to name your layers anything that also happens to be a Layer property (there are lots) :) To check, you can console.log(layerA) and see everything that comes up.

Jordan Robert Dobson

Or just store it in the custom property. ;)

Jordan Robert Dobson

Jordan Robert Dobson

Yeah you have to insert custom in there. It's a bit safer.

Read the entire post on Facebook