This is a web page that demonstrates simple but interesting usage of javascript.This was pretty simple but interesting exercise, considering this is my first encounter with canvas elements. Any feedback is welcome.
To be able to use the page:
$ git clone https://github.com/amiaynara/recanvas.git
$ cd first_proj
For Chrome:
$ google-chrome index.html
For Firefox
$ firefox index.html
You can draw a reactangle on the canvas by dragging the mouse on the drawing area. The color of the rectangle is chosen randomly, but the dimensions of the rectangle is decided by the amount of dragging performed. Once a rectangle is created you can go on creating as much more of these you want. To clear the rectangle just 'double-click' the rectangle. The page also provides the feature of moving a rectangle to other locations. This can be achieved just by clicking on the desired rectangle and dragging to the next location.
Enjoy Painting :)