if(dragEvent != null && dragEvent.phase == DragEventPhase.dragUpdate) {\r
dragEvent.phase = DragEventPhase.dragEnd;\r
editor.handleEvent(dragEvent);\r
- } \r
- \r
- ReleaseEvent event = new ReleaseEvent(\r
- Modifiers.modifierString(e.getButton(), e.isControlDown(), e.isAltDown(), e.isShiftDown()),\r
- editor.screenToDiagram(e.getPoint()),\r
- e.getLocationOnScreen()\r
- );\r
- event.pickedElements = dragEvent.pickedElements;\r
- editor.handleEvent(event);\r
+ } \r
+ \r
+ if(dragEvent != null) {\r
+ ReleaseEvent event = new ReleaseEvent(\r
+ Modifiers.modifierString(e.getButton(), e.isControlDown(), e.isAltDown(), e.isShiftDown()),\r
+ editor.screenToDiagram(e.getPoint()),\r
+ e.getLocationOnScreen()\r
+ );\r
+ \r
+ event.pickedElements = dragEvent.pickedElements;\r
+ editor.handleEvent(event);\r
+ }\r
}\r
\r
@Override\r
editor.addEventHandler(1, "click(ctrl+left)", new ToggleSelection());\r
editor.addEventHandler(1, "drag(shift+left)", new Pan());\r
editor.addEventHandler(1, "drag(alt+shift+middle)", new Pan());\r
+ editor.addEventHandler(1, "drag(alt+middle)", new Pan());\r
editor.addEventHandler(1, "drag(shift+right)", new Pan());\r
editor.addEventHandler(1, "wheel()", new Zoom());\r
editor.addEventHandler(1, "key(1)", new ZoomToFit());\r