Skip to content

Commit 4332a28

Browse files
Move event NodeLayout to end of NodeLayout step
Summary: Added event NodeLayoutEnd and this is being used now instead of NodeLayout It will be used later to add more information about caches Reviewed By: davidaurelio Differential Revision: D15920935 fbshipit-source-id: c9f5e193bc8cc70d26ff5d84882d483c9b09f67d
1 parent 79e506d commit 4332a28

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ReactCommon/yoga/yoga/Yoga.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3693,9 +3693,6 @@ bool YGLayoutNodeInternal(
36933693
const YGConfigRef config,
36943694
YGMarkerLayoutData& layoutMarkerData,
36953695
void* const layoutContext) {
3696-
#ifdef YG_ENABLE_EVENTS
3697-
Event::publish<Event::NodeLayout>(node, {performLayout, layoutContext});
3698-
#endif
36993696
YGLayout* layout = &node->getLayout();
37003697

37013698
gDepth++;
@@ -3929,6 +3926,11 @@ bool YGLayoutNodeInternal(
39293926

39303927
gDepth--;
39313928
layout->generationCount = gCurrentGenerationCount;
3929+
3930+
#ifdef YG_ENABLE_EVENTS
3931+
Event::publish<Event::NodeLayout>(node, {performLayout, layoutContext});
3932+
#endif
3933+
39323934
return (needToVisitNode || cachedResults == nullptr);
39333935
}
39343936

0 commit comments

Comments
 (0)