Say i want to draw a rectangle on canvas. I want to be able to get the co-ordinates from user\'s mouse. Ideal scenario is user clicks at a point and drags down to another end li
Here's a outline of how to drag-draw a rectangle on canvas:
In mousedown:
In mousemove:
In mouseup:
Here's example code and a Demo: http://jsfiddle.net/m1erickson/6E2yd/
Drag the mouse to create a rectangle