experimenting with rails/javascript/html to draw shapes on a canvas and dynamically changing its size