Adjust viewer on window resize.