Hi,
In this sample, Draggable Link, I have added following lines:
myDiagram.addDiagramListener("ExternalObjectsDropped", function (e) {
e.diagram.startTransaction("Add attached local meter");
var newNode = {name: "newNode",figure: "Circle",};
e.diagram.model.addNodeData(newNode);
e.diagram.commitTransaction("created node");
var selectNode = null;
e.diagram.nodes.each((e) => {
if (e.data == newNode)
selectNode = e
});
console.log(selectNode.location.x +" \t"+ selectNode.location.y) // NaN NaN
console.log(selectNode.actualBounds.x +" \t" +selectNode.actualBounds.y) // NaN NaN
});
When object dropped from pallete, I am adding new node and trying to get the location of the object. that location is always returns NaN. In node template location is twoway binded.