update view port logic