You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ac...@apache.org on 2017/08/03 08:05:16 UTC

[1/4] incubator-weex git commit: + [ios] bugfix: textarea placeholder not right

Repository: incubator-weex
Updated Branches:
  refs/heads/0.16-dev 665c5bc54 -> e5f560e5c


+ [ios] bugfix: textarea placeholder not right


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/4ff0d9e6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/4ff0d9e6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/4ff0d9e6

Branch: refs/heads/0.16-dev
Commit: 4ff0d9e6847f2ffc7e64c132b9ec592e5c0d800c
Parents: 1aa0bf4
Author: 齐山 <su...@163.com>
Authored: Wed Aug 2 17:08:44 2017 +0800
Committer: 齐山 <su...@163.com>
Committed: Wed Aug 2 17:08:44 2017 +0800

----------------------------------------------------------------------
 ios/sdk/WeexSDK/Sources/Component/WXTextAreaComponent.m | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/4ff0d9e6/ios/sdk/WeexSDK/Sources/Component/WXTextAreaComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXTextAreaComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXTextAreaComponent.m
index 36eb2ad..21c13e8 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXTextAreaComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXTextAreaComponent.m
@@ -194,7 +194,7 @@ typedef UITextView WXTextAreaView;
     CGRect newFrame = self.placeHolderLabel.frame;
     newFrame.size.height = ceil(expectedLabelSize.size.height);
     newFrame.size.width = _textView.frame.size.width- CorrectX*2;
-    newFrame.origin.x = CorrectX; // the cursor origin.x
+    newFrame.origin.x = CorrectX + _padding.left + _border.left;; // the cursor origin.x
     self.placeHolderLabel.frame = newFrame;
     self.placeHolderLabel.attributedText = attributedString;
 }


[4/4] incubator-weex git commit: Merge branch 'ios-input-0.16-dev' of https://github.com/kfeagle/incubator-weex into wip-us-0.16-dev

Posted by ac...@apache.org.
Merge branch 'ios-input-0.16-dev' of https://github.com/kfeagle/incubator-weex into wip-us-0.16-dev


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/e5f560e5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/e5f560e5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/e5f560e5

Branch: refs/heads/0.16-dev
Commit: e5f560e5cd3046fd77ede3f075f087d4f2d29c16
Parents: 665c5bc befbfd3
Author: acton393 <zh...@gmail.com>
Authored: Thu Aug 3 16:04:57 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Thu Aug 3 16:04:57 2017 +0800

----------------------------------------------------------------------
 ios/sdk/WeexSDK/Sources/Component/WXEditComponent.m     | 11 +++++++----
 ios/sdk/WeexSDK/Sources/Component/WXTextAreaComponent.m |  2 +-
 2 files changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------



[2/4] incubator-weex git commit: + [ios] delete ;

Posted by ac...@apache.org.
+ [ios] delete ;


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/fe422b66
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/fe422b66
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/fe422b66

Branch: refs/heads/0.16-dev
Commit: fe422b66a52c1e7925293fe83dd2d7cdabb14bfd
Parents: 4ff0d9e
Author: 齐山 <su...@163.com>
Authored: Wed Aug 2 17:09:57 2017 +0800
Committer: 齐山 <su...@163.com>
Committed: Wed Aug 2 17:09:57 2017 +0800

----------------------------------------------------------------------
 ios/sdk/WeexSDK/Sources/Component/WXTextAreaComponent.m | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/fe422b66/ios/sdk/WeexSDK/Sources/Component/WXTextAreaComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXTextAreaComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXTextAreaComponent.m
index 21c13e8..d46da82 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXTextAreaComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXTextAreaComponent.m
@@ -194,7 +194,7 @@ typedef UITextView WXTextAreaView;
     CGRect newFrame = self.placeHolderLabel.frame;
     newFrame.size.height = ceil(expectedLabelSize.size.height);
     newFrame.size.width = _textView.frame.size.width- CorrectX*2;
-    newFrame.origin.x = CorrectX + _padding.left + _border.left;; // the cursor origin.x
+    newFrame.origin.x = CorrectX + _padding.left + _border.left; // the cursor origin.x
     self.placeHolderLabel.frame = newFrame;
     self.placeHolderLabel.attributedText = attributedString;
 }


[3/4] incubator-weex git commit: + [ios] fixbug placeholder show again

Posted by ac...@apache.org.
+ [ios] fixbug placeholder show again


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/befbfd36
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/befbfd36
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/befbfd36

Branch: refs/heads/0.16-dev
Commit: befbfd366be0a7e4c48e9d13708b2ff1a4aaf52b
Parents: fe422b6
Author: 齐山 <su...@163.com>
Authored: Wed Aug 2 18:15:01 2017 +0800
Committer: 齐山 <su...@163.com>
Committed: Wed Aug 2 18:15:01 2017 +0800

----------------------------------------------------------------------
 ios/sdk/WeexSDK/Sources/Component/WXEditComponent.m | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/befbfd36/ios/sdk/WeexSDK/Sources/Component/WXEditComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXEditComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXEditComponent.m
index c9a4cee..c9d1202 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXEditComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXEditComponent.m
@@ -361,10 +361,6 @@ WX_EXPORT_METHOD(@selector(getSelectionRange:))
     if (attributes[@"maxlength"]) {
         _maxLength = [NSNumber numberWithInteger:[attributes[@"maxlength"] integerValue]];
     }
-    if (attributes[@"placeholder"]) {
-        _placeholderString = [WXConvert NSString:attributes[@"placeholder"]]?:@"";
-        [self setPlaceholderAttributedString];
-    }
     if (attributes[@"value"]) {
         _value = [WXConvert NSString:attributes[@"value"]]?:@"";
         if (_maxLength && [_value length] > [_maxLength integerValue]&& [_maxLength integerValue] >= 0) {
@@ -372,6 +368,13 @@ WX_EXPORT_METHOD(@selector(getSelectionRange:))
         }
         [self setText:_value];
     }
+    if (attributes[@"placeholder"]) {
+        _placeholderString = [WXConvert NSString:attributes[@"placeholder"]]?:@"";
+        if(_value.length > 0){
+            _placeholderString = @"";
+        }
+        [self setPlaceholderAttributedString];
+    }
     if (attributes[@"returnKeyType"]) {
         _returnKeyType = [WXConvert UIReturnKeyType:attributes[@"returnKeyType"]];
         [self setReturnKeyType:_returnKeyType];