Hi Ben,
The reason is that node4 is a sprite, i.e., an draggable ROElement with a red border.
Since you add the interaction for a second time, node4 is dragged 2 times faster.
Remove the line "node4 addInteraction: RODraggable."
Alexandre
On Sep 3, 2012, at 12:20 PM, Ben Coman <btc(a)openInWorld.com> wrote:
In addition to logging this issue, I am curious why
dragging node4 moves twice as fast as the other 3 nodes. I could not trace it back.
moose-technology(a)googlecode.com wrote:
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 830 by google....(a)ben.coman.com.au: ROLabel dynamic text not updating
bounds/ROBorder properly
http://code.google.com/p/moose-technology/issues/detail?id=830
The code below results in the image attached, where you can see the ROBorder does not
encompass the text. The border should probably expand to encompass dynamically changing
shapes. but not necessarily since you may want to have a border only around the label with
the children having no border. The symptom is more that the width is inconsistent
between each of the text nodes.
-----------------
| view rawView node1 node2 node3 node4 |
rawView := ROView new.
view := ROMondrianViewBuilder view: rawView.
node1 := ROElement new .
node1 model: 'node1'.
node1 addShape: ROBorder.
node1 addShape: (ROLabel text: [ 'node1 ' , node1 bounds extent asString,
' ', node1 bounds asString ] ).
node1 addInteraction: RODraggable.
rawView add: node1.
node2 := ROElement new .
node2 model: 'node2'.
node2 addShape: ROBorder.
node2 addShape: (ROLabel text: [ 'node2 ', String crlf, node2 bounds extent
asString, ' ', node2 bounds asString ] ).
node2 addInteraction: RODraggable.
rawView add: node2.
node3 := ROElement new .
node3 model: 'node3'.
node3 addShape: ROBorder.
node3 addShape: (ROLabel text: [ 'node3 ', String crlf, node3 bounds extent
asString, String crlf, node3 bounds asString ] ).
node3 addInteraction: RODraggable.
rawView add: node3.
node4 := ROElement spriteOn: 'node4' .
node4 addShape: (ROLabel text: [ 'node4 ', String crlf, node4 bounds extent
asString, String crlf, String crlf, node4 bounds asString ] ).
node4 addInteraction: RODraggable.
rawView add: node4.
ROVerticalLineLayout on: rawView elements.
ROEaselMorphic new populateMenuOn: view.
view noLayout.
view open
This is Moose4.7 with Roassal.283 on Windows 7.
Attachments:
ROBorder does not encompass ROLabel text.png 17.6 KB
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.