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
-=-=-=-=-=-=-=-=-=
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(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev