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

What is Framer? Join the Community
Return to index
Sander Värv
Posted Sep 04 - Read on Facebook

Can someone explain the meaning of layer.idx?

I've seen it used a couple of times, but can't find anything in the documentation about it. Is it a shorthand for indexOf? When would you use it?

4 Comments

Sergey Voronov

its just variable in layer object, so u can talk to this property later on, for example getting index of the clicked layer

Jordan Robert Dobson

Yeah someone is just setting this themselves.

You could do rect.whateverYouWant = "true"

Just the same way.

Sander Värv

Thanks guys, didn't know you can set variables directly to the layer this way.

Jordan Robert Dobson

Careful though... I'd recommend storing them inside layer.custom.yourPropertyHere

Read the entire post on Facebook