File tree Expand file tree Collapse file tree
packages/react-native-gesture-handler
shared/shadowNodes/react/renderer/components/rngesturehandler_codegen
src/v3/components/Pressable Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,10 +38,6 @@ void RNGestureHandlerDetectorShadowNode::layout(LayoutContext layoutContext) {
3838 // TODO: consider allowing more than one child and doing bounding box
3939 react_native_assert (getChildren ().size () == 1 );
4040
41- if (!this ->yogaNode_ .getHasNewLayout ()) {
42- return ;
43- }
44-
4541 auto child = std::static_pointer_cast<const YogaLayoutableShadowNode>(
4642 getChildren ()[0 ]);
4743
@@ -51,6 +47,7 @@ void RNGestureHandlerDetectorShadowNode::layout(LayoutContext layoutContext) {
5147 // TODO: figure out the correct way to setup metrics between detector and
5248 // the child
5349 auto metrics = child->getLayoutMetrics ();
50+ metrics.frame = child->getLayoutMetrics ().frame ;
5451 setLayoutMetrics (metrics);
5552
5653 auto childmetrics = child->getLayoutMetrics ();
Original file line number Diff line number Diff line change 1- import { Insets , Platform } from 'react-native' ;
1+ import { Insets } from 'react-native' ;
22import {
33 InnerPressableEvent ,
44 PressableEvent ,
@@ -62,17 +62,10 @@ const isTouchWithinInset = (
6262 inset : Insets ,
6363 touch ?: InnerPressableEvent
6464) =>
65- Platform . OS === 'ios'
66- ? ( touch ?. locationX ?? 0 ) <
67- ( inset . right ?? 0 ) + dimensions . width + dimensions . x &&
68- ( touch ?. locationY ?? 0 ) <
69- ( inset . bottom ?? 0 ) + dimensions . height + dimensions . y &&
70- ( touch ?. locationX ?? 0 ) > - ( inset . left ?? 0 ) + dimensions . x &&
71- ( touch ?. locationY ?? 0 ) > - ( inset . top ?? 0 ) + dimensions . y
72- : ( touch ?. locationX ?? 0 ) < ( inset . right ?? 0 ) + dimensions . width &&
73- ( touch ?. locationY ?? 0 ) < ( inset . bottom ?? 0 ) + dimensions . height &&
74- ( touch ?. locationX ?? 0 ) > - ( inset . left ?? 0 ) &&
75- ( touch ?. locationY ?? 0 ) > - ( inset . top ?? 0 ) ;
65+ ( touch ?. locationX ?? 0 ) < ( inset . right ?? 0 ) + dimensions . width &&
66+ ( touch ?. locationY ?? 0 ) < ( inset . bottom ?? 0 ) + dimensions . height &&
67+ ( touch ?. locationX ?? 0 ) > - ( inset . left ?? 0 ) &&
68+ ( touch ?. locationY ?? 0 ) > - ( inset . top ?? 0 ) ;
7669
7770const gestureToPressableEvent = (
7871 event : HoverGestureEvent | LongPressGestureEvent
You can’t perform that action at this time.
0 commit comments