Move multiple nodes as a whole by code(not by drag)

i want to move multiple nodes together as a whole , and i don’t want to select them ,
the nodes include group, node , links , GoJS Tools -- Northwoods Software, in this example ,drag select two nodes then they will drag to move as a whole , but i just want to use code to move them , is there a simple way ?
or i had to move them one by one by redefine the location

can i add all nodes to a group ,then group.moveTo(new position)

If you want to move programmatically some Nodes without moving others, call Diagram | GoJS API.

Yes, you could create a Group out of certain Nodes, but then you would really be changing the structure of your diagram. That would be a little more work to implement.

1 Like

thank u walter