mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
YGStyle: wrap all fields into accessors
Summary: @public In order to encapsulate property access on `YGStyle`, as a first measure we wrap all fields with accessors. This will e.g. enable dynamic property storage and instrumentation in the future. All accessors have a `const` version that allows direct access via `const&`. For mutation, bit fields are wrapped with a custom reference object. This style allows for the least amount of changes in client code. Property access simply needs appended parens, eg `style.direction` becomes `style.direction`. Reviewed By: shergin Differential Revision: D14999096 fbshipit-source-id: fbf29f7ddab520513d4618f5e70094c4f6330b30
This commit is contained in:
committed by
Facebook Github Bot
parent
af84193df4
commit
54af7fc645
@@ -161,7 +161,7 @@ local_ref<JString> getPlatformComponentName(const ShadowView& shadowView) {
|
||||
std::dynamic_pointer_cast<const ScrollViewProps>(shadowView.props);
|
||||
|
||||
if (newViewProps &&
|
||||
newViewProps->yogaStyle.flexDirection == YGFlexDirectionRow) {
|
||||
newViewProps->yogaStyle.flexDirection() == YGFlexDirectionRow) {
|
||||
componentName = make_jstring("AndroidHorizontalScrollView");
|
||||
} else {
|
||||
componentName = make_jstring(shadowView.componentName);
|
||||
|
||||
Reference in New Issue
Block a user