Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyboardEvent support for d3.selection.on() #269

Closed
vincentfs opened this issue Oct 28, 2020 · 1 comment
Closed

KeyboardEvent support for d3.selection.on() #269

vincentfs opened this issue Oct 28, 2020 · 1 comment

Comments

@vincentfs
Copy link

Hi,

In the previous version, keyboard event is supported through d3.event (eg: d3.event.ctrlKey, d3.event.keyCode, etc). This feature affords various interactions beyond simple Left/Right click, and help make better and rich user experience. However, in v6, it is quite difficult to implement these interactions.

Is it possible to add these features back into the event object passed to the listener?

Best regards,
Vincent

@mbostock
Copy link
Member

The current event is now passed directly to the event listener rather than being exposed as the d3.event global. Otherwise the nature of the event is unchanged — it’s the browser’s native event.

https://github.com/d3/d3-selection/releases/tag/v2.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants