redraw canvas on resize