myDiagram.commit((d:any) => { // d === myDiagram
console.log(d)
let x = 300;
var data = d.nodes[0]
d.nodes.each((node:any) => {
if (node.data.is_primary == true) {
node.scale = 1.2;
node.moveTo(x, node.position.y);
//node.toSpot(200);
// node.set(node.data, "color", "red");
// node.locationSpot.y = 200;
const shape = node.findObject("SHAPE");
return
};
node.scale = 0.4; // shrink each node
});
}, "change position");
From above code my location is not rendering in the diagram and on the other hand node scale is working perfectly. can you please tell me how can we change the location of the node.