Use layout padding instead of style padding
Reviewed By: javache Differential Revision: D4377071 fbshipit-source-id: c4a534a07f335c39ec50214e33a41aeff0389bf1
This commit is contained in:
parent
ef9e855692
commit
828addcf55
|
@ -491,29 +491,12 @@ RCT_PADDING_PROPERTY(Right, RIGHT)
|
|||
|
||||
- (UIEdgeInsets)paddingAsInsets
|
||||
{
|
||||
if (YGNodeLayoutGetDirection(_cssNode) == YGDirectionRTL) {
|
||||
return (UIEdgeInsets){
|
||||
YGNodeStyleGetPadding(_cssNode, YGEdgeTop).value,
|
||||
YGNodeStyleGetPadding(_cssNode, YGEdgeEnd).unit == YGUnitPixel ?
|
||||
YGNodeStyleGetPadding(_cssNode, YGEdgeEnd).value :
|
||||
YGNodeStyleGetPadding(_cssNode, YGEdgeLeft).value,
|
||||
YGNodeStyleGetPadding(_cssNode, YGEdgeBottom).value,
|
||||
YGNodeStyleGetPadding(_cssNode, YGEdgeStart).unit == YGUnitPixel ?
|
||||
YGNodeStyleGetPadding(_cssNode, YGEdgeStart).value :
|
||||
YGNodeStyleGetPadding(_cssNode, YGEdgeRight).value
|
||||
};
|
||||
} else {
|
||||
return (UIEdgeInsets){
|
||||
YGNodeStyleGetPadding(_cssNode, YGEdgeTop).value,
|
||||
YGNodeStyleGetPadding(_cssNode, YGEdgeStart).unit == YGUnitPixel ?
|
||||
YGNodeStyleGetPadding(_cssNode, YGEdgeStart).value :
|
||||
YGNodeStyleGetPadding(_cssNode, YGEdgeLeft).value,
|
||||
YGNodeStyleGetPadding(_cssNode, YGEdgeBottom).value,
|
||||
YGNodeStyleGetPadding(_cssNode, YGEdgeEnd).unit == YGUnitPixel ?
|
||||
YGNodeStyleGetPadding(_cssNode, YGEdgeEnd).value :
|
||||
YGNodeStyleGetPadding(_cssNode, YGEdgeRight).value
|
||||
};
|
||||
}
|
||||
return (UIEdgeInsets){
|
||||
YGNodeLayoutGetPadding(_cssNode, YGEdgeTop),
|
||||
YGNodeLayoutGetPadding(_cssNode, YGEdgeLeft),
|
||||
YGNodeLayoutGetPadding(_cssNode, YGEdgeBottom),
|
||||
YGNodeLayoutGetPadding(_cssNode, YGEdgeRight)
|
||||
};
|
||||
}
|
||||
|
||||
// Border
|
||||
|
|
Loading…
Reference in New Issue