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
@@ -356,12 +356,12 @@ import com.facebook.react.uimanager.UIViewOperationQueue;
|
||||
}
|
||||
|
||||
int resultTag = region == NodeRegion.EMPTY ? touchTargetReactTag : region.mTag;
|
||||
float x = PixelUtil.toDIPFromPixel(region.mLeft + MEASURE_BUFFER[0] - containerX);
|
||||
float y = PixelUtil.toDIPFromPixel(region.mTop + MEASURE_BUFFER[1] - containerY);
|
||||
float x = PixelUtil.toDIPFromPixel(region.getLeft() + MEASURE_BUFFER[0] - containerX);
|
||||
float y = PixelUtil.toDIPFromPixel(region.getTop() + MEASURE_BUFFER[1] - containerY);
|
||||
float width = PixelUtil.toDIPFromPixel(isNativeView ?
|
||||
MEASURE_BUFFER[2] : region.mRight - region.mLeft);
|
||||
MEASURE_BUFFER[2] : region.getRight() - region.getLeft());
|
||||
float height = PixelUtil.toDIPFromPixel(isNativeView ?
|
||||
MEASURE_BUFFER[3] : region.mBottom - region.mTop);
|
||||
MEASURE_BUFFER[3] : region.getBottom() - region.getTop());
|
||||
mCallback.invoke(resultTag, x, y, width, height);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user