d3 / d3-transition

Animated transitions for D3 selections.
https://d3js.org/d3-transition
ISC License
224 stars 65 forks source link

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

Closed mbostock closed 8 years ago

mbostock commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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