Looks cool, thanks a lot!
On Apr 28, 2014, at 7:02 PM, Alexandre Bergel alexandre.bergel@me.com wrote:
Hi!
I have added a #offsetOnEdge: to RTLabelled. The method takes as argument a float, between 0.0 and 1.0. 1.0 means it is on the starting extremity. 0.0 means it is on the ending extremity.
Here is an example:
-=-=-=-=-=-=-=-=-=-=-=-= | view elements e1 | view := RTView new. elements := ((RTEllipse new size: 30; color: Color black)) elementsOn: #(one two). view addAll: elements. elements @ RTDraggable. RTCircleLayout new initialRadius: 70; on: elements.
e1 := RTEdge from: elements first to: elements second. e1 + (RTDirectedLine new color: Color black; attachPoint: RTShorterDistanceAttachPoint new) + (RTArrow new color: Color black; attachPoint: RTShorterDistanceAttachPoint new) @ (RTLabelled new text: '12'; view: view; offsetOnEdge: 0.3). view add: e1. "e2 := RTEdge from: elements second to: elements first. e2 + (RTDirectedLine new color: Color black; attachPoint: RTShorterDistanceAttachPoint new) + (RTArrow new color: Color black; attachPoint: RTShorterDistanceAttachPoint new) @ (RTLabelled new text: '21'; view: view). view add: e2." view open. -=-=-=-=-=-=-=-=-=-=-=-=
Cheers, Alexandre
On Apr 27, 2014, at 8:28 AM, Johan Fabry jfabry@dcc.uchile.cl wrote:
(Back online now, I was/am traveling …)
Thanks Alex, it looks better now. But the labels are actually at the beginning extremities, maybe it would be better to indeed have them at the end? Look at the example to see the current situation, it does not look so good when the lines are long (green and orange line), plus for me it is confusing to have the label at the beginning of the line (blue lines).
Also, font size is not uniform anymore, I have no idea why this suddenly changed. Not pretty :-(
<123.tiff>
On Apr 25, 2014, at 11:25 AM, Alexandre Bergel alexandre.bergel@me.com wrote:
I have updated Roassal. Edges are now slightly closer to the ending extremities. Under the last version of Roassal, your code produces: <Screen Shot 2014-04-25 at 11.24.36 AM.png>
Alexandre
---> Save our in-boxes! http://emailcharter.org <---
Johan Fabry - http://pleiad.cl/~jfabry PLEIAD lab - Computer Science Department (DCC) - University of Chile
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
---> Save our in-boxes! http://emailcharter.org <---
Johan Fabry - http://pleiad.cl/~jfabry PLEIAD lab - Computer Science Department (DCC) - University of Chile