I’m creating an ERD diagram and I’m allowing users to drag and save the location of a node’s position.
What I noticed is that despite saving and persisting the node location, when I reload the page, it appears in the wrong location.
As an example, in the screenshot, I haven’t moved the nodes “Sweet Kimchi” nor “Kimchi Tasks”. I have moved the node called “User”.
However, when I reload the page, I appears to the left of the “Sweet Kimchi” node but technically in the wrong location:
This is a snippet of the node template:
return $(
go.Node,
"Auto",
new go.Binding("location", "loc", go.Point.parse),
new go.Binding("isLayoutPositioned", "usesOverrideLoc", function (v) {
return !v;
}),
{
name: "NODE",
isShadowed: true,
shadowOffset: new go.Point(2, 2),
selectionAdorned: false,
cursor: "pointer",
click: nodeClicked,
mouseEnter: mouseEnteredNode,
mouseLeave: mouseLeftNode,
alignment: go.Spot.Center
},
Is there something I’m doing wrong here?