| v es eb |
v := RTView new.
v @ RTDraggableView @ RTZoomableView.
es := (RTEllipse new size: 12) elementsOn: (0 to: 2).
v addAll: es.
es do: [ :each | each @ RTDraggable @ RTLabelled ].
eb := RTEdgeBuilder new.
eb shape arrowedLine.
eb
view: v;
elements: es;
connectFrom: [ :value | value // 3 ].
RTTreeLayout new on: es.
v
The connectFrom: [ :value | value // 3 ] , in this case, create edges you probably do not want to have. Such has 0 -> 0. Apparently the layout cannot handle this. Would be great to fix this by the way.
Another version of your script could be:
-=-=-=-=-=-=-=-=-=-=-=-=
| v es eb |
v := RTView new.
v @ RTDraggableView @ RTZoomableView.
es := (RTEllipse new size: 12) elementsOn: (0 to: 2).
v addAll: es.
es do: [ :each | each @ RTDraggable @ RTLabelled ].
eb := RTEdgeBuilder new.
eb shape arrowedLine.
eb
view: v;
elements: es;
fromAssociations: { 0 ->1 . 0 ->2 }.
RTTreeLayout new on: es.
v
-=-=-=-=-=-=-=-=-=-=-=-=
It produces, as expected:
I have to say I did not understand much about the other questions. For example, the first script, titled RTCircleLayout, what is the question exactly ?
Anyway, I had a look at your chapter, it is indeed an excellent start! Thanks for this!
It would be great if:
- you put the script to execute in the chapter. The readers should be able to cut and paste the script from the chapter into Roassal. You may then reduce the size of each figure by having just the graphic, and not the GT window.
This is great! Please continue!
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Hi Alex,
I've done a first rough draft of the chapter, there are still missing parts because I need to figure out the internal workings of some layouts and I've encountered some issues.
Also I need to run it through spell-check. :)
Anyway, here is a list of questions and problems I have encountered when going through it. There things that definitely looks like bugs, some of it might be result of my misunderstanding (or not).
So please if you could look at the questions and give some response... either in the gist or on the mailing list (or somewhere). Meanwhile I'll continue improving the chapter and adding more text and simplifying the examples.
Peter
_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.chhttps://www.iam.unibe.ch/mailman/listinfo/moose-dev