flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [05/22] git commit: [flex-asjs] [refs/heads/develop] - handle NaN
Date Fri, 09 Jan 2015 16:10:18 GMT
handle NaN


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/34748301
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/34748301
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/34748301

Branch: refs/heads/develop
Commit: 34748301601e5a3239e641643fdbc8c0e1235b53
Parents: 6a41078
Author: Alex Harui <aharui@apache.org>
Authored: Wed Jan 7 20:38:43 2015 -0800
Committer: Alex Harui <aharui@apache.org>
Committed: Fri Jan 9 08:09:47 2015 -0800

----------------------------------------------------------------------
 .../beads/layouts/FlexibleFirstChildHorizontalLayout.as     | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/34748301/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
index 81afce9..60d124b 100644
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
@@ -89,6 +89,8 @@ package org.apache.flex.html.beads.layouts
 			var verticalMargins:Array = [];
 			
             var xx:Number = layoutParent.resizableView.width;
+            if (isNaN(xx))
+                return;
             var padding:Object = determinePadding();
             xx -= padding.paddingLeft + padding.paddingRight;
             
@@ -228,7 +230,12 @@ package org.apache.flex.html.beads.layouts
             var pl:Number = Number(paddingLeft);
             var pt:Number = Number(paddingTop);
             var pr:Number = Number(paddingRight);
-            
+            if (isNaN(pl))
+                pl = 0;
+            if (isNaN(pt))
+                pt = 0;
+            if (isNaN(pr))
+                pr = 0;
             return {paddingLeft:pl, paddingTop:pt, paddingRight:pr};
         }
 


Mime
View raw message