Я пытаюсь сделать следующее, используя jsPlumb 1.3.16. 1. Добавьте конечные точки к двум div 2. Программно создайте соединение (см. ниже).
Проблема, с которой я сталкиваюсь, заключается в том, что соединение, похоже, создает свои собственные конечные точки, которые теперь скрывают исходные конечные точки. В результате я больше не могу создавать соединения с этих конечных точек. Похоже на проблему с z-индексом.
var connectorOptions = {
uniqueEndpoint:false,
maxConnections:-1,
newConnection:true,
endpoint: ["Rectangle", {
width: 15,
height: 15
}],
endpointStyle: {
fillStyle: "rgba(255,255,255,50)",
outlineColor: "#ccc",
outlineWidth: 1
},
setDragAllowedWhenFull: true,
connector: ["Straight"],
paintStyle: {
strokeStyle: "#ec51bb",
lineWidth: 4
},
connectorStyle: {
lineWidth: 4,
fillStyle: "#ec51bb"
},
overlays: [
["Arrow", {
width: 14,
length: 14,
foldback: 1,
location: 1,
id: "arrow"
}]
]
};
var endpointOptions = {
maxConnections:-1,
uniqueEndpoint:false,
isSource:true,
isTarget:true,
endpoint:["Rectangle", {
width:15,
height:15,
cssClass: "endPointStyle",
hoverClass: "endPointHoverStyle"
}],
setDragAllowedWhenFull:true,
paintStyle:{
strokeStyle: "#9f9f9f"
},
connectorStyle : {
lineWidth: 4,
strokeStyle:"#ec51bb"
},
connector:[ "Straight"],
connectorOverlays:[
[ "Arrow", {
width:14,
length:10,
foldback: 1,
location:1,
id:"arrow"
} ],
[ "Label", {
label:"",
id:"label"
} ]
]
};
jsPlumb.addEndpoint(itemId1,{ anchor:[ 0.5, -0.05, 0, 1, 0, -4 ] }, endpointOptions);
jsPlumb.addEndpoint(itemId2,{ anchor:[ 0.5, -0.05, 0, 1, 0, -4 ] }, endpointOptions);
var anchors= [[ 0.5, -0.05, 0, 1, 0, -4 ], [ 0.5, -0.05, 0, 1, 0, -4 ]];
var newConnection = jsPlumb.connect({
source: itemId1,
target: itemId2,
anchor: anchors
},
connectorOptions
);
anchor:"Continuous"
- person MrNobody007   schedule 15.01.2014