File tree Expand file tree Collapse file tree
packages/react-native-gesture-handler/apple Expand file tree Collapse file tree 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 ;
9798- (BOOL )containsPointInView ;
9899- (RNGestureHandlerState)state ;
99100- (nullable RNGestureHandlerEventExtraData *)eventExtraData : (nonnull id )recognizer ;
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments