constrain viewport