Comment #2 on issue 831 by google....(a)ben.coman.com.au: Rossal problem with
nested node translation to left of 0@0
http://code.google.com/p/moose-technology/issues/detail?id=831
With the fix correcting the dynamic bounds of ROLabel, the use of #bounds
in the previously supplied test code causes recursion. Deleted that test
code and replaced with the code below.
| paramNodeCount translator view outer1 el outer2 offset |
paramNodeCount := 2.
translator := ROLayoutTranslator default.
view := ROView new @ RODraggable.
outer2 := (ROElement spriteOn: ' outer negative translation' ) +
ROLabel .
(1 to: paramNodeCount) do:
[ :n |
Transcript crShow: n.
el := (ROElement spriteOn: n negated) .
el addShape: (ROLabel text:
[ :elDynamic |
n negated asString, String crlf,
outer2 position asString, String crlf,
elDynamic position asString
] ) .
outer2 add: el.
offset := -50 * ( n@n ).
translator translate: el to: offset .
].
view add: outer2.
outer1 := (ROElement spriteOn: ' outer positive translation') +
ROLabel .
(1 to: paramNodeCount) do:
[ :n |
Transcript crShow: n.
el := (ROElement spriteOn: n).
el addShape: (ROLabel text:
[ :elDynamic |
n asString, String crlf,
outer1 position asString, String crlf,
elDynamic position asString
] ) .
outer1 add: el.
offset := 50 * ( n@n ).
translator translate: el to: offset .
].
view add: outer1.
view openInWindow.