canvas resizing

now resizes the canvas when the window is resized or the device
orienation changes