change width of the canvas when window size changes