Fix 'Import css-layout measure mode changes from pull request #163'

Differential Revision: D3153045

fb-gh-sync-id: 29fa5aef3dbcc12d63c01d211b32bb598caadd0d
fbshipit-source-id: 29fa5aef3dbcc12d63c01d211b32bb598caadd0d
This commit is contained in:
Henry Lung 2016-04-07 17:46:30 -07:00 committed by Facebook Github Bot 0
parent 8a649d8e54
commit 7a1b07291a
1 changed files with 3 additions and 2 deletions

View File

@ -9,6 +9,7 @@
#import "RCTTextManager.h"
#import "Layout.h"
#import "RCTAccessibilityManager.h"
#import "RCTAssert.h"
#import "RCTConvert.h"
@ -21,7 +22,7 @@
@interface RCTShadowText (Private)
- (NSTextStorage *)buildTextStorageForWidth:(CGFloat)width;
- (NSTextStorage *)buildTextStorageForWidth:(CGFloat)width widthMode:(css_measure_mode_t)widthMode;
@end
@ -134,7 +135,7 @@ RCT_EXPORT_SHADOW_PROPERTY(textShadowColor, UIColor)
UIEdgeInsets padding = shadowText.paddingAsInsets;
CGFloat width = shadowText.frame.size.width - (padding.left + padding.right);
NSTextStorage *textStorage = [shadowText buildTextStorageForWidth:width];
NSTextStorage *textStorage = [shadowText buildTextStorageForWidth:width widthMode:CSS_MEASURE_MODE_EXACTLY];
[uiBlocks addObject:^(RCTUIManager *uiManager, NSDictionary<NSNumber *, RCTTextView *> *viewRegistry) {
RCTTextView *textView = viewRegistry[reactTag];