I have example for HTML 5 circle drawing as below
https://i.stack.imgur.com/SVPO9.jpg
Here is the drawing script for this (HTML5 and jQuery)
http://jsfiddle.net/eGjak/275/
$.each(circles, function() {
drawCircle(this);
drawLine(mainCircle, this);
});
I need to upgrade this to drag and drop (the users can drag the children circles around the main circle with line)
How can I do this using html5,css3,jQuery?
http://jsfiddle.net/eGjak/503/
You have to find the local x and y on the canvas, then calculate the distance ( think pythagorean theorem, aSquared + bSquare = cSquared ), and see if the distance is less than the radius of the circle( aka mouse is within the circle )
Add this code after the code you currently have
There are other ways to do this and ways to save on speed, though this should do the trick.