Observing lifetime of multiple transitions

22 views
Skip to first unread message

Scott Cameron

unread,
Sep 7, 2012, 5:08:36 PM9/7/12
to d3...@googlegroups.com
Hi,

I have a library that gets called by an application.  Internal to the library, the rendering process can potentially use any number of asynchronous transitions it likes.  The caller of the library wishes to be notified at a point in time when all of these transitions have completed.

The challenge is that transitions are asynchronous and not really related to each other in any way that would allow for a consistent view across all transitions at once.  One option might be to use the transition.each() function with an "end" event along with some kind of reference counting scheme, but the "end" event doesn't seem to be guaranteed to be called (e.g. empty selections and interrupted transitions) so this doesn't seem straight forward either.

I'm wondering if anybody has any experience with this kind of problem and if there are any ideas out there about how to approach this kind of thing?  Right now d3 transitions seem to follow a fire and forget model with some light provision for detecting some state changes.  Has there ever been any discussion about offering deeper control over transitions and sub-transitions?

Thanks,
scott
Reply all
Reply to author
Forward
0 new messages