【问题标题】:How to make multiple endpoint from the source connection in jsplumb如何从 jsplumb 中的源连接创建多个端点
【发布时间】:2015-09-01 21:44:13
【问题描述】:

我正在使用 jsPlumb 将 div 与多个端点连接起来。我试图防止相同的两个 div 之间有多个连接器。因此,例如,如果我有 div A、B、C,我希望有不同的端点,这样我就可以从不同的端点将 A 连接到 B 和 A 到 C,文档中没有给出任何内容

有人知道怎么做吗?

谢谢!

【问题讨论】:

    标签: jsplumb


    【解决方案1】:

    取消对放置点和实际链接创建点进行分组并定义多个锚点解决了该问题

    if (sd && td) {
                  var width = 1 / parentCount;
                  var left = width * idx;
                  var anchors = parentCount > 1 ? ["BottomCenter",        [left,0,0,0]] : ["BottomCenter", "TopCenter" ],
    connection = window.jsPlumb.connect({
                 source: s, target: t, newConnection:true, anchors: anchors
                , deleteEndpointsOnDetach: true
                                             });
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多