GoJS:如何增加链接或链接标签之间的距离? [英] gojs: howto increase distance between links or links labels?

查看:716
本文介绍了GoJS:如何增加链接或链接标签之间的距离?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何增加链接(双链接)之间的距离?

How to increase distance between links (double links)?

myDiagram.linkTemplate=
    $(go.Link,  // the whole link panel
        $(go.Shape,  // the link shape
            { isPanelMain: true,
                stroke: "black" }),
        $(go.Shape,  // the arrowhead
            { toArrow: "standard",
                stroke: null }),
        $(go.Panel, "Auto",
            $(go.Shape,  // the link shape
                { fill: radgrad, stroke: null }),
            $(go.TextBlock,  // the label
                { textAlign: "center",
                    font: "10pt helvetica, arial, sans-serif",
                    stroke: "#919191",
                    margin: 4 },
                new go.Binding("text", "text"))
         )
     );

http://jsfiddle.net/66ENu/

推荐答案

切换link.curviness的值:

myDiagram.linkTemplate=
    $(go.Link,  // the whole link panel
      { curviness: 20 },
      // ... rest of link template

请参见API中的 Link.curviness

这篇关于GoJS:如何增加链接或链接标签之间的距离?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆