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/12/27 07:50:20 UTC
incubator-weex git commit: * [iOS] as the CGFLOAT_MAX is not INF on
32-bit device, so the isInf will give a wrong result.
Repository: incubator-weex
Updated Branches:
refs/heads/master 45161eb40 -> 58200ac77
* [iOS] as the CGFLOAT_MAX is not INF on 32-bit device, so the isInf will give a wrong result.
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/58200ac7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/58200ac7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/58200ac7
Branch: refs/heads/master
Commit: 58200ac773bf2bc7ecad3911ed38b68ff3dcd044
Parents: 45161eb
Author: acton393 <zh...@gmail.com>
Authored: Wed Dec 27 15:50:06 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Wed Dec 27 15:50:06 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK/Sources/Component/WXTransform.m | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/58200ac7/ios/sdk/WeexSDK/Sources/Component/WXTransform.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXTransform.m b/ios/sdk/WeexSDK/Sources/Component/WXTransform.m
index 9f79c0e..6f3e153 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXTransform.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXTransform.m
@@ -174,7 +174,8 @@
{
CATransform3D nativeTansform3D = CATransform3DIdentity;
- if (_perspective && !isinf(_perspective)) {
+ // CGFLOAT_MAX is not INF on 32-bit device
+ if(_perspective && _perspective != CGFLOAT_MAX && !isinf(_perspective)) {
nativeTansform3D.m34 = -1.0/_perspective;
}
if (!view || view.bounds.size.width <= 0 || view.bounds.size.height <= 0) {