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.
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. :-) http://share.framerjs.com/z78nkqodn0gx/
Thank you so much for the quick response. That's amazing. Many, many thanks Benjamin Den Boer!
http://share.framerjs.com/cyirp6fsyu2q/ (edit: smaller fixes)
One single line, no array-modifications, no loop. :)
If you know the name of the superlayer, you can use this module: https://github.com/awt2542/Layers-for-Framer eg. layer.findSuperLayer('layername')
Anyone have a "bower-like" site for framer.js modules?