gojs: howto increase distance between links or links labels?

試著忘記壹切 提交于 2019-12-24 13:26:43

问题


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/


回答1:


Toggle the values of link.curviness:

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

See Link.curviness in the API



来源:https://stackoverflow.com/questions/24676887/gojs-howto-increase-distance-between-links-or-links-labels

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!