Skip to content

Commit ed3b7a4

Browse files
author
Andrzej Antoni Kwaśniewski
committed
Revert "merge"
This reverts commit 6bebb33, reversing changes made to 917513e.
1 parent 0b0b482 commit ed3b7a4

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
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;
9798
- (BOOL)containsPointInView;
9899
- (RNGestureHandlerState)state;
99100
- (nullable RNGestureHandlerEventExtraData *)eventExtraData:(nonnull id)recognizer;

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

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

669-
- (BOOL)containsPointInView
669+
- (CGRect)getViewBounds
670670
{
671671
CGRect bounds = _recognizer.view.bounds;
672-
CGPoint pt = [_recognizer locationInView:_recognizer.view];
673-
674672
if (bounds.size.width == 0 and bounds.size.height == 0 and bounds.origin.x == 0 and bounds.origin.y == 0 and
675673
_recognizer.view.subviews.count) {
676674
bounds = _recognizer.view.subviews[0].bounds;
677-
pt = [_recognizer locationInView:_recognizer.view.subviews[0]];
678675
}
679-
CGRect hitFrame = RNGHHitSlopInsetRect(bounds, _hitSlop);
676+
return bounds;
677+
}
678+
679+
- (BOOL)containsPointInView
680+
{
681+
CGPoint pt = [_recognizer locationInView:_recognizer.view];
682+
CGRect hitFrame = RNGHHitSlopInsetRect([self getViewBounds], _hitSlop);
680683
return CGRectContainsPoint(hitFrame, pt);
681684
}
682685

0 commit comments

Comments
 (0)