This example modifies a force-layout with transitions for smooth enter and exit. An interesting technique here is the use of transition.attrTween to keep the exiting links connected to the moving nodes, even after the links have been removed from the link
selection.
forked from mbostock's block: Modifying a Force Layout II
https://d3js.org/d3.v4.min.js