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

What is Framer? Join the Community
Return to index
Jonathan Tran
Posted Dec 12 - Read on Facebook

Hi all,

I'm new to Framer. Wondering if anyone knows how to traverse up from a nested child to find the highest parent or its scrollComponent. Using "layer.superLayer.superLayer.superLayer" at the moment.

Many thanks.


Benjamin Den Boer

Hey Jonathan Tran, you can get all of a layers superLayers by looping over them — "for superLayer in childB.superLayers()". If you just want to find the highest parent, you could push the results within an array, and then always return the last (highest) one. :-)

Jonathan Tran

Thank you so much for the quick response. That's amazing. Many, many thanks Benjamin Den Boer!

Marc Krenn (edit: smaller fixes)

One single line, no array-modifications, no loop. :)

Andreas Wahlström

If you know the name of the superlayer, you can use this module: eg. layer.findSuperLayer('layername')

Sergio Masellis

Anyone have a "bower-like" site for framer.js modules?

Read the entire post on Facebook