mirror of
https://github.com/status-im/react-native.git
synced 2025-02-26 08:05:34 +00:00
Expose getter for 'flex' property
Summary: Helps mitigate part of https://github.com/facebook/react-native/pull/12245 while we wait for a more comprehensive solution. Reviewed By: emilsjolander Differential Revision: D4571776 fbshipit-source-id: 185cd1b0d3af37724136a37471df412c2000dfe4
This commit is contained in:
parent
76f5b9606a
commit
41f3d0cf2d
@ -135,14 +135,13 @@ typedef void (^RCTApplierBlock)(NSDictionary<NSNumber *, UIView *> *viewRegistry
|
|||||||
@property (nonatomic, assign) YGWrap flexWrap;
|
@property (nonatomic, assign) YGWrap flexWrap;
|
||||||
@property (nonatomic, assign) YGDisplay display;
|
@property (nonatomic, assign) YGDisplay display;
|
||||||
|
|
||||||
|
@property (nonatomic, assign) float flex;
|
||||||
@property (nonatomic, assign) float flexGrow;
|
@property (nonatomic, assign) float flexGrow;
|
||||||
@property (nonatomic, assign) float flexShrink;
|
@property (nonatomic, assign) float flexShrink;
|
||||||
@property (nonatomic, assign) YGValue flexBasis;
|
@property (nonatomic, assign) YGValue flexBasis;
|
||||||
|
|
||||||
@property (nonatomic, assign) float aspectRatio;
|
@property (nonatomic, assign) float aspectRatio;
|
||||||
|
|
||||||
- (void)setFlex:(float)flex;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* z-index, used to override sibling order in the view
|
* z-index, used to override sibling order in the view
|
||||||
*/
|
*/
|
||||||
|
@ -669,11 +669,6 @@ static inline YGSize RCTShadowViewMeasure(YGNodeRef node, float width, YGMeasure
|
|||||||
|
|
||||||
// Flex
|
// Flex
|
||||||
|
|
||||||
- (void)setFlex:(float)value
|
|
||||||
{
|
|
||||||
YGNodeStyleSetFlex(_yogaNode, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)setFlexBasis:(YGValue)value
|
- (void)setFlexBasis:(YGValue)value
|
||||||
{
|
{
|
||||||
RCT_SET_YGVALUE_AUTO(value, YGNodeStyleSetFlexBasis, _yogaNode);
|
RCT_SET_YGVALUE_AUTO(value, YGNodeStyleSetFlexBasis, _yogaNode);
|
||||||
@ -694,6 +689,7 @@ static inline YGSize RCTShadowViewMeasure(YGNodeRef node, float width, YGMeasure
|
|||||||
return YGNodeStyleGet##cssProp(_yogaNode); \
|
return YGNodeStyleGet##cssProp(_yogaNode); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RCT_STYLE_PROPERTY(Flex, flex, Flex, float)
|
||||||
RCT_STYLE_PROPERTY(FlexGrow, flexGrow, FlexGrow, float)
|
RCT_STYLE_PROPERTY(FlexGrow, flexGrow, FlexGrow, float)
|
||||||
RCT_STYLE_PROPERTY(FlexShrink, flexShrink, FlexShrink, float)
|
RCT_STYLE_PROPERTY(FlexShrink, flexShrink, FlexShrink, float)
|
||||||
RCT_STYLE_PROPERTY(FlexDirection, flexDirection, FlexDirection, YGFlexDirection)
|
RCT_STYLE_PROPERTY(FlexDirection, flexDirection, FlexDirection, YGFlexDirection)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user