hi ,
Please provide some examples to add new node in the external button click to add Rectangle/Circle shape in the Go Js.
How to add dynamically node data to different shapes in the existing diagram.
myDiagram.startTransaction(“make new node”);
var node = go.GraphObject.make(
go.Node,
“Horizontal”,
{ key:“gamma”, locationSpot: go.Spot.Center, rotatable: true },
go.GraphObject.make(go.Shape, “Circle”, {
fill: “blue”,
stroke: null,
strokeWidth: 0,
})
)
myDiagram.model.addNodeData(node);
myDiagram.commitTransaction(“make new node”);