Add a fourth part type 'neither' for the case when the top and bottom of the element are both offscreen.