Set property ivar for shadow view frame
Reviewed By: emilsjolander Differential Revision: D3683649 fbshipit-source-id: d818cb0eea064baca99be2bc6edf1b61b90bb64b
This commit is contained in:
parent
4afaf5e538
commit
6775d1f136
|
@ -217,11 +217,15 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithCoder:(NSCoder *)aDecoder)
|
|||
_contentView = [[RCTRootContentView alloc] initWithFrame:self.bounds
|
||||
bridge:bridge
|
||||
reactTag:self.reactTag
|
||||
sizeFlexiblity:self.sizeFlexibility];
|
||||
sizeFlexiblity:_sizeFlexibility];
|
||||
[self runApplication:bridge];
|
||||
|
||||
_contentView.backgroundColor = self.backgroundColor;
|
||||
[self insertSubview:_contentView atIndex:0];
|
||||
|
||||
if (_sizeFlexibility == RCTRootViewSizeFlexibilityNone) {
|
||||
self.intrinsicSize = self.bounds.size;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)runApplication:(RCTBridge *)bridge
|
||||
|
|
|
@ -555,10 +555,13 @@ RCT_DIMENSION_PROPERTY(Left, left, PositionStart)
|
|||
|
||||
- (void)setFrame:(CGRect)frame
|
||||
{
|
||||
CSSNodeStyleSetPositionLeft(_cssNode, CGRectGetMinX(frame));
|
||||
CSSNodeStyleSetPositionTop(_cssNode, CGRectGetMinY(frame));
|
||||
CSSNodeStyleSetWidth(_cssNode, CGRectGetWidth(frame));
|
||||
CSSNodeStyleSetHeight(_cssNode, CGRectGetHeight(frame));
|
||||
if (!CGRectEqualToRect(frame, _frame)) {
|
||||
_frame = frame;
|
||||
CSSNodeStyleSetPositionLeft(_cssNode, CGRectGetMinX(frame));
|
||||
CSSNodeStyleSetPositionTop(_cssNode, CGRectGetMinY(frame));
|
||||
CSSNodeStyleSetWidth(_cssNode, CGRectGetWidth(frame));
|
||||
CSSNodeStyleSetHeight(_cssNode, CGRectGetHeight(frame));
|
||||
}
|
||||
}
|
||||
|
||||
static inline void RCTAssignSuggestedDimension(CSSNodeRef cssNode, CSSDimension dimension, CGFloat amount)
|
||||
|
|
Loading…
Reference in New Issue