Quantcast
Channel: Northwoods Software - Latest topics
Viewing all articles
Browse latest Browse all 7424

I need get link point to json format

$
0
0

@samanelf wrote:

hi
i have flowchart and i need get link.point in json format
i can get link.points in mouse enter event when flowchart loading
here is the points format
166,103.95,166,113.95,166,145.5,3.0000000000000284,145.5,3.0000000000000284,177.05,3.0000000000000284,187.05
but when i add new link or move link points format change toList(Point)#17006
so how i can get List(Point)#17006 format to json like that 166,103.95,166,113.95,166,145.5,3.0000000000000284,145.5,3.0000000000000284,177.05,3.0000000000000284,187.05
without save and reload the mydiagram ?

here is my link code
myDiagram.linkTemplate =
$(go.Link,
{
routing: go.Link.AvoidsNodes,
curve: go.Link.JumpOver,
corner: 5, toShortLength: 4,
relinkableFrom: true,
relinkableTo: true,
reshapable: true,
resegmentable: true,

          mouseEnter: function(e, link) { link.findObject("HIGHLIGHT").stroke = "rgba(30,144,255,0.2)"; showPoint(link.location);


           var elt = document.getElementById("P18_FROMID");
           var elt2 = document.getElementById("P18_TOID");
           var elt3 = document.getElementById("P18_FROMPORT");
           var elt4 = document.getElementById("P18_TOPORT");
            var elt5 = document.getElementById("P18_LINKPOINT");
            elt.value =link.data.from;
            elt2.value =link.data.to;
            elt3.value =link.data.fromPort;
            elt4.value =link.data.toPort;
            elt5.value =link.data.points;
                                        } ,
          mouseLeave: function(e, link) { link.findObject("HIGHLIGHT").stroke = "transparent"; }
        },
        new go.Binding("points").makeTwoWay(),
        $(go.Shape,
          { isPanelMain: true, strokeWidth: 8, stroke: "transparent", name: "HIGHLIGHT" }),
        $(go.Shape,
          { isPanelMain: true, stroke: "gray", strokeWidth: 2 }),
        $(go.Shape,
          { toArrow: "standard", stroke: null, fill: "gray"}),
        $(go.Panel, "Auto",
          { visible: false, name: "LABEL", segmentIndex: 2, segmentFraction: 0.5},
          new go.Binding("visible", "visible").makeTwoWay(),
          $(go.Shape, "RoundedRectangle",
            { fill: "#F8F8F8", stroke: null }),
          $(go.TextBlock, "Yes",
            {
              textAlign: "center",
              font: "10pt helvetica, arial, sans-serif",
              stroke: "#333333",
              editable: true
            },
            new go.Binding("text").makeTwoWay())
        )
      );

thanks for reply

Posts: 7

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7424