I was able to successfully draw an image on an HTML canvas. But I need to be able to drag the image about on the canvas.
I know this function can be implemented easi
To do dragging you handle 3 mouse events:
mousedown -- set a flag indicating that the drag has begun.
mouseup -- clear that drag flag because the drag is over
mousemove -- if the drag flag is set, clear the canvas and draw the image at the mouse position
Here is some code: