d3 / d3-transition

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

odd behaviour for transtion(t) in d3 timer #97

Closed SunGuoQiang123 closed 4 years ago

SunGuoQiang123 commented 4 years ago

when i use selection.transition(t) in a d3.timeout or d3.inerval, the transition ease looks like something wrong, but when i use transition().duration(1000).ease(d3.easeLinear) the transition works well. below is the reproduction link

https://codepen.io/sungunguoqiang/pen/wvvxPRq?editors=1011

mbostock commented 4 years ago

You can only inherit from a transition that’s still running. If the transition t has ended by the time your timeout fires, it will be ignored when you pass it to selection.transition; you’ll just get the default timing parameters. You can only inherit when the transition t has no yet ended, and the transition t applies to a parent element of the selection.

mbostock commented 4 years ago

See also #59.