Skip to content

Commit 6bebb33

Browse files
committed
merge
2 parents 917513e + b501a7a commit 6bebb33

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

packages/react-native-gesture-handler/apple/RNGestureHandler.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@
9494
- (void)updateRelations:(nonnull NSDictionary *)relations;
9595
- (void)handleGesture:(nonnull id)recognizer fromReset:(BOOL)fromReset;
9696
- (void)handleGesture:(nonnull id)recognizer inState:(RNGestureHandlerState)state;
97-
- (CGRect)getViewBounds;
9897
- (BOOL)containsPointInView;
9998
- (RNGestureHandlerState)state;
10099
- (nullable RNGestureHandlerEventExtraData *)eventExtraData:(nonnull id)recognizer;

packages/react-native-gesture-handler/apple/RNGestureHandler.mm

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -666,20 +666,17 @@ - (void)reset
666666
}
667667
}
668668

669-
- (CGRect)getViewBounds
669+
- (BOOL)containsPointInView
670670
{
671671
CGRect bounds = _recognizer.view.bounds;
672+
CGPoint pt = [_recognizer locationInView:_recognizer.view];
673+
672674
if (bounds.size.width == 0 and bounds.size.height == 0 and bounds.origin.x == 0 and bounds.origin.y == 0 and
673675
_recognizer.view.subviews.count) {
674676
bounds = _recognizer.view.subviews[0].bounds;
677+
pt = [_recognizer locationInView:_recognizer.view.subviews[0]];
675678
}
676-
return bounds;
677-
}
678-
679-
- (BOOL)containsPointInView
680-
{
681-
CGPoint pt = [_recognizer locationInView:_recognizer.view];
682-
CGRect hitFrame = RNGHHitSlopInsetRect([self getViewBounds], _hitSlop);
679+
CGRect hitFrame = RNGHHitSlopInsetRect(bounds, _hitSlop);
683680
return CGRectContainsPoint(hitFrame, pt);
684681
}
685682

0 commit comments

Comments
 (0)