Fixed: inViewport() public function checks both horizontally and vertically

Previously, inViewport() only checked to see if a box is vertically in the viewport. Now, we make sure that the box is in the viewport both vertically and horizontally.