mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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:
committed by
Ahmed El-Helw
parent
a602891946
commit
4a12efad02
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user