change view port calculation to happen on browser resize