|
14 | 14 | #import "RCTUtils.h" |
15 | 15 | #import "UIView+Private.h" |
16 | 16 | #import "UIView+React.h" |
| 17 | +#import "RCTI18nUtil.h" |
17 | 18 |
|
18 | 19 | typedef void (^RCTActionBlock)(RCTShadowView *shadowViewSelf, id value); |
19 | 20 | typedef void (^RCTResetActionBlock)(RCTShadowView *shadowViewSelf); |
@@ -600,10 +601,35 @@ - (YGValue)getProp \ |
600 | 601 | return YGNodeStyleGetPosition(_yogaNode, edge); \ |
601 | 602 | } |
602 | 603 |
|
| 604 | + |
603 | 605 | RCT_POSITION_PROPERTY(Top, top, YGEdgeTop) |
604 | | -RCT_POSITION_PROPERTY(Right, right, YGEdgeEnd) |
605 | 606 | RCT_POSITION_PROPERTY(Bottom, bottom, YGEdgeBottom) |
606 | | -RCT_POSITION_PROPERTY(Left, left, YGEdgeStart) |
| 607 | +RCT_POSITION_PROPERTY(Start, start, YGEdgeStart) |
| 608 | +RCT_POSITION_PROPERTY(End, end, YGEdgeEnd) |
| 609 | + |
| 610 | +- (void)setLeft:(YGValue)value |
| 611 | +{ |
| 612 | + YGEdge edge = [[RCTI18nUtil sharedInstance] doesRTLFlipLeftAndRightStyles] ? YGEdgeStart : YGEdgeLeft; |
| 613 | + RCT_SET_YGVALUE(value, YGNodeStyleSetPosition, _yogaNode, edge); |
| 614 | + [self dirtyText]; |
| 615 | +} |
| 616 | +- (YGValue)left |
| 617 | +{ |
| 618 | + YGEdge edge = [[RCTI18nUtil sharedInstance] doesRTLFlipLeftAndRightStyles] ? YGEdgeStart : YGEdgeLeft; |
| 619 | + return YGNodeStyleGetPosition(_yogaNode, edge); |
| 620 | +} |
| 621 | + |
| 622 | +- (void)setRight:(YGValue)value |
| 623 | +{ |
| 624 | + YGEdge edge = [[RCTI18nUtil sharedInstance] doesRTLFlipLeftAndRightStyles] ? YGEdgeEnd : YGEdgeRight; |
| 625 | + RCT_SET_YGVALUE(value, YGNodeStyleSetPosition, _yogaNode, edge); |
| 626 | + [self dirtyText]; |
| 627 | +} |
| 628 | +- (YGValue)right |
| 629 | +{ |
| 630 | + YGEdge edge = [[RCTI18nUtil sharedInstance] doesRTLFlipLeftAndRightStyles] ? YGEdgeEnd : YGEdgeRight; |
| 631 | + return YGNodeStyleGetPosition(_yogaNode, edge); |
| 632 | +} |
607 | 633 |
|
608 | 634 | // Size |
609 | 635 |
|
|
0 commit comments