public void mousePressed(EditorMouseEvent e) {
double mx = e.getX(), my = e.getY();
if (currentSelection.contains(mx, my)) {
currentSelection.startDragging(mx, my);
} else {
DiagramElement element = editor.getDiagram().getChildAt(mx, my);
if (element != NullElement.getInstance()) {
currentSelection = element.getSelection(editor);
} else {
currentSelection = selector;
}
currentSelection.startDragging(mx, my);
}