Michael Wenz Messages: 1488 Registered: July 2009 Location: Walldorf, Germany
1) diagramEditor.getMouseLocation() returns the mouse position relative to
the root of the current viewport
2) applying diagramEditor.calculateRealMouseLocation(...) on that location
from 1) returns the mouse location relative to the root of the diagram
3) context.getTargetContainer().getGraphicsAlgorithm().getX()/getY() returns
the location of the of the target container relative to the diagram root
4) substracting 3) from 2) should be what you are looking for.