Fixed hiding of images if off screen

Fixed it by using the boundingbox of the image instead of the position of the toggle element.