Comment #8 on issue 888 by alexandr...(a)gmail.com: MondrianViewBuilder
should support a better zOrder
http://code.google.com/p/moose-technology/issues/detail?id=888
I thought about how can we address this. I put my thought here to make sure
my reasoning does not miss anything.
Apparently, the behavior of the zordering implies a deep change in Roassal
(which should not be that painful however). Currently, the nesting shown in
the visualization is reflected in the composition of Roassal elements. For
example, using the previous example, the view contains 4 elements: 1, 2, 3,
11->33. Element 1 contains 11, Element 2 contains 22 and Element 3 contains
33. The drawing of the view iterates on each elements contains in the view,
draw recursively each element.
This is the reason why the edge is drawn after nodes 1, 2, 3. The zIndex of
the edge is 3, and the top level nodes is 2. Since each node draws itself
and its subelements, nodes 22 is drawn before the edge, independently of
its zindex. A subelement has a relative position against its parent node
and the node lookup makes use of the relative position.
To properly address this issue, I think that all the elements should be
treated independently whether they are nested or not. There should be just
one collection that contains all the elements to be drawn. All elements
will have an absolute position.
I have started to work on this... Give me a few days