mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-08 17:46:35 +08: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
@@ -225,8 +225,7 @@ import com.facebook.textcachewarmer.DefaultTextLayoutCacheWarmer;
|
||||
|
||||
NodeRegion nodeRegion = getNodeRegion();
|
||||
if (mDrawCommand == null) {
|
||||
if (nodeRegion.mLeft != left || nodeRegion.mTop != top || nodeRegion.mRight != right ||
|
||||
nodeRegion.mBottom != bottom || nodeRegion.mIsVirtual != isVirtual) {
|
||||
if (!nodeRegion.matches(left, top, right, bottom, isVirtual)) {
|
||||
setNodeRegion(new TextNodeRegion(left, top, right, bottom, getReactTag(), isVirtual, null));
|
||||
}
|
||||
return;
|
||||
@@ -239,9 +238,7 @@ import com.facebook.textcachewarmer.DefaultTextLayoutCacheWarmer;
|
||||
}
|
||||
|
||||
Layout newLayout = mDrawCommand.getLayout();
|
||||
if (nodeRegion.mLeft != left || nodeRegion.mTop != top ||
|
||||
nodeRegion.mRight != right || nodeRegion.mBottom != bottom ||
|
||||
nodeRegion.mIsVirtual != isVirtual || layout != newLayout) {
|
||||
if (!nodeRegion.matches(left, top, right, bottom, isVirtual) || layout != newLayout) {
|
||||
setNodeRegion(
|
||||
new TextNodeRegion(left, top, right, bottom, getReactTag(), isVirtual, newLayout));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user