mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fabric: RCTNSLineBreakModeFromWritingDirection was renamed
Summary: ... because the original name made no sense. Changelog: [Internal] Fabric-specific internal change. Reviewed By: sammy-SC Differential Revision: D18607834 fbshipit-source-id: bf32d2b61d1c3deccba0b599b303ede0b82e6dd6
This commit is contained in:
committed by
Facebook Github Bot
parent
11c9f480af
commit
83aa5b7e31
@@ -18,8 +18,8 @@ using namespace facebook::react;
|
||||
SimpleThreadSafeCache<AttributedString, std::shared_ptr<const void>, 256> _cache;
|
||||
}
|
||||
|
||||
static NSLineBreakMode RCTNSLineBreakModeFromWritingDirection(
|
||||
EllipsizeMode ellipsizeMode) {
|
||||
static NSLineBreakMode RCTNSLineBreakModeFromEllipsizeMode(EllipsizeMode ellipsizeMode)
|
||||
{
|
||||
switch (ellipsizeMode) {
|
||||
case EllipsizeMode::Clip:
|
||||
return NSLineBreakByClipping;
|
||||
@@ -80,8 +80,7 @@ static NSLineBreakMode RCTNSLineBreakModeFromWritingDirection(
|
||||
|
||||
textContainer.lineFragmentPadding = 0.0; // Note, the default value is 5.
|
||||
textContainer.lineBreakMode = paragraphAttributes.maximumNumberOfLines > 0
|
||||
? RCTNSLineBreakModeFromWritingDirection(
|
||||
paragraphAttributes.ellipsizeMode)
|
||||
? RCTNSLineBreakModeFromEllipsizeMode(paragraphAttributes.ellipsizeMode)
|
||||
: NSLineBreakByClipping;
|
||||
textContainer.maximumNumberOfLines = paragraphAttributes.maximumNumberOfLines;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user