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

What is Framer? Join the Community
Return to index
David Wertheimer
Posted Nov 17 - Read on Facebook

Has anyone written a (debugging) function for Framer that outputs the layer stack with all the layers sorted by layer group, visibility and z-index so that we can easily see which layers are where in the hierarchy? I have a layer which is mysteriously not displaying (must be in the wrong place in z-index), despite my trying to bringToFront(). I figure somebody must have created a debugging function like this.


Benjamin Den Boer

The easiest way is to print the indeces of two layers and compare the two.

print layerA.index
print layerB.index

David Wertheimer

Thanks, Benjamin. Just wanted to see all the layers. (1) How can I get an array of all layers (including imported and added) so that I can loop through and look at the .index of each, and (2) How can I capture ANY click on the viewport and see what layers are being touched without having to add event listeners to every single layer? I have a layer that I believe should be getting clicked, but the listener does not fire, so I want to know what layer is actually getting the click. Thanks in advance.

Read the entire post on Facebook