Skip to content

Commit

Permalink
Disable click handlers after drag.
Browse files Browse the repository at this point in the history
Fixes #270
  • Loading branch information
danvk committed Sep 28, 2015
1 parent 3509dba commit 8b427e6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/VisualizationWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,13 @@ class VisualizationWrapper extends React.Component {
.on('drag', dragmove)
.on('dragend', dragended);

d3.select(div).call(drag);
d3.select(div).call(drag).on('click', this.handleClick.bind(this));
}

handleClick(): any {
if (d3.event.defaultPrevented) {
d3.event.stopPropagation();
}
}

render(): any {
Expand Down

0 comments on commit 8b427e6

Please sign in to comment.