-
Notifications
You must be signed in to change notification settings - Fork 295
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
Add d3.pointers. #255
Add d3.pointers. #255
Conversation
import sourceEvent from "./sourceEvent.js"; | ||
|
||
export default function(events, node) { | ||
if (events.target) { // i.e., instanceof Event, not TouchList or iterable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I’d prefer events instanceof Event
here, but our current custom events in d3-drag etc. don’t extend Event, so that isn’t possible. It might be possible to change them to extend Event, although for all I know, that may introduce other problems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I think this is the correct approach. Thank you!
In #256 I added the missing import in src/index.js and fixed sourceEvent.currentTarget
Co-authored-by: Mike Bostock <mbostock@gmail.com>
Co-authored-by: Mike Bostock <mbostock@gmail.com>
Alternative to #253 per #253 (comment).