flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [21/30] git commit: [flex-asjs] [refs/heads/develop] - smarter sizing of content area
Date Sat, 18 Oct 2014 05:43:38 GMT
smarter sizing of content area


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

Branch: refs/heads/develop
Commit: 35b5576627f878a63b98d1c931d0b8aea95b437a
Parents: a48d1fa
Author: Alex Harui <aharui@apache.org>
Authored: Wed Oct 15 11:35:26 2014 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Fri Oct 17 22:38:47 2014 -0700

----------------------------------------------------------------------
 .../src/org/apache/flex/html/beads/ContainerView.as       | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/35b55766/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ContainerView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ContainerView.as
b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ContainerView.as
index 9979516..b934e94 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ContainerView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ContainerView.as
@@ -117,13 +117,19 @@ package org.apache.flex.html.beads
                 }
 				actualParent.x = padding.paddingLeft;
 				actualParent.y = padding.paddingTop;
+                var pb:Number = padding.paddingBottom;
+                if (isNaN(pb))
+                    pb = 0;
+                var pr:Number = padding.paddingRight;
+                if (isNaN(pr))
+                    pr = 0;
                 if (!isNaN(host.explicitWidth) || !isNaN(host.percentWidth))
-                    actualParent.width = host.width;
+                    actualParent.width = host.width - padding.paddingLeft - pr;
                 else
                     host.dispatchEvent(new Event("widthChanged"));
                 
                 if (!isNaN(host.explicitHeight) || !isNaN(host.percentHeight))
-                    actualParent.height = host.height;
+                    actualParent.height = host.height - padding.paddingTop - pb;
                 else
                     host.dispatchEvent(new Event("heightChanged"));
 			}


Mime
View raw message