Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 7069

Links rerouting when node textblock is edited

$
0
0

@Brad wrote:

Hi iam using Gojs for generating flowcharts. I am having a trouble with links. While editing a node's textblock the links that are connected between the nodes are shrinking .
Pls see attached screenshot :

1) My original structure :

2) After I edit the text in the first node

This happens even when dragging the nodes .
This is my link template
myDiagram.linkTemplate =
$(go.Link, // the whole link panel
{

      routing: go.Link.AvoidsNodes,
      curve: go.Link.JumpOver,
      corner: 5, toShortLength: 4,
      relinkableFrom: true,
      relinkableTo: true,
      reshapable: true,
      resegmentable: false,
      // mouse-overs subtly highlight links:
      mouseEnter: function(e, link) { link.findObject("HIGHLIGHT").stroke = "rgba(30,144,255,0.2)"; },
      mouseLeave: function(e, link) { link.findObject("HIGHLIGHT").stroke = "transparent"; }
    },
    new go.Binding("points").makeTwoWay(),
    $(go.Shape,  // the highlight shape, normally transparent
      { isPanelMain: true, strokeWidth: 8, stroke: "transparent", name: "HIGHLIGHT" }),
    $(go.Shape,  // the link path shape
      { isPanelMain: true, stroke: "gray", strokeWidth: 2 }),
    $(go.Shape,  // the arrowhead
      { toArrow: "standard", stroke: null, fill: "gray"}),
    $(go.Panel, "Auto",  // the link label, normally not visible
      { visible: true, name: "LABEL", segmentIndex: 2, segmentFraction: 0.5},
      new go.Binding("visible", "visible").makeTwoWay(),
      $(go.Shape, "RoundedRectangle",  // the label shape
        { fill: "white", stroke:null}),
      $(go.TextBlock,  // the label
        {
          textAlign: "center",
          font: "10pt helvetica, arial, sans-serif",
          stroke: "black",
          editable: true
        },
        new go.Binding("text", "text").makeTwoWay())
    )
  );

Please help . Thanks in advance

Posts: 4

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles