我有一段時間,jsPlumb嘗試從同一個源錨點創建兩個連接。jsplumb:從同一個源錨點創建兩個連接
例如,在下面的jsfiddle我試圖創建從塊1錨兩個連接到其他兩個區塊2和3 http://jsfiddle.net/dutchman71/TYerW/3/
出於某種原因,在jsPlumb例子正常工作在這裏與綠點錨點。 http://jsplumb.org/jquery/draggableConnectorsDemo.html#
有誰能告訴我我失蹤了什麼嗎?
var endpointOptions = {
anchor:"BottomCenter",
maxConnections:-1,
isSource:true,
isTarget:true,
endpoint:["Dot", {radius:6}],
setDragAllowedWhenFull:true,
paintStyle:{fillStyle:"#5b9ada"},
connectorStyle : { lineWidth: 4, strokeStyle:"#5b9ada" },
connector:[ "Bezier", { curviness:1 }],
connectorOverlays:[
[ "Arrow", { width:15, length:15, location:1, id:"arrow" } ],
[ "Label", { label:"", id:"label" } ]
]
}
jsPlumb.bind("ready", function() {
jsPlumb.addEndpoint('block1', endpointOptions);
jsPlumb.addEndpoint('block2', endpointOptions);
jsPlumb.addEndpoint('block3', endpointOptions);
jsPlumb.draggable('block1');
jsPlumb.draggable('block2');
jsPlumb.draggable('block3');
});
謝謝你給這個答案,讓我也卡住了。 –