title: D3.js Dynamic connector between objects
body: <p>I'm very new to both JS and D3, and I've googled this a tonne but only found examples that are a bit too advanced.</p>
  
  <p>I'm making a simple decision graph implementation, and I'm stuck trying to connect 2 nodes with a line / path. The objects can be moved around with the mouse, and the path should always update to reflect the positions of the objects. </p>
  
  <p>This is my base source of knowledge: <a href="https://github.com/mbostock/d3/wiki/SVG-Shapes">https://github.com/mbostock/d3/wiki/SVG-Shapes</a>, but I don't quite understand how to do something smart with it.</p>
  
  <p>Here is what I have so far: <a href="http://jsbin.com/AXEFERo/5/edit">http://jsbin.com/AXEFERo/5/edit</a></p>
  
  <p>Don't need the fancy stuff, just need to understand how to create connectors and have them update dynamically when the objects are being dragged around. Big thanks!</p>