Hi,
I am coming back to the issue of zOrder. Here is a little example: view shape label text: #yourself. view nodes: (1 to: 20). view edges: (1 to: 20) from: [:x | x // 2] to: 1. view edges: (1 to: 20) from: [:x | x // 3] to: 2. view edges: (1 to: 20) from: [:x | x // 5] to: #yourself. view edges: (1 to: 20) from: [:x | x // 7] to: #yourself. view dominanceTreeLayout Open this one is Mondrian and then in the Roassal Easel (see attached screenshots). Then, try to select 1. In Roassal, you cannot select 1 because of the edges that go on top of it. What is more, you also can barely see it. This situation will always appear in graphs with edges that cross the nodes. Given that at least the MondrianViewBuilder should be about mapping domain models onto graphs, having a sensible zOrder, at least in the MondrianViewBuilder is important. Doru _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
I agree with you Doru. Two weeks ago I have seen Emmanuel Pietriga (INRIA guy) who has designed ZVTM. There is plenty of good ideas in it. One that I like is about managing the z-index. In ZVTM, different strategies can be plugged to compute the z-index. I took this idea for Roassal.
A view or a any graphical element can now have an instance of ROZOrdering that gives a zIndex to each added element. Here is an example: -=-=-=-=-=-=-=-=-=-=-=-= view raw zOrdering: (ROZOrdering new at: 5 put: #isEdge; at: 10 put: #isNotEdge). view shape label text: #yourself. view nodes: (1 to: 20). view edges: (1 to: 20) from: [:x | x // 2] to: 1. view edges: (1 to: 20) from: [:x | x // 3] to: 2. view edges: (1 to: 20) from: [:x | x // 5] to: #yourself. view edges: (1 to: 20) from: [:x | x // 7] to: #yourself. view dominanceTreeLayout. -=-=-=-=-=-=-=-=-=-=-=-= ROZOrdering also support dynamically computed zIndex, such as: -=-=-=-=-=-=-=-=-= view raw zOrdering: (ROZOrdering new at: [ :element | element depth ] put: true). -=-=-=-=-=-=-=-=-= This means that the zIndex is based on the nesting of the element. Currently this does not quite work since the zOrdering is not passed along the nesting. For the Mondrian DSL, we need a default ROZOrdering, probably based on the nesting depth. Any comment? Cheers, Alexandre On Dec 2, 2012, at 5:39 PM, Tudor Girba <[hidden email]> wrote: > Hi, > > I am coming back to the issue of zOrder. > > Here is a little example: > view shape label text: #yourself. > view nodes: (1 to: 20). > view edges: (1 to: 20) from: [:x | x // 2] to: 1. > view edges: (1 to: 20) from: [:x | x // 3] to: 2. > view edges: (1 to: 20) from: [:x | x // 5] to: #yourself. > view edges: (1 to: 20) from: [:x | x // 7] to: #yourself. > view dominanceTreeLayout > > Open this one is Mondrian and then in the Roassal Easel (see attached screenshots). > > Then, try to select 1. > > In Roassal, you cannot select 1 because of the edges that go on top of it. What is more, you also can barely see it. This situation will always appear in graphs with edges that cross the nodes. > > Given that at least the MondrianViewBuilder should be about mapping domain models onto graphs, having a sensible zOrder, at least in the MondrianViewBuilder is important. > > Doru > > -- > www.tudorgirba.com > > "Sometimes the best solution is not the best solution." > <1-mondrian.png><1-roassal.png> > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Free forum by Nabble | Edit this page |