Hi,
This shows correct results for me -
var n1 = diagram.factory.createShapeNode(10, 30, 40, 20);
n1.setText("node 1");
var n2 = diagram.factory.createShapeNode(10, 50, 40, 20);
n2.setText("node 2");
n2.attachTo(n1);
function onNodeDoubleClicked(diagram, e)
{
alert(e.getNode().getText());
}
If your text node is set to Transparent, make sure its geometry isn't actually overlapping the main node's one. E.g. this will show the "node 2" text below main node, but node2's rectangle covers node1 completely and will get all double clicks -
var n1 = diagram.factory.createShapeNode(10, 30, 40, 20);
n1.setText("node 1");
var n2 = diagram.factory.createShapeNode(10, 30, 40, 60);
n2.setText("node 2");
n2.setTransparent(true);
n2.attachTo(n1);
If there's no overlapping geometries, please attach your diagram's json file.
Regards,
Slavcho
Mindfusion