【问题标题】:In JointJs, how to have links between elements that resemble the 3ds max creation graphs?在 JointJs 中,如何在类似于 3ds max 创建图的元素之间建立链接?
【发布时间】:2017-07-30 19:49:39
【问题描述】:

我有一个 JointJs 图表。我希望图表中元素之间的链接如下所示:

我们开箱即用,而不是直线。

基本上,箭头在它们与目标相交的点处是水平的,并且平滑地弯曲。

如何做到这一点?

【问题讨论】:

    标签: javascript graph diagram jointjs


    【解决方案1】:

    链接连接器是您正在寻找的东西。

    你调整特定的链接:

    link.set('connector', { name: 'normal' });
    link.set('connector', { name: 'smooth' });
    link.set({name : 'rounded', args:{radius: 50}});
    

    或者您可以为图表中的所有链接设置默认值

    var paper = new joint.dia.Paper({
            width: 800,
            height: 800,
            gridSize: 1,
            model: graph,
            defaultConnector: {
                name: 'smooth'
            }
        });
    

    【讨论】:

      猜你喜欢
      • 2011-04-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-09-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多