Built with blockbuilder.org
This example has a bug that user can interupt the transition even through i add 'end' status at the end of it. Hoping one day i can find out.
The animation is a little uggly because the default animation behavous and my group layout. Whatever.
One thing to be mention, if you chain the selection, transition and on-event, it will not work. I think the chained returned selection is not appropriate for others.
https://d3js.org/d3.v3.min.js