Thank you. 

Best regards,
Natalia


On Nov 11, 2014, at 3:02 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote:

As Nicolai said, you need to explicitly say that you want the edges to be considered in the layout using #useInLayout.

Additionally, you may want to play with the charge and length in the layout. Consider the following example:

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
builder := RTGraphBuilder new.

builder nodes shape: (RTEllipse new size: 20).
builder edges
connectTo: [ :c | c subclasses ];
useInLayout;
shape: (RTLine new color: Color gray).

builder layout force
charge: -300;
length: 20.

builder addAll: Boolean allSuperclasses, Boolean withAllSubclasses.

builder build.
builder view
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

We give a repulsion of -300 to each node (which is what you want since nodes have to repulse each other), and you give a length of 20 pixel to each edge.
You end up with something like:
<Screen Shot 2014-11-11 at 11.01.43 AM.png>

Cheers,
Alexandre


-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On Nov 10, 2014, at 8:17 AM, Natalia Tymchuk <natalia.tymchuk@unikernel.net> wrote:

Hello.
I’m trying to use Force based layout to position some elements. I expected to get the image like this.
<Screen Shot 2014-11-10 at 11.16.54.png>
Using this code http://ws.stfx.eu/LACEUL5X6K1S  I got something different and I don’t know why. 
 <Screen Shot 2014-11-10 at 12.01.11 PM.png>
It looks like all elements attract instead of repel each other. Does somebody know why it is like that?

Best regards,
Natalia

_______________________________________________
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