Skip to content

Commit

Permalink
Fix #181 - ignore control-click.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Aug 7, 2019
1 parent a0821c3 commit 295cb42
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 @@ -162,7 +162,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/zoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import noevent, {nopropagation} from "./noevent";

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

function defaultExtent() {
Expand Down

0 comments on commit 295cb42

Please sign in to comment.