Separate Node bounds and hit bounds within node region where needed.

Summary: Node region bounds are assumed to equal the underlying node bounds.  In the case of hit slop, these need to be abstracted.

Reviewed By: ahmedre

Differential Revision: D3713430
This commit is contained in:
Seth Kirby
2016-08-16 11:26:27 -07:00
committed by Ahmed El-Helw
parent a602891946
commit 4a12efad02
9 changed files with 169 additions and 48 deletions
@@ -41,9 +41,9 @@ import android.text.Spanned;
if (mLayout != null) {
CharSequence text = mLayout.getText();
if (text instanceof Spanned) {
int y = Math.round(touchY - mTop);
int y = Math.round(touchY - getTop());
if (y >= mLayout.getLineTop(0) && y < mLayout.getLineBottom(mLayout.getLineCount() - 1)) {
float x = Math.round(touchX - mLeft);
float x = Math.round(touchX - getLeft());
int line = mLayout.getLineForVertical(y);
if (mLayout.getLineLeft(line) <= x && x <= mLayout.getLineRight(line)) {