LambrechtsWouter / jsplumb

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

Prevent overlapping the connections #183

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi simon:
    Is there any property or function  can prevent overlapping the connections as attached ?
    Because when i use "jsPlumb.connect({ source: from, target: to });" for times,  the connections would be overlapped by each other, so that's the problem.

Original issue reported on code.google.com by chaoy...@gmail.com on 19 Jan 2012 at 6:36

Attachments:

GoogleCodeExporter commented 8 years ago
you need an layout-algorithm to prevent overlapping the connection.

e.g. sugiyama algorithm

Original comment by inmindl...@googlemail.com on 19 Jan 2012 at 10:24

GoogleCodeExporter commented 8 years ago
when you use the connect method, jsplumb assigns Endpoints at default locations 
and joins them together. so repeatedly calling that method just results in four 
Connections that are on top of each other, right.

the solution for this depends on your specific application.  i can't really 
tell what you need from that screenshot, but 'connect' is really just there as 
a convenience method.  for more serious applications you should add your own 
endpoints (using 'addEndpoint'), and use the anchor parameter to position them 
at different places.

Original comment by simon.po...@gmail.com on 19 Jan 2012 at 7:17

GoogleCodeExporter commented 8 years ago
if you follow up on this question please post it to the group i just created:

http://groups.google.com/group/jsplumb

Original comment by simon.po...@gmail.com on 19 Jan 2012 at 7:34