D3.js Dynamic connector between objects
问题 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. 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. This is my base source of knowledge: https://github.com/mbostock/d3/wiki/SVG-Shapes, but I don't quite understand how to do something smart with it.