Permalink
Browse files

Emit drags only for real drags (mouse is down)

  • Loading branch information...
1 parent b6314d0 commit b61c9f3c753dfd6affbd2d294b81d0694f70257b @davidaurelio davidaurelio committed Feb 22, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/renderer/svg/svg_event_handlers.js
@@ -213,11 +213,15 @@ define([
this.emit('userevent', event, targetId);
targetId = data._dragId;
- type = 'drag';
event.diffX = clientX - start[0];
event.diffY = clientY - start[1];
event.deltaX = clientX - last[0];
event.deltaY = clientY - last[1];
+ if (targetId !== null) {
+ type = 'drag';
+ } else {
+ return;
+ }
break;
case 'keypress':
type = 'key';

0 comments on commit b61c9f3

Please sign in to comment.