moved PtrJNode map to YGJtypes.h and passing layout context as data in LayoutPassEnd Event

Summary: Move PtrJNodeMap to header file so that it can be accessed in events subscribers outside yoga

Reviewed By: davidaurelio

Differential Revision: D15619629

fbshipit-source-id: 1bf213efd38ec7bcac6a38070f21fa837c5f17da
This commit is contained in:
Sidharth Guglani
2019-06-06 21:03:04 -07:00
committed by Facebook Github Bot
parent 14f249178e
commit c44b221e13
4 changed files with 39 additions and 29 deletions
+1 -1
View File
@@ -4093,7 +4093,7 @@ void YGNodeCalculateLayoutWithContext(
marker = nullptr;
#ifdef YG_ENABLE_EVENTS
Event::publish<Event::LayoutPassEnd>(node);
Event::publish<Event::LayoutPassEnd>(node, {layoutContext});
#endif
// We want to get rid off `useLegacyStretchBehaviour` from YGConfig. But we
+5
View File
@@ -71,5 +71,10 @@ struct Event::TypedData<Event::NodeDeallocation> {
YGConfig* config;
};
template <>
struct Event::TypedData<Event::LayoutPassEnd> {
void* layoutContext;
};
} // namespace yoga
} // namespace facebook