I have one stage and multiple layers which are superposed. I refer to each layer with a button. I must allow the user to draw on those multiple layers whenever he clicks on one button, and swap between them. How can I check which layer is on top of the others?
I tried layer.getAbsoluteZIndex()
but it's not obvious. Is there a method that actually return true/false for example, maybe like .isOnTop()
?
EDIT :
Well, I had to implement it by my own and it was okay I guess. The easiest solution was to add a boolean attribute isOnTop
in the definition of each layer and make the appropriate tests and treatments.