This is about functionality to arrange overlapping nodes.
SendToBack & BringToFront
I am using zOrder binding to achieve this.
Suppose node1 has zOrder:1 & node2 has zOrder:2. To bring node1 in front, i am increasing its zOrder to 2.
This does not work, both nodes has same zOrder. Only if i increase zOrder again to 3, i achieve the result.
How to achieve the desired result, in one action ?
You can call Diagram.findObjectsIn using your Node.actualBounds, looking for partial overlaps.
Use function(obj) { return obj.part; } as the navig parameter. Use a predicate that accurately classifies those nodes that you care about – e.g. must be an instanceof go.Node if you want to ignore all Links.