Skip to content

Commit

Permalink
Fix 'Import css-layout measure mode changes from pull request #163'
Browse files Browse the repository at this point in the history
Differential Revision: D3153045

fb-gh-sync-id: 29fa5aef3dbcc12d63c01d211b32bb598caadd0d
fbshipit-source-id: 29fa5aef3dbcc12d63c01d211b32bb598caadd0d
  • Loading branch information
Henry Lung authored and Facebook Github Bot 0 committed Apr 8, 2016
1 parent 8a649d8 commit 7a1b072
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Libraries/Text/RCTTextManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#import "RCTTextManager.h"

#import "Layout.h"
#import "RCTAccessibilityManager.h"
#import "RCTAssert.h"
#import "RCTConvert.h"
Expand All @@ -21,7 +22,7 @@

@interface RCTShadowText (Private)

- (NSTextStorage *)buildTextStorageForWidth:(CGFloat)width;
- (NSTextStorage *)buildTextStorageForWidth:(CGFloat)width widthMode:(css_measure_mode_t)widthMode;

@end

Expand Down Expand Up @@ -134,7 +135,7 @@ - (RCTViewManagerUIBlock)uiBlockToAmendWithShadowViewRegistry:(NSDictionary<NSNu

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];
Expand Down

0 comments on commit 7a1b072

Please sign in to comment.