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
switch(key) {
case KeyEvent.MAIN:
return () => !d3.event.shiftKey;
return () => !d3.event.shiftKey && !d3.event.button;
case KeyEvent.SHIFT:
return () => d3.event.shiftKey;
return () => d3.event.shiftKey && !d3.event.button;
default:
throw new Error(`Unknown type of KeyEvent: ${key}`);
}

Loading…
Cancel
Save