You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ky...@apache.org on 2019/05/17 07:14:10 UTC
[incubator-weex] branch master updated: Fix default wordwrap (#2456)
This is an automated email from the ASF dual-hosted git repository.
kyork pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-weex.git
The following commit(s) were added to refs/heads/master by this push:
new da0c68c Fix default wordwrap (#2456)
da0c68c is described below
commit da0c68cad2091279d67340fbcfbffc64e0b1783b
Author: wqyfavor <qi...@taobao.com>
AuthorDate: Fri May 17 15:14:04 2019 +0800
Fix default wordwrap (#2456)
---
ios/sdk/WeexSDK/Sources/Component/WXTextComponent.mm | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.mm b/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.mm
index 9516f3d..53cca4b 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.mm
+++ b/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.mm
@@ -540,14 +540,13 @@ do {\
paragraphStyle.alignment = retAlign;
}
- if ([[_wordWrap lowercaseString] isEqualToString:@"break-word"]) {
- paragraphStyle.lineBreakMode = NSLineBreakByWordWrapping;
- } else if ([[_wordWrap lowercaseString] isEqualToString:@"normal"]){
- paragraphStyle.lineBreakMode = NSLineBreakByClipping;
- } else {
- // set default lineBreakMode
+ if ([[_wordWrap lowercaseString] isEqualToString:@"anywhere"]) {
+ paragraphStyle.lineBreakMode = NSLineBreakByCharWrapping;
+ }
+ else {
paragraphStyle.lineBreakMode = NSLineBreakByWordWrapping;
}
+
_truncationLine = NO;
if (_textOverflow && [_textOverflow length] > 0) {
if (_lines && [_textOverflow isEqualToString:@"ellipsis"])