Hareeshchandera / jsplumb

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

support non-loopback connections between endpoints on the same element #247

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Flowchart and StateMachine connectors will automatically do a 'loopback' 
connection if the source and target are on the same element.  Would be nice to 
be able to override this, maybe like:

loopback:false

on the addEndpoint/connect calls

Original issue reported on code.google.com by simon.po...@gmail.com on 31 May 2012 at 9:09

GoogleCodeExporter commented 8 years ago
i ended up doing this only for the StateMachine connector. With Flowchart 
connectors you can control the direction of their travel using the orientation 
of the anchors. With StateMachine you cannot so easily, and a loopback with 
StateMachine connectors is a completely different thing to a normal connection. 
so now you can say:

Connector:["StateMachine", { showLoopback:false } ]

and then any connections whose source and target is on the same element will 
not be drawn with a loopback connection.

Original comment by simon.po...@gmail.com on 21 Jun 2012 at 7:09