update size of canvas on resize