amend hit detection for text to use rectangle instead of actual text