NodePosition

Hi team!
I would like to know, How can I set a specfic postion for each node, when I am creating the nodeDataArry?

If you want to specify the position or location of each node in your model, that is both easy and common to do.

Add a property to each node data object in the model holding the X and Y point values. Add a Binding to your node template where the target property is either Node.position or Node.location and the source property is the name of the property that you added to the data.

This is discussed and illustrated at GoJS Data Binding -- Northwoods Software.

Especially this section: GoJS Data Binding -- Northwoods Software.

Thank you, I can do it, now I would like to know if I can get the current location of each node?

for any node, look at node.location

For all nodes:

myDiagram.nodes.each(function(n) {
  // Show the location of each node in the console:
  console.log(n.data.key + ": " + n.location.toString());
});

I wrote that by hand so there may be typos.