Playing around with transitions as a result of this question on Stack Overflow.
The bl.ock adds a method to d3.selection() that allows a user to force the transition to its end state:
- values transitioned move to the final interpolated values, and
- the transition end event triggers.
Circles start are drawn intially as black. On the beginning of the transition, after the delay (the transition is initalized prior to the delay start) the nodes turn green and begin to transition across the screen. When the transition ends, the nodes turn blue.
Clicking on the nodes forces the transition to its end point while triggering the end event (nodes turn blue). I've added a second transition on click to show those nodes that have been clicked, this transition reduces node radii.