LambrechtsWouter / jsplumb

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

Disallow jsPlumb to make connection from a node to itself #306

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
i want to make a restriction on the connections, i dont want to allow a 
connection that has the same source and target.

Original issue reported on code.google.com by HalaKuwa...@gmail.com on 5 Jan 2013 at 7:31

GoogleCodeExporter commented 8 years ago
you can do this already with beforeDrop interceptors:

http://jsplumb.org/doc/content.html#beforeDrop

Original comment by simon.po...@gmail.com on 5 Jan 2013 at 9:19

GoogleCodeExporter commented 8 years ago
jsPlumb.bind("beforeDrop", function(info) {
  return info.sourceId != info.targetId;
});

Original comment by simon.po...@gmail.com on 5 Jan 2013 at 9:28