Implement better way to cancel ongoing D3 transitions

[#53626533]

Based on Mike's idea, please see:
https://github.com/mbostock/d3/issues/1410#issuecomment-21251284