Node actual position

Could someone tell me how to get actual position of node ? or how to get position when node is moving ?
Which event have to listen or catch ? Diagram event or node event ? Does someone have any code example ?

node.actualBounds.position, or node.actualBounds.x and node.actualBounds.y

What is it you are trying to do?

I try to remove node if it is out side of groupTemplate. I should catch event when node is moving and then check actual position and if is out side border then remove.

So if I understand you correctly, you are saying that while the user is dragging a node, if the node moves out of a particular area that node should be deleted? Even if the node only temporarily moves out of the area? That seems like a very unusual requirement. It would be much more reasonable if the deletion only occurred upon a drop – i.e. when the dragging operation was completed.

After all, what should happen when the user hits the Escape key?

And what should happen when the user is dragging several nodes at once? Do they all need to move out of the group’s area for them all to be deleted, or is each one deleted as soon as they are dragged out?

I think you ought to implement a “SelectionMoved” DiagramEvent listener to accomplish what I think your requirement should be. You’ll need to decide on the detailed policies when multiple nodes are involved.

If the node moves out of a particular area and there dropped that node should be deleted.
Escape key isn’t supported.
Several nodes at once - I don’t knew.


Do you have any example of how to use SelectionMoved ?

Have you searched the sources?