Redraw line on window resize