redraws canvas on resize