formans / jrfonseca

Automatically exported from code.google.com/p/jrfonseca
0 stars 0 forks source link

[xdot] Adding URL support for edges #45

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The Nodes have the attribute URL which allows for catching the 'click' signal 
while embedding the widget and doing awesome things. However, the edges do not 
have this attribute. This patch should correct the issue.

PS: The indentation might be a little off.

Original issue reported on code.google.com by musically.ut on 20 Nov 2010 at 4:53

Attachments:

GoogleCodeExporter commented 9 years ago
Your Edge::get_url computes the distance to the edge end points only. This is 
the opposite of the desired here, as it will interfere with the edge-jumps, and 
it will ignore clicks on the middle of the edge.

The right way would be to: compute the minimum distance to each line segment 
for each successive line pair of the edge; and each point; accept if less than 
a threshold and neares point not the start/end point.

Original comment by Jose.R.F...@gmail.com on 14 Feb 2011 at 12:24

GoogleCodeExporter commented 9 years ago

Original comment by Jose.R.F...@gmail.com on 8 Apr 2013 at 5:48