Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. jsPlumb.bind('beforeDrop', function(ci){ // Before new connection is created
  2.  
  3. var src=ci.sourceId;
  4. var con=jsPlumb.getConnections({source:src}); // Get all source el. connection(s) except the new connection which is being established
  5. if(con.length!=0 && $('#'+src).hasClass('exit'))
  6. for(var i=0;i<con.length;i++)
  7. jsPlumb.detach(con[i]);
  8. return true; // true for establishing new connection
  9.  
  10. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement