What does a GraphObject represent - Diagram? Node?
When I’m using the following function to programmatically click a node, I’m not getting correct location for node:
function clickLambda() {
var lambda = myDiagram.findNodeForKey(“Lambda”); // I’m able to get the node
if (lambda === null) return; var loc = lambda.location;
A GraphObject is the smallest unit of something that can be drawn.
That’s probably because you are calling that code before that node has gotten its location yet. Can you see that node in the viewport before you call your clickLambda function?
No, you are calling modifyNode and clickLambdabefore you can actually see the diagram that was loaded from the new model.
You can call those functions either after the Diagram is completely visible in the viewport, or if you want to call it programmatically, in or after an “InitialLayoutCompleted” DiagramEvent listener.