Hi,

I am trying to use Mondrian for a case in which I have nested elements and crosscutting edges. The issue is that I only found a cumbersome way to specify the layout.

Here is an example:

view := RTMondrian new.
view shape rectangle fillColor: Color transparent.
nodes := view nodes: { { 1 . 2 } . { 11 . 12 } } forEach: [ :col |
view nodes: col ].
view edges source: { 1 . 11 } connectFrom: [ :x | x ] to: [ :x | x + 1 ].
view edges source: { 1 . 2 } connectFrom: [ :x | x ] to: [ :x | x + 10 ].
nodes do: [ :each | 
RTNest new
layout: RTTreeLayout new;
on: each nest: each nestedElements ].
view

With bold I have showed the code necessary for applying the layout. In previous versions of Roassal/Mondrian, layouts were applied lazily, after the graph was constructed. This allowed us to write something like this:

view := RTMondrian new.
view shape rectangle fillColor: Color transparent.
view nodes: { { 1 . 2 } . { 11 . 12 } } forEach: [ :col |
view nodes: col.
view layout tree ].
view edges source: { 1 . 11 } connectFrom: [ :x | x ] to: [ :x | x + 1 ].
view edges source: { 1 . 2 } connectFrom: [ :x | x ] to: [ :x | x + 10 ].
view

Did I miss something or is this the only way supported currently?

Cheers,
Doru


--
www.tudorgirba.com
www.feenk.com

"To utilize feedback, you first have to acquire it."