Disable automatic routing

Hi,

I’m writing visual editor for browser game to program bot AI.

The problem is I can’t find how to disable automatic link routing.

On the route “preview” its ok :

But when I release mouse button it become weird:

I need to connect it between exact points.

I used http://gojs.net/latest/samples/flowchart.html example.

Test page here : http://uni1.oldogame.ru/game/gfxeditor.htm

I haven’t had the chance to look at your page yet, but my first impression is that the links are not recording the port information that were specified when the link was drawn by LinkingTool.
If you save the model, does your link data have port identifiers? If not, check how you initialize your GraphLinksModel – have you set its linkFromPortIdProperty and linkToPortIdProperty to the names of the properties that hold the port identifiers on your link data?

{ "class": "go.GraphLinksModel", "nodeDataArray": [ {"category":"Label", "text":"Label", "key":-5, "loc":"224.6875 66"}, {"category":"Cond", "text":"Cond", "figure":"Diamond", "key":-4, "loc":"222.6875 150"}, {"category":"Branch", "text":"Branch", "key":-6, "loc":"220.6875 298"}, {"text":"Step", "key":-3, "loc":"216.6875 217"} ], "linkDataArray": [ {"from":-3, "to":-6}, {"from":-4, "to":-3, "visible":true}, {"from":-4, "to":-6, "visible":true}, {"from":-5, "to":-4}, {"from":-6, "to":-5} ]}<span style="line-height: 1.4;">


I missed

“linkFromPortIdProperty”: “fromPort”,
“linkToPortIdProperty”: “toPort”,
in GraphLinksModel :)



thanks)

By some reason myDiagram.model.toJson() not generated


"linkFromPortIdProperty": "fromPort",
  "linkToPortIdProperty": "toPort",

in output JSON-string.

I fixed it by forcing these statements, right after diagram creation:

    myDiagram = new go.Diagram("myDiagram");  // must name or refer to the DIV HTML element

    myDiagram.model.linkFromPortIdProperty = "fromPort";  // force port link to/from property
    myDiagram.model.linkToPortIdProperty = "toPort";

Now everything looks good ;)

OK, thanks for the confirmation.