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

Use d3.event.timeStamp instead of Date.now? #18

Closed
mbostock opened this issue Jan 29, 2016 · 2 comments
Closed

Use d3.event.timeStamp instead of Date.now? #18

mbostock opened this issue Jan 29, 2016 · 2 comments

Comments

@mbostock
Copy link
Member

That way, if multiple transitions are started independently during the response to an event, they are guaranteed to be concurrent.

However, we’d have to fallback to Date.now if d3.event is undefined. And we’d probably want to use the sourceEvent rather than d3.event. Although, we haven’t implemented any behaviors yet (drag, zoom, brush), so currently there is no difference.

@mbostock
Copy link
Member Author

Also note that requestAnimationFrame passes the callback the current time, and so does d3-timer; we could use that reference time even when there isn’t a user event.

@mbostock
Copy link
Member Author

I don’t plan on implementing this in the near future, so closing.

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

No branches or pull requests

1 participant