Fixed an issue when switching viewing modes

Added a call to onWindowResize in each off the different switch
statement cases for toggling mode. This helps with an issue I was
having where the last effect was interfering with the next effect.