File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed
packages/react-native-gesture-handler/apple Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change 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 ;
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments