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/07/17 08:32:56 UTC

[1/3] incubator-weex git commit: * [ios] get component rectangle when component view is not ready

Repository: incubator-weex
Updated Branches:
  refs/heads/0.15-dev 68e694160 -> ff12fe5a9


* [ios] get component rectangle when component view is not ready


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

Branch: refs/heads/0.15-dev
Commit: 2e4ed781794f84d083b2e5b2f5b72ac78bf7d209
Parents: 2c435d1
Author: acton393 <zh...@gmail.com>
Authored: Mon Jul 17 15:11:36 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Mon Jul 17 15:11:36 2017 +0800

----------------------------------------------------------------------
 ios/sdk/WeexSDK/Sources/Module/WXDomModule.m | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/2e4ed781/ios/sdk/WeexSDK/Sources/Module/WXDomModule.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Module/WXDomModule.m b/ios/sdk/WeexSDK/Sources/Module/WXDomModule.m
index 544bc71..e5c2ea2 100644
--- a/ios/sdk/WeexSDK/Sources/Module/WXDomModule.m
+++ b/ios/sdk/WeexSDK/Sources/Module/WXDomModule.m
@@ -202,7 +202,12 @@ WX_EXPORT_METHOD(@selector(getComponentRect:callback:))
                     [callbackRsp setObject:@(false) forKey:@"result"];
                     [callbackRsp setObject:[NSString stringWithFormat:@"Illegal parameter, no ref about \"%@\" can be found", ref] forKey:@"errMsg"];
                 } else {
-                    CGRect componentRect = [component.view.superview convertRect:component.view.frame toView:rootView];
+                    CGRect componentRect = CGRectZero;
+                    if ([component isViewLoaded] && component.view.superview) {
+                        componentRect = [component.view.superview convertRect:component.view.frame toView:rootView];
+                    }else {
+                        componentRect = component.calculatedFrame;
+                    }
                     callbackRsp = [strongSelf _componentRectInfoWithViewFrame:componentRect];
                     [callbackRsp setObject:@(true)forKey:@"result"];
                 }


[3/3] incubator-weex git commit: Merge branch '0.15-dev' of https://git-wip-us.apache.org/repos/asf/incubator-weex into 0.15-dev

Posted by ac...@apache.org.
Merge branch '0.15-dev' of https://git-wip-us.apache.org/repos/asf/incubator-weex into 0.15-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/ff12fe5a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/ff12fe5a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/ff12fe5a

Branch: refs/heads/0.15-dev
Commit: ff12fe5a9d6880564033d6b58dbdf5d9e9d47868
Parents: 784c9f3 68e6941
Author: acton393 <zh...@gmail.com>
Authored: Mon Jul 17 16:22:25 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Mon Jul 17 16:22:25 2017 +0800

----------------------------------------------------------------------
 .../com/taobao/weex/CreateFinishListener.java   | 27 ++++++++++++++
 .../com/taobao/weex/UpdateFinishListener.java   | 27 ++++++++++++++
 .../java/com/taobao/weex/WXSDKInstance.java     | 39 ++++++++++++++++++++
 .../com/taobao/weex/ui/component/WXSlider.java  | 28 ++++++++++++++
 4 files changed, 121 insertions(+)
----------------------------------------------------------------------



[2/3] incubator-weex git commit: * [ios] add more note about get component method @nodanger

Posted by ac...@apache.org.
* [ios] add more note about get component method @nodanger


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

Branch: refs/heads/0.15-dev
Commit: 784c9f398bf102c107374a9210c0d84bf082d416
Parents: 2e4ed78
Author: acton393 <zh...@gmail.com>
Authored: Mon Jul 17 15:33:18 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Mon Jul 17 15:33:18 2017 +0800

----------------------------------------------------------------------
 ios/sdk/WeexSDK/Sources/Module/WXDomModule.m | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/784c9f39/ios/sdk/WeexSDK/Sources/Module/WXDomModule.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Module/WXDomModule.m b/ios/sdk/WeexSDK/Sources/Module/WXDomModule.m
index e5c2ea2..c3e8e25 100644
--- a/ios/sdk/WeexSDK/Sources/Module/WXDomModule.m
+++ b/ios/sdk/WeexSDK/Sources/Module/WXDomModule.m
@@ -203,9 +203,10 @@ WX_EXPORT_METHOD(@selector(getComponentRect:callback:))
                     [callbackRsp setObject:[NSString stringWithFormat:@"Illegal parameter, no ref about \"%@\" can be found", ref] forKey:@"errMsg"];
                 } else {
                     CGRect componentRect = CGRectZero;
+                    // if current component view is not loaded or it hasn't been inserted to its superview, so the position cannot be obtained correct except width and height
                     if ([component isViewLoaded] && component.view.superview) {
                         componentRect = [component.view.superview convertRect:component.view.frame toView:rootView];
-                    }else {
+                    } else {
                         componentRect = component.calculatedFrame;
                     }
                     callbackRsp = [strongSelf _componentRectInfoWithViewFrame:componentRect];