Reputation: 2741
I currently have this set up: http://sandbox.brightboxstudios.com/orgmap/
They are draggable and I am trying to find a way to have lines connect them, even when they are dragged. Having an easy way to show how each is related and which should be connected is ideal!
Thanks!!!
Upvotes: 1
Views: 12676
Reputation: 11
You can also try jsPlumb, a JavaScript library that can connects divs together. It's really simple to use and there are plenty of demos on that page.
Upvotes: 1
Reputation: 9424
You may try KineticJS too. I think that it will provide what you want easily. http://www.kineticjs.com/
Here you can find lots of tutorials: http://www.html5canvastutorials.com/kineticjs/html5-canvas-events-tutorials-introduction-with-kineticjs/
Upvotes: 1
Reputation: 935
Take a look at this: jQuery - use canvas to draw lines between divs
I'd start with that code, and just re-draw the lines every time the div
s change location.
Upvotes: 2
Reputation: 1430
You should consider using the D3.js library. In particular this example is what I think you are looking for: http://mbostock.github.com/d3/ex/force.html
Upvotes: 3