Skip to content

Commit fc4d06f

Browse files
committed
Fix wrong layouts
1 parent 9e4c666 commit fc4d06f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/react-native-gesture-handler/shared/shadowNodes/react/renderer/components/rngesturehandler_codegen/RNGestureHandlerDetectorShadowNode.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,16 @@ void RNGestureHandlerDetectorShadowNode::layout(LayoutContext layoutContext) {
4141
auto child = std::static_pointer_cast<const YogaLayoutableShadowNode>(
4242
getChildren()[0]);
4343

44+
if (!this->yogaNode_.getHasNewLayout()) {
45+
return;
46+
}
47+
4448
child->ensureUnsealed();
4549
auto mutableChild = std::const_pointer_cast<YogaLayoutableShadowNode>(child);
4650

4751
// TODO: figure out the correct way to setup metrics between detector and
4852
// the child
4953
auto metrics = child->getLayoutMetrics();
50-
metrics.frame = child->getLayoutMetrics().frame;
5154
setLayoutMetrics(metrics);
5255

5356
auto childmetrics = child->getLayoutMetrics();

0 commit comments

Comments
 (0)