How to have a link auto connect when two nodes get close

Also, if you want a LinkingDraggingTool that works with copied nodes, see: Auto link node dragged from palette to node on canvas