Root Node has location of x: NaN, y: NaN

Hi Walter, I got this issue: firstly, when a diagram showing an empty canvas with a rootNode which has location of { x: NaN, y: NaN }; but after adding some new nodes and connect the added nodes together, the rootNode could be shown and with a location of { x: 0, y: 0}.
There is no default location set to rootNode.
Do you have any idea what cause this issue?

Yes, when a node has an unreal location, the diagram cannot know where to draw it. It is normally the responsibility of the layout to assign good locations to all of the nodes.

Are you using TreeLayout? Have you set TreeLayout.arrangement to https://gojs.net/latest/api/symbols/TreeLayout.html#static-ArrangementFixedRoots ? Then you had better make sure that all root nodes have good locations.

Hi, Walter, previously the TreeLayout set to { arrangement: TreeLayout.ArrangementVertical }.
Now I set location: new Point(0, 0) to the root node and it’s shown on canvas.

Oh, that’s odd. Perhaps you had set Node.isLayoutPositioned to false on that node?