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

Add d3.pointers. #255

Merged
merged 7 commits into from
Aug 4, 2020
Prev Previous commit
Next Next commit
Update src/pointer.js
Co-authored-by: Mike Bostock <mbostock@gmail.com>
  • Loading branch information
Fil and mbostock committed Aug 3, 2020
commit 10e738abad089770e498f55dd0e455fa95ae5f4c
3 changes: 2 additions & 1 deletion src/pointer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import sourceEvent from "./sourceEvent.js";

export default function(event, node) {
event = sourceEvent(event);
Fil marked this conversation as resolved.
Show resolved Hide resolved
if (node || (node = event.currentTarget)) {
if (node === undefined) node = event.currentTarget;
if (node) {
var svg = node.ownerSVGElement || node;
if (svg.createSVGPoint) {
var point = svg.createSVGPoint();
Expand Down