JS layout always runs (once)

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

Branch: refs/heads/develop
Commit: f4a696828aa118bbaa13ffd81ca513369481f716
Parents: 712a17e
Author: Alex Harui <[email protected]>
Authored: Thu Apr 27 14:07:11 2017 -0700
Committer: Alex Harui <[email protected]>
Committed: Thu Apr 27 14:15:18 2017 -0700

----------------------------------------------------------------------
 .../Basic/src/main/flex/org/apache/flex/core/LayoutBase.as   | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f4a69682/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/LayoutBase.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/LayoutBase.as 
b/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/LayoutBase.as
index 979ebc7..adadc75 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/LayoutBase.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/LayoutBase.as
@@ -174,11 +174,19 @@ package org.apache.flex.core
                {
                        sawInitComplete = true;
                        
+                       COMPILE::SWF
+                       {
                        // Complete the setup if the height is sized to content 
or has been explicitly set
             // and the width is sized to content or has been explicitly set
                        if ((host.isHeightSizedToContent() || 
!isNaN(host.explicitHeight)) &&
                 (host.isWidthSizedToContent() || !isNaN(host.explicitWidth)))
                        performLayout();
+                       }
+                       COMPILE::JS
+                       {
+                               // always run layout since there are no size 
change events
+                       performLayout();
+                       }
                }
                
                /**

Reply via email to