Comment #3 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
Just another example perhaps a bit quicker to follow. In the attachment,
Image A is the reference being all translations in the positive direction
for e11, e12 & e13. Image B is what I believe should be the result for
e21, e22 & e23, where the relative orientation of e21 & e22 remains the
same as e11 & e12. However the current results is Image C. Image D shows
the result is different if the two translator lines for el23 & el22 are
swapped in order. Whereas I think it would be good if the resulting
layout was independent of the order that the translates are executed.
I am trying to chase this down myself, and it seems to me that the culprit
is in ROAdjustSizeNesting>>on: where a negative top left corner is
relocated back to 0@0, but I need to do more to understand what is
happening.
cheers -ben
--------------------
| paramNodeCount translator view outer1 outer2 el offset el11 el12 el13
el21 el22 el23 |
paramNodeCount := 2.
translator := ROLayoutTranslator default.
view := ROView new @ RODraggable.
outer1 := (ROElement spriteOn: ' outer1' ) + ROLabel .
outer1 add: (el11 := (ROElement spriteOn: 11) + (ROLabel text: [ :my | my
model asString, String crlf, my position asString ] ) @ RODraggable ).
outer1 add: (el12 := (ROElement spriteOn: 12) + (ROLabel text: [ :my | my
model asString, String crlf, my position asString ] ) @ RODraggable ).
outer1 add: (el13 := (ROElement spriteOn: 13) + (ROLabel text: [ :my | my
model asString, String crlf, my position asString ] ) @ RODraggable ).
outer2 := (ROElement spriteOn: ' outer2' ) + ROLabel .
outer2 add: (el21 := (ROElement spriteOn: 21) + (ROLabel text: [ :my | my
model asString, String crlf, my position asString ] ) @ RODraggable ).
outer2 add: (el22 := (ROElement spriteOn: 22) + (ROLabel text: [ :my | my
model asString, String crlf, my position asString ] ) @ RODraggable ).
outer2 add: (el23 := (ROElement spriteOn: 23) + (ROLabel text: [ :my | my
model asString, String crlf, my position asString ] ) @ RODraggable ).
"Sprites default to extent 50@50. e11 & e21 positioned at 0@0"
translator translate: el13 to: (200@200) .
translator translate: el12 to: (50@50).
translator translate: el23 to: (200@200) negated.
translator translate: el22 to: (50@50) .
view add: outer1.
view add: outer2.
ROHorizontalLineLayout on: view elements.
view openInWindow.
------------------
Attachments:
roassal-issue831-example2.png 28.6 KB