Browse Source

disable right-click brushing

rename-eventCallbacs-to-events-#26
rozetko 10 months ago
parent
commit
f137cc727e
  1. 4
      src/index.ts

4
src/index.ts

@ -414,9 +414,9 @@ abstract class ChartwerkPod<T extends Serie, O extends Options> {
// TODO: refactor // TODO: refactor
switch(key) { switch(key) {
case KeyEvent.MAIN: case KeyEvent.MAIN:
return () => !d3.event.shiftKey; return () => !d3.event.shiftKey && !d3.event.button;
case KeyEvent.SHIFT: case KeyEvent.SHIFT:
return () => d3.event.shiftKey; return () => d3.event.shiftKey && !d3.event.button;
default: default:
throw new Error(`Unknown type of KeyEvent: ${key}`); throw new Error(`Unknown type of KeyEvent: ${key}`);
} }

Loading…
Cancel
Save