This is an automated email from the ASF dual-hosted git repository.

harbs pushed a commit to branch feature/layout-optimization
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/feature/layout-optimization by 
this push:
     new ecc9d9f  Cleaned up LayoutBase
ecc9d9f is described below

commit ecc9d9f52232ca559f6447abf7166301c26f1793
Author: Harbs <[email protected]>
AuthorDate: Thu Mar 29 21:46:21 2018 +0300

    Cleaned up LayoutBase
---
 .../royale/org/apache/royale/core/LayoutBase.as    | 44 ++++++++++------------
 .../html/beads/layouts/VerticalColumnLayout.as     |  4 +-
 2 files changed, 21 insertions(+), 27 deletions(-)

diff --git 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/LayoutBase.as
 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/LayoutBase.as
index 50e0f08..6688e84 100644
--- 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/LayoutBase.as
+++ 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/LayoutBase.as
@@ -317,36 +317,30 @@ package org.apache.royale.core
                                host.measuredHeight = host.height;
                                host.measuredWidth = host.width;
                        }
-                       // LayoutManager.addMeasurement(host);
                        
                        var viewBead:ILayoutHost = (host as 
ILayoutParent).getLayoutHost();
                        
                        viewBead.beforeLayout();
-                       // LayoutManager.addLayout(
-                       //      function ():void
-                       //      {
-                                       if (layout()) {
-                                               viewBead.afterLayout();
-                                       }
-                                       
+                       if (layout()) {
+                               viewBead.afterLayout();
+                       }
+                       
+                       isLayoutRunning = false;
+                       
+                       host.dispatchEvent(new Event("layoutComplete"));
+                       
+                       COMPILE::SWF
+                       {
+                               // check sizes to see if layout changed the 
size or not
+                               // and send an event to re-layout parent of host
+                               if (host.width != host.measuredWidth ||
+                                       host.height != host.measuredHeight)
+                               {
+                                       isLayoutRunning = true;
+                                       host.dispatchEvent(new 
Event("sizeChanged"));
                                        isLayoutRunning = false;
-                                       
-                                       host.dispatchEvent(new 
Event("layoutComplete"));
-                                       
-                                       COMPILE::SWF
-                                       {
-                                               // check sizes to see if layout 
changed the size or not
-                                               // and send an event to 
re-layout parent of host
-                                               if (host.width != 
host.measuredWidth ||
-                                                       host.height != 
host.measuredHeight)
-                                               {
-                                                       isLayoutRunning = true;
-                                                       host.dispatchEvent(new 
Event("sizeChanged"));
-                                                       isLayoutRunning = false;
-                                               }
-                                       }
-                       //      }
-                       // );
+                               }
+                       }
 
                }
 
diff --git 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/layouts/VerticalColumnLayout.as
 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/layouts/VerticalColumnLayout.as
index f619626..aff190b 100644
--- 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/layouts/VerticalColumnLayout.as
+++ 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/layouts/VerticalColumnLayout.as
@@ -103,8 +103,8 @@ package org.apache.royale.html.beads.layouts
                        }
                        
             var padding:EdgeData = (ValuesManager.valuesImpl as 
IBorderPaddingMarginValuesImpl).getPaddingMetrics(host);
-                       var sw:Number = host.measuredWidth;
-                       var sh:Number = host.measuredHeight;
+                       var sw:Number = host.width;
+                       var sh:Number = host.height;
 
             var hasWidth:Boolean = !host.isWidthSizedToContent();
             var hasHeight:Boolean = !host.isHeightSizedToContent();

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to