I'll have a look at it. And will write a few examples.

I don't use nesting. And yes drag and drop doesn't apply to the whole group for now, but it can be done (i think).

Well the bug is due to a nil returned by elementFromModel, but i fixed my code, so it seems ok.

Then groupBy: aBlock    aBlock must point to the "leader" of the group, I mean the element on which apply the outer layout in this case 100 must point to 0 and not 0 to 100, since 0 has edges and not 100. So change the + by a - is better.

In case the block returns nil or raise an exception, we use the model of the element, so we can pass a block which has sense only for the member of groups and not for the leader for example.

Mathieu

 

Le 28.07.2013 23:36, Alexandre Bergel a écrit :

It is interesting.
Even though, apparently you may want to use the classical nesting for this. The very first thing I've tried to do is to drag and drop a node, but nodes do not stay grouped when drag and dropping.

I do not understand how ROMixingLayout operates. Can you write some simple tests that are not about visualizing compile methods?

For example, I've tried this:

view shape rectangle color: Color red; size: 20.
view nodes: (0 to: 21).
view edgesFrom: [ :v | v \\ 3 ].

view shape rectangle color: Color green; size: 20.
view nodes: (100 to: 121).
 
view layout: (ROMixingLayout withInner: (ROGridLayout new) outer: ROTreeLayout new groupBy: [:v | v + 100 ]).

I get an error and I do not understand why.

Alexandre