update the view port resize function