【问题标题】:Programmatic connection in jsplumbjsplumb 中的程序化连接
【发布时间】:2014-07-01 12:48:27
【问题描述】:

如何在 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"});

所以结论是这样的事情会起作用,但它不会..

有没有办法访问源和目标的图像端点(参数)url? 也许是这样的: connectionname.endpoints[0].endpoint.type('url')??

【问题讨论】:

    标签: jsplumb


    【解决方案1】:

    试试这样:

    endpoints: [ ['Image', {src:'nameofpicture1.png'}], ['Image', {src:'nameofpicture2.png'}] ]
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-01-12
      • 1970-01-01
      • 2013-06-16
      • 2013-09-17
      • 2022-01-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多