Comment #7 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 deleted comment 3 to update the code to remove the erroneous extra
@RODragable applied to each sprite - since they are already draggable.
------------------------
Just deleted comment 3 to update the code to remove the erroneous extra
@RODragable applied to each sprite - since they are already draggable.
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 ] ) ).
outer1 add: (el12 := (ROElement spriteOn: 12) + (ROLabel text: [ :my | my
model asString, String crlf, my position asString ] ) ).
outer1 add: (el13 := (ROElement spriteOn: 13) + (ROLabel text: [ :my | my
model asString, String crlf, my position asString ] ) ).
outer2 := (ROElement spriteOn: ' outer2' ) + ROLabel .
outer2 add: (el21 := (ROElement spriteOn: 21) + (ROLabel text: [ :my | my
model asString, String crlf, my position asString ] ) ).
outer2 add: (el22 := (ROElement spriteOn: 22) + (ROLabel text: [ :my | my
model asString, String crlf, my position asString ] ) ).
outer2 add: (el23 := (ROElement spriteOn: 23) + (ROLabel text: [ :my | my
model asString, String crlf, my position asString ] ) ).
"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.
------------------
Also, referring to example4.png, just another thing where I notice my
298.mcz is not correct is shown by dragging the '0@0' element in 'outer
1'. Moving it in the positive direction is fine, moving in line with the
cursor, but moving in the negative direction the element doubles in speed.
Also the 50@50 and 200@200 nodes should remain stationary but instead move
in the negative direction.