Hi all,
I have the following situation: a node named ‘one’ and a node named ‘two’, I want to draw an arrow ‘onetwo' from one to two, and ‘twoone' from two to one. Nodes are ellipses with size 30, and a label. Arrows are an edge + line + arrow + label construct. So I get the image like below, which raises two2 questions.
First question: how can I make the arrows go to the border of the ellipse, instead of the center? Second question: as a human I would draw each of the two arrows with a curve: one curving up and one curving down so that they (and their labels) do not overlap. Can I do something like this in Roassal? Because now readability is far from optimal.
---> Save our in-boxes! http://emailcharter.org <---
Johan Fabry - http://pleiad.cl/~jfabry PLEIAD lab - Computer Science Department (DCC) - University of Chile
Hi Johan,
For your first question, you could change the attachPoint of the Lines, which will automatically change the arrow to appear on the border.
As for the "arched lines", there is a class called RTDirectedLine which does just that.
If you could provide a mockup code on what are you trying to do, I could help you further.
Regards, Ricardo
2014-04-25 9:10 GMT-03:00 Johan Fabry jfabry@dcc.uchile.cl:
Hi all,
I have the following situation: a node named ‘one’ and a node named ‘two’, I want to draw an arrow ‘onetwo' from one to two, and ‘twoone' from two to one. Nodes are ellipses with size 30, and a label. Arrows are an edge + line + arrow + label construct. So I get the image like below, which raises two2 questions.
First question: how can I make the arrows go to the border of the ellipse, instead of the center? Second question: as a human I would draw each of the two arrows with a curve: one curving up and one curving down so that they (and their labels) do not overlap. Can I do something like this in Roassal? Because now readability is far from optimal.
---> 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
Hi Ricardo,
thanks for the hints and offer of help. My mockup could would be this:
| view elements e1 e2 | view := RTView new. elements := ((RTEllipse new size: 30; color: Color white)) elementsOn: #(one two). view addAll: elements. elements @ RTDraggable. RTCircleLayout new initialRadius: 70; on: elements.
e1 := RTEdge from: elements first to: elements second. e1 + (RTLine new color: Color black) + (RTArrow new color: Color black) @ (RTLabelled new text: '12'; view: view). view add: e1. e2 := RTEdge from: elements second to: elements first. e2 + (RTLine new color: Color black) + (RTArrow new color: Color black) @ (RTLabelled new text: '21'; view: view). view add: e2. view open
On Apr 25, 2014, at 9:19 AM, Ricardo Jacas ricardo.jacas@gmail.com wrote:
Hi Johan,
For your first question, you could change the attachPoint of the Lines, which will automatically change the arrow to appear on the border.
As for the "arched lines", there is a class called RTDirectedLine which does just that.
If you could provide a mockup code on what are you trying to do, I could help you further.
Regards, Ricardo
2014-04-25 9:10 GMT-03:00 Johan Fabry jfabry@dcc.uchile.cl: Hi all,
I have the following situation: a node named ‘one’ and a node named ‘two’, I want to draw an arrow ‘onetwo' from one to two, and ‘twoone' from two to one. Nodes are ellipses with size 30, and a label. Arrows are an edge + line + arrow + label construct. So I get the image like below, which raises two2 questions.
<arrows.tiff>
First question: how can I make the arrows go to the border of the ellipse, instead of the center? Second question: as a human I would draw each of the two arrows with a curve: one curving up and one curving down so that they (and their labels) do not overlap. Can I do something like this in Roassal? Because now readability is far from optimal.
---> 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
-- lets reign all together _______________________________________________ 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
Hi Johan,
First question: how can I make the arrows go to the border of the ellipse, instead of the center?
Attachpoint is your friend.
-=-=-=-=-=-=-=-=-= | v e1 e2 l shape | v := RTView new.
e1 := ((RTEllipse new size: 20) + RTLabel) elementOn: 'one'. e2 := ((RTEllipse new size: 20) + RTLabel) elementOn: 'two'.
e1 @ RTDraggable. e2 @ RTDraggable.
e2 translateTo: 60 @ 40.
shape := RTLine new color: Color red. shape attachPoint: (RTShorterDistanceAttachPoint new). l := shape edgeFrom: e1 to: e2.
v add: e1; add: e2; add: l. -=-=-=-=-=-=-=-=-=
Second question: as a human I would draw each of the two arrows with a curve: one curving up and one curving down so that they (and their labels) do not overlap. Can I do something like this in Roassal? Because now readability is far from optimal.
We have no solution for now. Probably we need a new shape, something like RTDistinctLine that gives a variation when necessary. We can work on this, but not right now… You can also give a try if you wish.
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
Thanks Alex. But how about the RTDirectedLine that Ricardo mentioned ?? Will he be able to fix my mockup code with that?
On Apr 25, 2014, at 9:42 AM, Alexandre Bergel alexandre.bergel@me.com wrote:
Hi Johan,
First question: how can I make the arrows go to the border of the ellipse, instead of the center?
Attachpoint is your friend.
-=-=-=-=-=-=-=-=-= | v e1 e2 l shape | v := RTView new.
e1 := ((RTEllipse new size: 20) + RTLabel) elementOn: 'one'. e2 := ((RTEllipse new size: 20) + RTLabel) elementOn: 'two'.
e1 @ RTDraggable. e2 @ RTDraggable.
e2 translateTo: 60 @ 40.
shape := RTLine new color: Color red. shape attachPoint: (RTShorterDistanceAttachPoint new). l := shape edgeFrom: e1 to: e2.
v add: e1; add: e2; add: l.
<Screen Shot 2014-04-25 at 9.39.53 AM.png>
Second question: as a human I would draw each of the two arrows with a curve: one curving up and one curving down so that they (and their labels) do not overlap. Can I do something like this in Roassal? Because now readability is far from optimal.
We have no solution for now. Probably we need a new shape, something like RTDistinctLine that gives a variation when necessary. We can work on this, but not right now… You can also give a try if you wish.
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
The solution is a little verbose, but it does what you need :). Please update Roassal 2, since I just found a bug there.
| view elements e1 e2 | view := RTView new. elements := ((RTEllipse new size: 30; color: Color white)) 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). 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.
2014-04-25 9:49 GMT-03:00 Johan Fabry jfabry@dcc.uchile.cl:
Thanks Alex. But how about the RTDirectedLine that Ricardo mentioned ?? Will he be able to fix my mockup code with that?
On Apr 25, 2014, at 9:42 AM, Alexandre Bergel alexandre.bergel@me.com wrote:
Hi Johan,
First question: how can I make the arrows go to the border of the
ellipse, instead of the center?
Attachpoint is your friend.
-=-=-=-=-=-=-=-=-= | v e1 e2 l shape | v := RTView new.
e1 := ((RTEllipse new size: 20) + RTLabel) elementOn: 'one'. e2 := ((RTEllipse new size: 20) + RTLabel) elementOn: 'two'.
e1 @ RTDraggable. e2 @ RTDraggable.
e2 translateTo: 60 @ 40.
shape := RTLine new color: Color red. shape attachPoint: (RTShorterDistanceAttachPoint new). l := shape edgeFrom: e1 to: e2.
v add: e1; add: e2; add: l.
<Screen Shot 2014-04-25 at 9.39.53 AM.png>
Second question: as a human I would draw each of the two arrows with a
curve: one curving up and one curving down so that they (and their labels) do not overlap. Can I do something like this in Roassal? Because now readability is far from optimal.
We have no solution for now. Probably we need a new shape, something like RTDistinctLine that gives a
variation when necessary.
We can work on this, but not right now… You can also give a try if you
wish.
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
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
It would be great to have a singleton pattern for the attach point
Alexandre
Le 25-04-2014 à 9:57, Ricardo Jacas ricardo.jacas@gmail.com a écrit :
The solution is a little verbose, but it does what you need :). Please update Roassal 2, since I just found a bug there.
| view elements e1 e2 | view := RTView new. elements := ((RTEllipse new size: 30; color: Color white)) 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). 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.
2014-04-25 9:49 GMT-03:00 Johan Fabry jfabry@dcc.uchile.cl:
Thanks Alex. But how about the RTDirectedLine that Ricardo mentioned ?? Will he be able to fix my mockup code with that?
On Apr 25, 2014, at 9:42 AM, Alexandre Bergel alexandre.bergel@me.com wrote:
Hi Johan,
First question: how can I make the arrows go to the border of the ellipse, instead of the center?
Attachpoint is your friend.
-=-=-=-=-=-=-=-=-= | v e1 e2 l shape | v := RTView new.
e1 := ((RTEllipse new size: 20) + RTLabel) elementOn: 'one'. e2 := ((RTEllipse new size: 20) + RTLabel) elementOn: 'two'.
e1 @ RTDraggable. e2 @ RTDraggable.
e2 translateTo: 60 @ 40.
shape := RTLine new color: Color red. shape attachPoint: (RTShorterDistanceAttachPoint new). l := shape edgeFrom: e1 to: e2.
v add: e1; add: e2; add: l.
<Screen Shot 2014-04-25 at 9.39.53 AM.png>
Second question: as a human I would draw each of the two arrows with a curve: one curving up and one curving down so that they (and their labels) do not overlap. Can I do something like this in Roassal? Because now readability is far from optimal.
We have no solution for now. Probably we need a new shape, something like RTDistinctLine that gives a variation when necessary. We can work on this, but not right now… You can also give a try if you wish.
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
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- lets reign all together _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Yes, that sounds like a good idea!
On Apr 25, 2014, at 10:05 AM, Alexandre Bergel alexandre.bergel@me.com wrote:
It would be great to have a singleton pattern for the attach point
Alexandre
---> Save our in-boxes! http://emailcharter.org <---
Johan Fabry - http://pleiad.cl/~jfabry PLEIAD lab - Computer Science Department (DCC) - University of Chile
The lines look very cool this way, thanks! But the labels are still an issue :-( It’s clearest in a picture of my original example:
What can be done about this?
On Apr 25, 2014, at 9:57 AM, Ricardo Jacas ricardo.jacas@gmail.com wrote:
The solution is a little verbose, but it does what you need :). Please update Roassal 2, since I just found a bug there.
| view elements e1 e2 | view := RTView new. elements := ((RTEllipse new size: 30; color: Color white)) 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). 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.
2014-04-25 9:49 GMT-03:00 Johan Fabry jfabry@dcc.uchile.cl:
Thanks Alex. But how about the RTDirectedLine that Ricardo mentioned ?? Will he be able to fix my mockup code with that?
On Apr 25, 2014, at 9:42 AM, Alexandre Bergel alexandre.bergel@me.com wrote:
Hi Johan,
First question: how can I make the arrows go to the border of the ellipse, instead of the center?
Attachpoint is your friend.
-=-=-=-=-=-=-=-=-= | v e1 e2 l shape | v := RTView new.
e1 := ((RTEllipse new size: 20) + RTLabel) elementOn: 'one'. e2 := ((RTEllipse new size: 20) + RTLabel) elementOn: 'two'.
e1 @ RTDraggable. e2 @ RTDraggable.
e2 translateTo: 60 @ 40.
shape := RTLine new color: Color red. shape attachPoint: (RTShorterDistanceAttachPoint new). l := shape edgeFrom: e1 to: e2.
v add: e1; add: e2; add: l.
<Screen Shot 2014-04-25 at 9.39.53 AM.png>
Second question: as a human I would draw each of the two arrows with a curve: one curving up and one curving down so that they (and their labels) do not overlap. Can I do something like this in Roassal? Because now readability is far from optimal.
We have no solution for now. Probably we need a new shape, something like RTDistinctLine that gives a variation when necessary. We can work on this, but not right now… You can also give a try if you wish.
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
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- lets reign all together _______________________________________________ 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
What could be done, is to have the label a bit closer to one of the extremities. I am working on this right now.
Alexandre
On Apr 25, 2014, at 10:08 AM, Johan Fabry jfabry@dcc.uchile.cl wrote:
The lines look very cool this way, thanks! But the labels are still an issue :-( It’s clearest in a picture of my original example:
<arrows2.tiff>
What can be done about this?
On Apr 25, 2014, at 9:57 AM, Ricardo Jacas ricardo.jacas@gmail.com wrote:
The solution is a little verbose, but it does what you need :). Please update Roassal 2, since I just found a bug there.
| view elements e1 e2 | view := RTView new. elements := ((RTEllipse new size: 30; color: Color white)) 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). 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.
2014-04-25 9:49 GMT-03:00 Johan Fabry jfabry@dcc.uchile.cl:
Thanks Alex. But how about the RTDirectedLine that Ricardo mentioned ?? Will he be able to fix my mockup code with that?
On Apr 25, 2014, at 9:42 AM, Alexandre Bergel alexandre.bergel@me.com wrote:
Hi Johan,
First question: how can I make the arrows go to the border of the ellipse, instead of the center?
Attachpoint is your friend.
-=-=-=-=-=-=-=-=-= | v e1 e2 l shape | v := RTView new.
e1 := ((RTEllipse new size: 20) + RTLabel) elementOn: 'one'. e2 := ((RTEllipse new size: 20) + RTLabel) elementOn: 'two'.
e1 @ RTDraggable. e2 @ RTDraggable.
e2 translateTo: 60 @ 40.
shape := RTLine new color: Color red. shape attachPoint: (RTShorterDistanceAttachPoint new). l := shape edgeFrom: e1 to: e2.
v add: e1; add: e2; add: l.
<Screen Shot 2014-04-25 at 9.39.53 AM.png>
Second question: as a human I would draw each of the two arrows with a curve: one curving up and one curving down so that they (and their labels) do not overlap. Can I do something like this in Roassal? Because now readability is far from optimal.
We have no solution for now. Probably we need a new shape, something like RTDistinctLine that gives a variation when necessary. We can work on this, but not right now… You can also give a try if you wish.
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
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- lets reign all together _______________________________________________ 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
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
I have updated Roassal. Edges are now slightly closer to the ending extremities. Under the last version of Roassal, your code produces:
Alexandre
On Apr 25, 2014, at 10:08 AM, Johan Fabry jfabry@dcc.uchile.cl wrote:
The lines look very cool this way, thanks! But the labels are still an issue :-( It’s clearest in a picture of my original example:
<arrows2.tiff>
What can be done about this?
On Apr 25, 2014, at 9:57 AM, Ricardo Jacas ricardo.jacas@gmail.com wrote:
The solution is a little verbose, but it does what you need :). Please update Roassal 2, since I just found a bug there.
| view elements e1 e2 | view := RTView new. elements := ((RTEllipse new size: 30; color: Color white)) 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). 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.
2014-04-25 9:49 GMT-03:00 Johan Fabry jfabry@dcc.uchile.cl:
Thanks Alex. But how about the RTDirectedLine that Ricardo mentioned ?? Will he be able to fix my mockup code with that?
On Apr 25, 2014, at 9:42 AM, Alexandre Bergel alexandre.bergel@me.com wrote:
Hi Johan,
First question: how can I make the arrows go to the border of the ellipse, instead of the center?
Attachpoint is your friend.
-=-=-=-=-=-=-=-=-= | v e1 e2 l shape | v := RTView new.
e1 := ((RTEllipse new size: 20) + RTLabel) elementOn: 'one'. e2 := ((RTEllipse new size: 20) + RTLabel) elementOn: 'two'.
e1 @ RTDraggable. e2 @ RTDraggable.
e2 translateTo: 60 @ 40.
shape := RTLine new color: Color red. shape attachPoint: (RTShorterDistanceAttachPoint new). l := shape edgeFrom: e1 to: e2.
v add: e1; add: e2; add: l.
<Screen Shot 2014-04-25 at 9.39.53 AM.png>
Second question: as a human I would draw each of the two arrows with a curve: one curving up and one curving down so that they (and their labels) do not overlap. Can I do something like this in Roassal? Because now readability is far from optimal.
We have no solution for now. Probably we need a new shape, something like RTDistinctLine that gives a variation when necessary. We can work on this, but not right now… You can also give a try if you wish.
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
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- lets reign all together _______________________________________________ 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
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
(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 :-(
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
Also, could it be that changing colors of edges when they are already displayed is broken? If I have an RTEdge in the variable edge (and it is blue) and I do the following **after the view has already been opened** nothing happens:
edge shape color: Color red. edge update. view signalUpdate
On Apr 27, 2014, at 7: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
---> Save our in-boxes! http://emailcharter.org <---
Johan Fabry - http://pleiad.cl/~jfabry PLEIAD lab - Computer Science Department (DCC) - University of Chile
Strange. It works for me:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | v es edges shape | v := RTView new. es := (RTEllipse new size: 20; color: (Color blue alpha: 0.4)) elementsOn: (1 to: 20). RTCircleLayout new initialRadius: 100; on: es. v addAll: es.
shape := RTLine new color: Color red. edges := RTEdge buildEdgesFromObjects: (1 to: 20) from: [ :value | value // 2 ] to: #yourself using: shape inView: v.
v canvas addMenu: 'change color' callback: [ shape color: Color random. edges do: #update. v signalUpdate ].
v open -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Else, you can directly change the color of the Trachel shape behind the edge: -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | v es edges shape | v := RTView new. es := (RTEllipse new size: 20; color: (Color blue alpha: 0.4)) elementsOn: (1 to: 20). RTCircleLayout new initialRadius: 100; on: es. v addAll: es.
shape := RTLine new color: Color red. edges := RTEdge buildEdgesFromObjects: (1 to: 20) from: [ :value | value // 2 ] to: #yourself using: shape inView: v.
v canvas addMenu: 'change color' callback: [ edges do: [ :e | e trachelShape color: Color random ]. v signalUpdate ]. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Let me know how it goes...
v open
On Apr 27, 2014, at 5:11 PM, Johan Fabry jfabry@dcc.uchile.cl wrote:
Also, could it be that changing colors of edges when they are already displayed is broken? If I have an RTEdge in the variable edge (and it is blue) and I do the following **after the view has already been opened** nothing happens:
edge shape color: Color red. edge update. view signalUpdate
On Apr 27, 2014, at 7: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
---> 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
Sorry for the confusion. I have arrowheads on my edge shapes, so if in the code below you have
shape := (RTLine new color: Color red) + (RTArrow new color: Color red).
it does not work anymore :-( In your first example nothing happens and in your second example the arrowheads do not change.
Also, what is a TrachelShape?
On Apr 28, 2014, at 7:11 PM, Alexandre Bergel alexandre.bergel@me.com wrote:
Strange. It works for me:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | v es edges shape | v := RTView new. es := (RTEllipse new size: 20; color: (Color blue alpha: 0.4)) elementsOn: (1 to: 20). RTCircleLayout new initialRadius: 100; on: es. v addAll: es.
shape := RTLine new color: Color red. edges := RTEdge buildEdgesFromObjects: (1 to: 20) from: [ :value | value // 2 ] to: #yourself using: shape inView: v.
v canvas addMenu: 'change color' callback: [ shape color: Color random. edges do: #update. v signalUpdate ].
v open
Else, you can directly change the color of the Trachel shape behind the edge:
| v es edges shape | v := RTView new. es := (RTEllipse new size: 20; color: (Color blue alpha: 0.4)) elementsOn: (1 to: 20). RTCircleLayout new initialRadius: 100; on: es. v addAll: es.
shape := RTLine new color: Color red. edges := RTEdge buildEdgesFromObjects: (1 to: 20) from: [ :value | value // 2 ] to: #yourself using: shape inView: v.
v canvas addMenu: 'change color' callback: [ edges do: [ :e | e trachelShape color: Color random ]. v signalUpdate ].
Let me know how it goes...
v open
On Apr 27, 2014, at 5:11 PM, Johan Fabry jfabry@dcc.uchile.cl wrote:
Also, could it be that changing colors of edges when they are already displayed is broken? If I have an RTEdge in the variable edge (and it is blue) and I do the following **after the view has already been opened** nothing happens:
edge shape color: Color red. edge update. view signalUpdate
On Apr 27, 2014, at 7: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
---> 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
We are again facing the problem on shape composition.
Try this: -=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | v es edges shape | v := RTView new. es := (RTEllipse new size: 20; color: (Color blue alpha: 0.4)) elementsOn: (1 to: 20). RTCircleLayout new initialRadius: 100; on: es. v addAll: es.
shape := (RTLine new color: Color red) + (RTArrow new color: Color red). edges := RTEdge buildEdgesFromObjects: (1 to: 20) from: [ :value | value // 2 ] to: #yourself using: shape inView: v.
v canvas addMenu: 'change color' callback: [ edges do: [ :e | e trachelShape shape1 color: Color random. e trachelShape shape2 color: Color random ]. v signalUpdate ]. v open -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Cheers, Alexandre
On Apr 29, 2014, at 8:34 AM, Johan Fabry jfabry@dcc.uchile.cl wrote:
Sorry for the confusion. I have arrowheads on my edge shapes, so if in the code below you have
shape := (RTLine new color: Color red) + (RTArrow new color: Color red).
it does not work anymore :-( In your first example nothing happens and in your second example the arrowheads do not change.
Also, what is a TrachelShape?
On Apr 28, 2014, at 7:11 PM, Alexandre Bergel alexandre.bergel@me.com wrote:
Strange. It works for me:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | v es edges shape | v := RTView new. es := (RTEllipse new size: 20; color: (Color blue alpha: 0.4)) elementsOn: (1 to: 20). RTCircleLayout new initialRadius: 100; on: es. v addAll: es.
shape := RTLine new color: Color red. edges := RTEdge buildEdgesFromObjects: (1 to: 20) from: [ :value | value // 2 ] to: #yourself using: shape inView: v.
v canvas addMenu: 'change color' callback: [ shape color: Color random. edges do: #update. v signalUpdate ].
v open
Else, you can directly change the color of the Trachel shape behind the edge:
| v es edges shape | v := RTView new. es := (RTEllipse new size: 20; color: (Color blue alpha: 0.4)) elementsOn: (1 to: 20). RTCircleLayout new initialRadius: 100; on: es. v addAll: es.
shape := RTLine new color: Color red. edges := RTEdge buildEdgesFromObjects: (1 to: 20) from: [ :value | value // 2 ] to: #yourself using: shape inView: v.
v canvas addMenu: 'change color' callback: [ edges do: [ :e | e trachelShape color: Color random ]. v signalUpdate ].
Let me know how it goes...
v open
On Apr 27, 2014, at 5:11 PM, Johan Fabry jfabry@dcc.uchile.cl wrote:
Also, could it be that changing colors of edges when they are already displayed is broken? If I have an RTEdge in the variable edge (and it is blue) and I do the following **after the view has already been opened** nothing happens:
edge shape color: Color red. edge update. view signalUpdate
On Apr 27, 2014, at 7: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
---> 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
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
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
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