(client) Change Inspector Descriptor
Summary: Previously, descriptor stopped iteration (searching) as soon as it finds hit element. This diff changes so that it will always do complete search Reviewed By: mweststrate Differential Revision: D21040424 fbshipit-source-id: 9123c6382dcdfefd6df17a95d283f5123906df11
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d593409ec4
commit
c3bc168216
@@ -253,6 +253,7 @@ public class ViewGroupDescriptor extends NodeDescriptor<ViewGroup> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void runHitTest(ViewGroup node, Touch touch) {
|
private void runHitTest(ViewGroup node, Touch touch) {
|
||||||
|
boolean finish = true;
|
||||||
for (int i = node.getChildCount() - 1; i >= 0; i--) {
|
for (int i = node.getChildCount() - 1; i >= 0; i--) {
|
||||||
final View child = node.getChildAt(i);
|
final View child = node.getChildAt(i);
|
||||||
if (child instanceof HiddenNode
|
if (child instanceof HiddenNode
|
||||||
@@ -273,11 +274,11 @@ public class ViewGroupDescriptor extends NodeDescriptor<ViewGroup> {
|
|||||||
|
|
||||||
if (hit) {
|
if (hit) {
|
||||||
touch.continueWithOffset(i, left, top);
|
touch.continueWithOffset(i, left, top);
|
||||||
return;
|
finish = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
touch.finish();
|
if (finish) touch.finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user