Repository: flex-asjs
Updated Branches:
  refs/heads/develop cbf80537d -> 6ff7ea778


Changed how initial layout is performed: now checks to see if there are 
children present because of inline MXML components.


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

Branch: refs/heads/develop
Commit: 6ff7ea778509f4a1155de0b9b0f1a0e5cfdd1b7c
Parents: cbf8053
Author: Peter Ent <[email protected]>
Authored: Fri Jul 24 14:59:14 2015 -0400
Committer: Peter Ent <[email protected]>
Committed: Fri Jul 24 14:59:14 2015 -0400

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


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6ff7ea77/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/ContainerView.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/ContainerView.as 
b/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/ContainerView.as
index 8d3d7fe..cca5364 100644
--- 
a/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/ContainerView.as
+++ 
b/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/ContainerView.as
@@ -106,7 +106,9 @@ package org.apache.flex.html.beads
                        // if the host component is not being sized by 
percentage, go ahead and complete the setup.
                        if (isNaN((host as UIBase).percentHeight) && 
isNaN((host as UIBase).percentWidth)) {
                                completeSetup();
-                               performLayout(event);
+                               
+                               var num:Number = contentView.numElements;
+                               if (num > 0) performLayout(event);
                        }
                        else {
                                // otherwise, wait until the size has been set 
and then finish
@@ -118,7 +120,9 @@ package org.apache.flex.html.beads
                {
                        host.removeEventListener(event.type, 
deferredSizeHandler);
                        completeSetup();
-                       performLayout(event);
+                       
+                       var num:Number = contentView.numElements;
+                       if (num > 0) performLayout(event);
                }
                
                protected function completeSetup():void

Reply via email to