I want to be able to hold mousedown on a rectangle, move in a direction, let go, and upon release have the rectangle be "flicked" towards the appropriate direction. I want to accomplish something like this:
How do I flick a DIV and have it move in the right direction?
but with a rectangle drawn in the HTML5 Canvas. How do I achieve this?