making each canvas line draggable and droppable

Viewed 2177

I am able to draw some lines on the canvas. I want to make each line draggable and droppable.

However, it is implemented by storing the positions of different lines in the array, how can I make each of them like an instance that is draggable and droppable? Or did I get it wrong?

You can check out the code here

var storedLines = []

http://jsfiddle.net/m1erickson/NnZ7a/

Thanks a lot!

1 Answers
Related