Enables a drag able rectangle on a canvas.
Enables a dragable rectangle on a canvas.
Demo
Usage
To draw a rectangle, left click on the canvas and drag. Leave the left click to complete drawing the rectangle.
You can use the squares on the rectangle to resize.
Left click any where in the rectangle to hold the rectangle and move around in the canvas, leave the left click to drop the rectangle to the desired location.
You can use the 'del' or 'esc' key to delete the rectangle.
Double click on the rectangle to display the its coordinates in an alert.
Applications