diff --git a/README.md b/README.md index be66c8ae3..22a6a0b88 100644 --- a/README.md +++ b/README.md @@ -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; } ``` diff --git a/src/zoom.js b/src/zoom.js index 735483774..3b9d23906 100644 --- a/src/zoom.js +++ b/src/zoom.js @@ -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() {