Updates: Cc: google....@ben.coman.com.au Labels: Component-Roassal
Comment #9 on issue 831 by alexandr...@gmail.com: Rossal problem with nested node translation to left of 0@0 http://code.google.com/p/moose-technology/issues/detail?id=831
Ben, I find that the examples are a bit difficult to understand. I propose a test method that is green in the last version of Roassal.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= testDraggingOnTheTopLeftCorner | view outterNode innerNode1 innerNode2 | view := ROView new. view @ RODraggable. outterNode := ROElement new. outterNode + (ROBox new extent: 50 @ 50). innerNode1 := ROElement new. innerNode1 + (ROBox blue extent: 10 @ 10). innerNode2 := ROElement new. innerNode2 + (ROBox green extent: 10 @ 10).
outterNode add: innerNode1. outterNode add: innerNode2. view add: outterNode. " view open "
"Witout dragging" self assert: innerNode1 position = (0 @ 0). self assert: innerNode2 position = (0 @ 0).
"Dragging innerNode" innerNode1 translateBy: -10 @ -10. self assert: innerNode1 position = (0 @ 0). self assert: innerNode2 position = (10 @ 10). -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
What do you think the position of innerNode1 and innerNode2 should be?