Model data is alter automaticly

When i add a picture to node template.
i initial node data using Diagram.model = go.Model.fromJson(data) .
The linkDataArray points is altering automaticly。

right data:


error data:

  myDiagram.linkTemplate =
                $go(go.Link,  // the whole link panel
                    {
                        routing: go.Link.AvoidsNodes,
                        curve: go.Link.Orthogonal,
                        corner: 5, toShortLength: 4,
                        relinkableFrom: false, 
                        relinkableTo: false,
                        reshapable: false, 
                        resegmentable: true,
                        // mouse-overs subtly highlight links:
                        mouseEnter: function (e, link) {
                            /*link.findObject("HIGHLIGHT").stroke = "rgba(30,144,255,0.2)";*/
                            link.findObject("HIGHLIGHT").stroke = "rgba(0,153,204,1)";
                        },
                        mouseLeave: function (e, link) {
                            link.findObject("HIGHLIGHT").stroke = "transparent";
                        }
                    },
                    new go.Binding("points").makeTwoWay(),
                    $go(go.Shape,  
                        {isPanelMain: true, strokeWidth: 2, stroke: "transparent", name: "HIGHLIGHT"}),
                    $go(go.Shape,  // the link path shape  
                        {isPanelMain: true, stroke: "#009aca", strokeWidth: 1}),
                    $go(go.Shape, // the arrowhead  
                        {toArrow: "standard", stroke: null, fill: "#009aca"}),
                    $go(go.Panel, "Auto",  // the link label, normally not visible
                        {visible: false, name: "LABEL", segmentIndex: 2, segmentFraction: 0.5},
                        new go.Binding("visible", "visible").makeTwoWay(),
                        $go(go.Shape, "RoundedRectangle",  // the label shape
                            {fill: "#F8F8F8", stroke: "red"}),
                        $go(go.TextBlock, "Yes",  // the label
                            {
                                textAlign: "center",
                                font: "10pt helvetica, arial, sans-serif",
                                stroke: "#333333",
                                editable: true
                            },
                            new go.Binding("text").makeTwoWay())
                    )
                );

I do not understand what your question is.

If you want to save and load Link routes (i.e. Link.points), you should not be expecting that the saved routes will be accurate when the nodes have changed size or location.

@walter I save json data to model. I guess initialing not load completely. And then the points of linkDataArray is turn into float type.So,diagram will be confused.

I still do not understand what the problem is.

The TwoWay Binding of Link.points will automatically update the model link data property as the link is rerouted. The route consists of a List of Points where the x and y values are always numbers. Model.toJson will convert that List of Points into an Array of numbers.

Ok. I have solved my problem. Thanks. @walter