I am struggling to solve an issue regarding Z-ordering of nodes in the same layer. Here is a description of the issue:
I have implemented a drag/drop tool by extending the default Dragging tool. When I drag more than one node on the canvas, and I drag them over a specific area, I want the nodes to stack on top of each other. I have already implemented the animations that places all of the nodes in a stacked order, but the problem comes in with the z-index of each node - because I have no control, the z-index hardly ever functions properly, unless the nodes I select on the canvas, are selected in the same order that they are rendered.
I don’t want to go an add each and every selected node into their own layer - it seems like the wrong solution for something that should really be simple?
To see what I mean, please have a look at these two images. The first is a sample of what it looks like when the 3 nodes are selected, the second is what it looks like when they are stacked. In the second image, you will only see the outlines of 2, because the 3rd node is z-indexed at the back, eventhough it is the 2nd selected object in the collection of draggedParts.
Please let me know how to solve this issue.