GOJS links render incorrectly, correct upon user moving node

441 views Asked by At

Using GOJS and typescript: I have a GraphLinksModel based on the Sequential Links example wherein each node contains two tables called "constraints" and "results". The items populating those tables are dynamically based on on the itemArray defined in a JSON object. Each item in results always links to one other item in the subsequent node's constraints, it is always a 1:1 relationship. Ports are defined in the item templates that populate each table, wherein each tableRow is one port. This is done in the same manner used in the Record Mapper example.

My problem is that when the graph initially loads, the links connect from the entire results table to the entire constraints table instead of from the result row/port to the constraint row/port. However, when the user moves a node, the links immediately move to the correct result/constraint ports and stay there. I have no idea why this behavior would happen incorrectly upon rendering but self-adjust upon user behavior...or how to fix it; I would greatly appreciate guidance.

Initial Render

After Node Movement

Sequential Links Example: gojs.net/latest/samples/sequentialFunction.html

Record Mapper Example: gojs.net/latest/samples/records.html

1

There are 1 answers

1
Simon Sarris On BEST ANSWER

Are you saving the link points in your model with a two-way binding on the points, but in the model that you are loading, the points are erroneous? That's one possibility.

What go.js version are you using?