I am trying to draw an overlay with new Layer in framer for popup / modal overlays. For some reason the placeBehind or placeBefore properties are being ignored. Any ideas as to why?
overlay = new Layer width: screen.width , height: screen.height backgroundColor: "#000", opacity:0.3overlay.placeBehind(layerItShouldBeBehind)
Do these two layers share a common superLayer, or are they removed from superLayers altogether? If not, this will not work.
not too familiar with what superLayers are and how to use them :(
superLayers are parent of subLayer, for example, layerA is superLayer of layerB, it means that layerB is inside layerA, layerB is subLayer (or child) of layer A, 1 layer can have many subLayers (or children) if you update Framer studio to 1.12.5, you can see the layers tree. To say layerA is superLayer of layerB: layerB.superLayer = layerA or layerA.addSubLayer(layerB)
Mark, when you have questions about basic elements or properties Framer, the docs are there to help. The superLayer property is well documented. But basically, what Văn says above is correct. A superLayer is just a parent layer to any other layer. If your layers have two different parent layers, the placeBehind and placeBefore methods will not work.
Thanks for your help guys. I find the docs to not be that helpful when my code just won't do what i want. Maybe it's the context but I figured it out