I'm using jsPlumb to connect divs with multiple endpoints. I'm trying to prevent multiple connectors between the same two divs. So for example, if I have divs A, B, C, I would like to have different end points so I can connect A to B and A to C from different end points, There is nothing given about this in the documentation
Does anyone know how to do this?
Thanks!
答案 0 :(得分:0)
取消分组放置点和实际链接创建点并定义多个锚点解决了问题
if (sd && td) {
var width = 1 / parentCount;
var left = width * idx;
var anchors = parentCount > 1 ? ["BottomCenter", [left,0,0,0]] : ["BottomCenter", "TopCenter" ],
connection = window.jsPlumb.connect({
source: s, target: t, newConnection:true, anchors: anchors
, deleteEndpointsOnDetach: true
});