Check if mouse is on the rectangle