Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make multiple connection from the source endpoint in jsplumb

Tags:

jsplumb

I am trying to make a flowchart using jsplumb library. I need make multiple connections from a single div. Ex- Div 1 should connect to Div 2 and Div 3. I want the source endpoint to be the same i.e bottomcenter. Please let me know what should be done to make this work Thanks!

like image 374
unix_user Avatar asked Aug 16 '12 17:08

unix_user


1 Answers

For Target End Points set it global to make unlimited connections:

  var targetEndpoint = {
endpoint: "Dot",
paintStyle: { fillStyle: "blue", radius: 7 },
hoverPaintStyle: endpointHoverStyle,
maxConnections: -1,
dropOptions: { hoverClass: "hover", activeClass: "active" },
isTarget: true,
overlays: [["Label", { location: [0.5, -0.5], label: "", cssClass: "endpointTargetLabel" }]]
}; 

for source Endpoint set it global to make unlimited connections:

var sourceEndpoint = {
endpoint: "Dot",
paintStyle: {
    strokeStyle: "green", fillStyle: "green", radius: 3, lineWidth: 1
},
isSource: true,
maxConnections: -1,
connector: ["Flowchart", { stub: [40, 60], gap: 10, cornerRadius: 5, alwaysRespectStubs: true }],
connectorStyle: connectorPaintStyle, hoverPaintStyle: endpointHoverStyle, connectorHoverStyle: connectorHoverStyle,
dragOptions: {},
overlays: [["Label", { location: [0.5, 1.5], label: "", cssClass: "endpointSourceLabel", }]]
};
like image 95
Vatsal Pathak Avatar answered Sep 29 '22 10:09

Vatsal Pathak