On Thu, May 30, 2013 at 9:57 PM, Tudor Girba <tudor@tudorgirba.com> wrote:
Hi,
Not really. You could do it because you in your example you controlled the objects corresponding to the roots of the hierarchy.But by definition, the tree has always a root. In my opinion the computation of the root is the necessary step in a layout involving trees. You can compute the root by looking at the incoming connections and setting as the root the one which does not have any, or has the least?. We had this problem when we have to represent a graph as a tree, we ask the user to provide the root.
Here is my challenge. Make this graph layout the trees it can and wrap the lines afterwards:
view nodes: (1 to: 100).
view edgesFrom: [ :x | x atRandom ].
:)
For everyone else: the idea is to be able to compose layouts out of layout pieces. For example, we should be able to apply a tree layout and then arrange the resulting trees in a flow layout or in a compact rectangle layout.
Cheers,
Doru
> <test 2 layouts.png>_______________________________________________
On May 30, 2013, at 5:41 PM, mathieubmddehouck@mailoo.org wrote:
> Hi
>
>
> We speak with Tudor about mixing layout, and here is something I try.
>
> ====================================
>
> | view rawView |
> rawView := ROView new.
> view := ROMondrianViewBuilder view: rawView.
> "-------------"
> "-------------"
>
> view shape rectangle borderColor: (Color white).
>
> view nodes: ROObject withAllSubclasses forEach: [ :each |
> view nodes: each withAllSubclasses .
> view edgesFrom: #superclass.
> view layout: (ROTreeLayout new horizontalGap: 4) .
> ].
>
> view layout:( RORectanglePackingLayout new ratioWidth: 100 height: 100 ).
>
> "-------------"
> "-------------"
> "Below is the initiation of the menu and opening the visualization"
> ROEaselMorphic new populateMenuOn: view.
> view open
>
>
> =======================================
>
>
> So, it seems it can be done with not too long a script.
>
>
>
>
> Regards
>
> Math
>
>
> Moose-dev mailing list
> Moose-dev@iam.unibe.ch
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
www.tudorgirba.com
"Reasonable is what we are accustomed with."
_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev