Skip to content

Commit

Permalink
Fix #62 - ignore if ctrlKey.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Aug 7, 2019
1 parent ee4db57 commit dcbd54e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ If *filter* is specified, sets the filter to the specified function and returns

```js
function filter() {
return !d3.event.button;
return !d3.event.ctrlKey && !d3.event.button;
}
```

Expand Down
2 changes: 1 addition & 1 deletion src/drag.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import DragEvent from "./event";

// Ignore right-click, since that should open the context menu.
function defaultFilter() {
return !event.button;
return !event.ctrlKey && !event.button;
}

function defaultContainer() {
Expand Down

0 comments on commit dcbd54e

Please sign in to comment.