--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
On Apr 23, 2014, at 5:41 PM, Johan Fabry
jfabry@dcc.uchile.cl wrote:
>
> Ok, thanks for the help. Playing with the length instvar of the layout solved my problem of having the nodes too close together.
>
> On Apr 23, 2014, at 4:43 PM, Alexandre Bergel
alexandre.bergel@me.com wrote:
>
>>> I am having an issue with setting up a Roassal layout. I guess that to make force based layouts work, I have to add the line
>>>
>>> view edges do: [ :e | e trachelShape pushBack ].
>>
>> This has the effect of moving the edges back in the view. Nodes will therefore appear in front of the edges.
>>
>> You do not need edges actually for the force based layout. Consider this example:
>> -=-=-=-=-=-=-=-=-=
>> | v es |
>> v := RTView new.
>> es := (RTEllipse new size: 20; color: (Color blue alpha: 0.4)) elementsOn: (1 to: 30).
>> v addAll: es.
>> RTForceBasedLayout on: es.
>> v
>> -=-=-=-=-=-=-=-=-=
>>
>> <Screen Shot 2014-04-23 at 4.37.59 PM.png>
>>
>>
>>> However when I do this, there is a MNU in TRCompositeShape>>pushback, because the canvas instvar is nil. I am doing what is essentially the following code:
>>>
>>> “in a loop, adding to an edges collection”
>>> edges add: (((RTEdge from: efrom to: eto) + (RTLine new color: color) + (RTArrow new color: color)) @ (RTLabelled new text: trans name; color: color; view: view)).
>>>
>>> “later"
>>>
>>> “adding the edges to the view all at once and do layout magic"
>>> view addAll: edges.
>>> view edges do: [ :e | e trachelShape pushBack ]. “<— MNU”
>>>
>>> What should I do to fix this?
>>
>> You’ve found a bug in TRCompositeShape. I’ve just fixed it
>>
>> Cheers,
>> Alexandre
>>
>>>
>>> ---> Save our in-boxes!
http://emailcharter.org <---
>>>
>>> Johan Fabry -
http://pleiad.cl/~jfabry
>>> PLEIAD lab - Computer Science Department (DCC) - University of Chile
>>>
>>>
>>> _______________________________________________
>>> 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
>
>
>
> ---> Save our in-boxes!
http://emailcharter.org <---
>
> Johan Fabry -
http://pleiad.cl/~jfabry
> PLEIAD lab - Computer Science Department (DCC) - University of Chile
>
>
> _______________________________________________
> Moose-dev mailing list
> Moose-dev@iam.unibe.ch
>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev