royale-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [royale-asjs] 02/07: insert contentarea layout sooner so the base class doesn't add a default layout first
Date Tue, 14 Aug 2018 07:58:15 GMT
This is an automated email from the ASF dual-hosted git repository.

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

commit 550761c20793dbb3c26c2fa897039401eb634f0a
Author: Alex Harui <aharui@apache.org>
AuthorDate: Mon Aug 13 23:25:40 2018 -0700

    insert contentarea layout sooner so the base class doesn't add a default layout first
---
 .../main/royale/org/apache/royale/html/beads/PanelView.as    | 12 ++++++++++--
 .../src/main/royale/mx/containers/beads/PanelView.as         |  9 +++++++--
 2 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/PanelView.as
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/PanelView.as
index f419f5a..4d459c2 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/PanelView.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/PanelView.as
@@ -177,8 +177,11 @@ package org.apache.royale.html.beads
 				_contentArea.typeNames = "PanelContent";
 
 				// add the layout bead to the content area.
-				if (transferLayoutBead) _contentArea.addBead(transferLayoutBead);
-
+				if (transferLayoutBead) 
+                    _contentArea.addBead(transferLayoutBead);
+                else
+                    setupContentAreaLayout();
+                
 				// add the viewport bead to the content area.
 				if (transferViewportBead) _contentArea.addBead(transferViewportBead);
 
@@ -201,6 +204,11 @@ package org.apache.royale.html.beads
             setupLayout();
         }
         
+        protected function setupContentAreaLayout():void
+        {
+            
+        }
+        
         protected function setupLayout():void
         {
             COMPILE::JS {
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/containers/beads/PanelView.as
b/frameworks/projects/MXRoyale/src/main/royale/mx/containers/beads/PanelView.as
index 75393d8..84bac6c 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/containers/beads/PanelView.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/containers/beads/PanelView.as
@@ -67,7 +67,11 @@ public class PanelView extends org.apache.royale.html.beads.PanelView
     {
         titleBar = new PanelTitleBar();
         super.strand = value;
-        var model:PanelModel = (value as UIBase).model as PanelModel;
+    }
+    
+    override protected function setupContentAreaLayout():void
+    {
+        var model:PanelModel = (_strand as UIBase).model as PanelModel;
         var _layout:String = model.layout;
         var layoutObject:IBead;
         if (_layout == ContainerLayout.ABSOLUTE)
@@ -83,9 +87,10 @@ public class PanelView extends org.apache.royale.html.beads.PanelView
                 BoxLayout(layoutObject).direction
                     = BoxDirection.HORIZONTAL;
         }
-            
+        
         if (layoutObject)
             contentArea.addBead(layoutObject);            
+        
     }
     
     override protected function setupLayout():void


Mime
View raw message