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
Chained transitions may interrupt prior ones #54
Comments
I think this qualifies as a bug, but it appears to be triggered only when the prior transition has an extremely short duration, such as zero. If you increase the duration (say the index plus 50ms), the interrupts go away. |
Thanks very much for fast response. Yep. Fyi, in my actual app the delay on the first transition is a few hundred ms, yet this issue occurred with a large number of svg elements. (A user on a slower computer reported some data not displaying correctly). |
That’s plausible; if the browser stalls temporarily, it could cause a similar situation. The problem here is the optimization in d3/d3#1576 (see also #16): the first tick is deferred to the end of the current frame, so the following transition starts before the preceding transition can end naturally, triggering the interrupt. |
Fantastic - thanks very much! |
Hi,
It seems that when transitions are chained together using
transition.transition
, a subsequent transition may interrupt the prior one. This was unexpected to me, since I was expecting them to run sequentially. (I was experimenting with staged animations and was observing that sometimes only the second part of the animation happened).I've isolated this to a simple example:
Also see here: https://jsfiddle.net/onjtpp4y/2/
In chrome and firefox I see the first part of the row of circles remains red and I see multiple interrupted messages in the console. Is that expected?
I can imagine why this happens, but would it make more sense to make chained transitions strictly sequential?
Regards,
Dan
p.s. thanks for awesome library
The text was updated successfully, but these errors were encountered: