如何在jsplumb中重新创建/重绘具有两个不同图像端点的连接?
例如:
instance.connect({source:"source", target:"target", anchors:["Bottom", "Top"],
endpoint:[ "Image" , {url:"nameofpicture.jpg"} ], connector: "Flowchart"});
这适用于一个图像(源图像和目标元素上的图像相同)
instance.connect({source:"source", target:"target", anchors:["Bottom", "Top"],
endpoints:["Dot","Rectangle"], connector: "Flowchart"});
这适用于连接两个具有不同端点(不是相同范围)的元素
instance.connect({source:"source", target:"target", anchors:["Bottom", "Top"],
endpoints:["Image",{url:"nameofpicture1.jpg"},"Image", {url:"nameofpicture2.jpg"}], connector: "Flowchart"});
所以结论是这样的东西会起作用,但它不会......
有没有办法访问源代码和目标的Image端点(参数)网址? 也许是这样的: connectionname.endpoints [0] .endpoint.type(' URL')...
答案 0 :(得分:1)
试试这样:
endpoints: [ ['Image', {src:'nameofpicture1.png'}], ['Image', {src:'nameofpicture2.png'}] ]