You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2017/05/23 07:16:09 UTC

[01/13] git commit: [flex-asjs] [refs/heads/release0.8.0] - don't use NaN if sizedToContent. Some Flexible children look like they are sized to content but they aren't

Repository: flex-asjs
Updated Branches:
  refs/heads/release0.8.0 85b9754ac -> 1e450bb75


don't use NaN if sizedToContent.  Some Flexible children look like they are sized to content but they aren't


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

Branch: refs/heads/release0.8.0
Commit: 6832946303603085392011c61717fbb02886d651
Parents: 9a319b2
Author: Alex Harui <ah...@apache.org>
Authored: Sun May 21 23:27:13 2017 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue May 23 00:15:55 2017 -0700

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


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/68329463/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/ContainerView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/ContainerView.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/ContainerView.as
index ac723a9..5dd18fc 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/ContainerView.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/ContainerView.as
@@ -241,8 +241,8 @@ package org.apache.flex.html.beads
             viewport.setPosition(vm.borderMetrics.left, vm.borderMetrics.top);
 
 			viewport.layoutViewportBeforeContentLayout(
-				host.isWidthSizedToContent() ? NaN : hostWidth - vm.borderMetrics.left - vm.borderMetrics.right,
-				host.isHeightSizedToContent() ? NaN : hostHeight - vm.borderMetrics.top - vm.borderMetrics.bottom);
+				hostWidth - vm.borderMetrics.left - vm.borderMetrics.right,
+				hostHeight - vm.borderMetrics.top - vm.borderMetrics.bottom);
 		}
 
 		/**


[05/13] git commit: [flex-asjs] [refs/heads/release0.8.0] - add custom layout that locks the cross-axis dimension to the other children's size. Used in ASDoc to create the 3 pane view with scrolling. The scrolling container needs its size locked down.

Posted by ah...@apache.org.
add custom layout that locks the cross-axis dimension to the other children's size.  Used in ASDoc to create the 3 pane view with scrolling.  The scrolling container needs its size locked down.


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

Branch: refs/heads/release0.8.0
Commit: d550f670c510286032ddd437ca261a941b5bd00b
Parents: 646d01d
Author: Alex Harui <ah...@apache.org>
Authored: Sun May 21 23:37:59 2017 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue May 23 00:15:56 2017 -0700

----------------------------------------------------------------------
 ...xibleChildHorizontalLayoutLockChildHeight.as | 91 +++++++++++++++++++
 ...FlexibleChildVerticalLayoutLockChildWidth.as | 93 ++++++++++++++++++++
 .../Basic/src/main/resources/basic-manifest.xml |  2 +
 3 files changed, 186 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d550f670/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayoutLockChildHeight.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayoutLockChildHeight.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayoutLockChildHeight.as
new file mode 100644
index 0000000..d170d23
--- /dev/null
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayoutLockChildHeight.as
@@ -0,0 +1,91 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.html.beads.layouts
+{
+	import org.apache.flex.core.LayoutBase;
+	import org.apache.flex.core.IDocument;
+	import org.apache.flex.core.ILayoutChild;
+	import org.apache.flex.core.ILayoutHost;
+	import org.apache.flex.core.ILayoutView;
+	import org.apache.flex.core.ILayoutParent;
+	import org.apache.flex.core.IParentIUIBase;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.IUIBase;
+	import org.apache.flex.core.ValuesManager;
+	import org.apache.flex.core.UIBase;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.geom.Rectangle;
+	import org.apache.flex.utils.CSSContainerUtils;
+	import org.apache.flex.utils.CSSUtils;
+
+    /**
+     *  The OneFlexibleChildHorizontalLayoutLockChildHeight 
+	 *  is a subclass of OneFlexibleChildHorizontalLayout
+	 *  that sets the flexible child's height to be the height
+	 *  of the host container.  This is useful when you
+	 *  don't want the actual child's height to dictate the
+	 *  height of the container in order to force
+	 *  scrollbars
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+	public class OneFlexibleChildHorizontalLayoutLockChildHeight extends OneFlexibleChildHorizontalLayout
+	{
+        /**
+         *  Constructor.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function OneFlexibleChildHorizontalLayoutLockChildHeight()
+		{
+			super();
+		}
+
+        /**
+         * @copy org.apache.flex.core.IBeadLayout#layout
+         */
+		override public function layout():Boolean
+		{
+			var ret:Boolean = super.layout();
+			if (ret)
+			{
+				var contentView:ILayoutView = layoutView;
+	
+				var n:int = contentView.numElements;
+
+				var h:Number = host.height;
+				for(var i:int=0; i < n; i++) {
+					var child:UIBase = contentView.getElementAt(i) as UIBase;
+					if (child != actualChild)
+						h = child.height;
+				}
+				actualChild.setHeight(h); 
+			}
+			return ret;
+		}
+
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d550f670/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayoutLockChildWidth.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayoutLockChildWidth.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayoutLockChildWidth.as
new file mode 100644
index 0000000..7415299
--- /dev/null
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayoutLockChildWidth.as
@@ -0,0 +1,93 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.html.beads.layouts
+{
+	import org.apache.flex.core.LayoutBase;
+	import org.apache.flex.core.IDocument;
+	import org.apache.flex.core.ILayoutChild;
+	import org.apache.flex.core.ILayoutHost;
+	import org.apache.flex.core.ILayoutView;
+	import org.apache.flex.core.ILayoutParent;
+	import org.apache.flex.core.IParentIUIBase;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.IStyleableObject;
+	import org.apache.flex.core.IUIBase;
+	import org.apache.flex.core.ValuesManager;
+	import org.apache.flex.core.UIBase;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.geom.Rectangle;
+	import org.apache.flex.utils.CSSContainerUtils;
+	import org.apache.flex.utils.CSSUtils;
+
+    /**
+     *  The OneFlexibleChildHorizontalLayoutLockChildHeight 
+	 *  is a subclass of OneFlexibleChildHorizontalLayout
+	 *  that sets the flexible child's height to be the height
+	 *  of the host container.  This is useful when you
+	 *  don't want the actual child's height to dictate the
+	 *  height of the container in order to force
+	 *  scrollbars or line wrapping.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+	public class OneFlexibleChildVerticalLayoutLockChildWidth extends OneFlexibleChildVerticalLayout
+	{
+        /**
+         *  Constructor.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function OneFlexibleChildVerticalLayoutLockChildWidth()
+		{
+			super();
+		}
+
+        /**
+         * @copy org.apache.flex.core.IBeadLayout#layout
+         */
+		override public function layout():Boolean
+		{
+			var ret:Boolean = super.layout();
+			if (ret)
+			{
+				var contentView:ILayoutView = layoutView;
+	
+				var n:int = contentView.numElements;
+
+				var w:Number = host.width;
+				for(var i:int=0; i < n; i++) {
+					var child:UIBase = contentView.getElementAt(i) as UIBase;
+					if (child != actualChild)
+						w = child.width;
+				}
+				
+				actualChild.setWidth(w); 
+			}
+			return ret;
+		}
+
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d550f670/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/resources/basic-manifest.xml b/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
index 204d10c..7cbc05d 100644
--- a/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
+++ b/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
@@ -150,6 +150,8 @@
     <component id="FlexibleFirstChildHorizontalLayout" class="org.apache.flex.html.beads.layouts.FlexibleFirstChildHorizontalLayout"/>
     <component id="OneFlexibleChildVerticalLayout" class="org.apache.flex.html.beads.layouts.OneFlexibleChildVerticalLayout"/>
     <component id="OneFlexibleChildHorizontalLayout" class="org.apache.flex.html.beads.layouts.OneFlexibleChildHorizontalLayout"/>
+    <component id="OneFlexibleChildVerticalLayoutLockChildWidth" class="org.apache.flex.html.beads.layouts.OneFlexibleChildVerticalLayoutLockChildWidth"/>
+    <component id="OneFlexibleChildHorizontalLayoutLockChildHeight" class="org.apache.flex.html.beads.layouts.OneFlexibleChildHorizontalLayoutLockChildHeight"/>
     <component id="MXMLBeadView" class="org.apache.flex.html.MXMLBeadView"/>
 
     <component id="SubAppLoader" class="org.apache.flex.html.SubAppLoader" />


[11/13] git commit: [flex-asjs] [refs/heads/release0.8.0] - give up on flex layouts for full-screen 3-pane layouts

Posted by ah...@apache.org.
give up on flex layouts for full-screen 3-pane layouts


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

Branch: refs/heads/release0.8.0
Commit: f05a94f40491eb4f88a05d3a8d4e70b3257171b7
Parents: 23c4c7a
Author: Alex Harui <ah...@apache.org>
Authored: Tue May 23 00:12:47 2017 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue May 23 00:15:57 2017 -0700

----------------------------------------------------------------------
 .../ASDoc/src/main/flex/ASDocMainView.mxml      | 26 ++++++++++----------
 1 file changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f05a94f4/examples/flexjs/ASDoc/src/main/flex/ASDocMainView.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/ASDoc/src/main/flex/ASDocMainView.mxml b/examples/flexjs/ASDoc/src/main/flex/ASDocMainView.mxml
index cd5a978..d1b7158 100644
--- a/examples/flexjs/ASDoc/src/main/flex/ASDocMainView.mxml
+++ b/examples/flexjs/ASDoc/src/main/flex/ASDocMainView.mxml
@@ -59,36 +59,36 @@ limitations under the License.
 	</fx:Style>
     <js:beads>
         <js:ViewDataBinding />
-        <js:OneFlexibleChildVerticalLayout flexibleChild="topContainer" />                
+        <js:OneFlexibleChildVerticalLayoutForOverflow flexibleChild="topContainer" />                
     </js:beads>
     <js:Group width="100%" id="titleGroup">
         <js:beads>
-            <js:FlexibleFirstChildHorizontalLayout/>
+            <js:OneFlexibleChildHorizontalLayoutForOverflow flexibleChild="title" />
         </js:beads>
-        <js:Label text="FlexJS ActionScript Library Reference" height="30" style="fontSize:20"/>
+        <js:Label text="FlexJS ActionScript Library Reference" id="title" height="30" style="fontSize:20"/>
         <js:CheckBox id="topLevel" text="Top-Level" click="showTopLevel()" />
         <js:CheckBox id="viewBeads" text="View Bead" click="showViewBeads()" />
     </js:Group>
-    <js:Group width="100%" className="topContainer" id="topContainer" style="align-items: start">
+    <js:Group width="100%" className="topContainer" id="topContainer">
         <js:beads>
-            <js:OneFlexibleChildHorizontalLayoutLockChildHeight flexibleChild="rightSide" />
+            <js:OneFlexibleChildHorizontalLayoutForOverflow flexibleChild="rightSide" />
             <js:LayoutChangeNotifier watchedProperty="{ASDocModel(applicationModel).packageList}" initialValue="null" />
         </js:beads>
-        <js:Group width="300" className="leftSide" id="leftSide">
+        <js:Group width="300" height="100%" className="leftSide" id="leftSide">
             <js:beads>
-                <js:VerticalFlexLayout />
+                <js:VerticalLayout />
             </js:beads>
-            <js:List id="packageList" dataProvider="{ASDocModel(applicationModel).packageList}" change="packageChangedHandler()" width="100%" height="50%" style="flex-grow: '1';flex-shrink: '1'"/>
-            <js:List id="classList" dataProvider="{ASDocModel(applicationModel).classList}" change="classChangedHandler()"  width="100%" height="50%" style="flex-grow: '1';flex-shrink: '1'"/>
+            <js:List id="packageList" dataProvider="{ASDocModel(applicationModel).packageList}" change="packageChangedHandler()" width="100%" height="50%"/>
+            <js:List id="classList" dataProvider="{ASDocModel(applicationModel).classList}" change="classChangedHandler()"  width="100%" height="50%"/>
         </js:Group>
-        <js:Container className="rightSide" id="rightSide" style="align-items: start">
+        <js:Container className="rightSide" id="rightSide" height="100%">
             <js:beads>
-                <js:OneFlexibleChildVerticalLayoutLockChildWidth flexibleChild="detailsPane" />
+                <js:VerticalLayout />
                 <js:ScrollingViewport />
             </js:beads>
-            <js:Group id="detailsPane">
+            <js:Group id="detailsPane" width="100%">
 	            <js:beads>
-	                <js:VerticalFlexLayout />
+	                <js:VerticalLayout />
 	            </js:beads>
 	            <js:Label id="packageName"  text="{ASDocModel(applicationModel).currentPackage}" width="100%"/>
 	            <js:Label id="baseName" text="{ASDocModel(applicationModel).currentClass}" width="100%" style="fontSize:20"/>


[10/13] git commit: [flex-asjs] [refs/heads/release0.8.0] - if sizedToContent, don't show a scrollbar

Posted by ah...@apache.org.
if sizedToContent, don't show a scrollbar


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

Branch: refs/heads/release0.8.0
Commit: 23c4c7a51640884ae5af64541ff6a4f5515af183
Parents: 43bbbdb
Author: Alex Harui <ah...@apache.org>
Authored: Tue May 23 00:11:28 2017 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue May 23 00:15:57 2017 -0700

----------------------------------------------------------------------
 .../flex/html/supportClasses/ScrollingViewport.as     | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/23c4c7a5/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/ScrollingViewport.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/ScrollingViewport.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/ScrollingViewport.as
index 444606b..fb6d784 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/ScrollingViewport.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/ScrollingViewport.as
@@ -188,11 +188,13 @@ package org.apache.flex.html.supportClasses
          */
 		override public function layoutViewportAfterContentLayout(contentSize:Size):void
 		{
+			var host:UIBase = UIBase(_strand);
+			
 			var hadV:Boolean = _verticalScroller != null && _verticalScroller.visible;
 			var hadH:Boolean = _horizontalScroller != null && _horizontalScroller.visible;
 			
-			var hostWidth:Number = UIBase(_strand).width;
-			var hostHeight:Number = UIBase(_strand).height;
+			var hostWidth:Number = host.width;
+			var hostHeight:Number = host.height;
 			
 			var borderMetrics:org.apache.flex.geom.Rectangle = CSSContainerUtils.getBorderMetrics(_strand);
 			
@@ -202,6 +204,14 @@ package org.apache.flex.html.supportClasses
 			var needV:Boolean = contentSize.height > viewportHeight;
 			var needH:Boolean = contentSize.width > viewportWidth;
 			
+			// if sized to content, the container should stretch to fit, making the original
+			// viewport dimensions obsolete and scrollbars unnecessary.
+			// This might not work for the flexible child.
+			if (host.isWidthSizedToContent())
+				needH = false;
+			if (host.isHeightSizedToContent())
+				needV = false;
+
 			if (needV)
 			{
 				if (_verticalScroller == null) {


[09/13] git commit: [flex-asjs] [refs/heads/release0.8.0] - get rid of background Sprite. Draw directly in the renderer sprite. Otherwise the sprite will be seen by layout and isn't an layout child

Posted by ah...@apache.org.
get rid of background Sprite.  Draw directly in the renderer sprite.  Otherwise the sprite will be seen by layout and isn't an layout child


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

Branch: refs/heads/release0.8.0
Commit: 198ab8ad994a57f9763f92c02fd225a347e3a240
Parents: 6832946
Author: Alex Harui <ah...@apache.org>
Authored: Sun May 21 23:29:12 2017 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue May 23 00:15:56 2017 -0700

----------------------------------------------------------------------
 .../html/supportClasses/DataItemRenderer.as     | 22 ++++----------------
 1 file changed, 4 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/198ab8ad/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/DataItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/DataItemRenderer.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/DataItemRenderer.as
index 7154689..c1da93c 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/DataItemRenderer.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/DataItemRenderer.as
@@ -111,23 +111,9 @@ package org.apache.flex.html.supportClasses
 			_dataField = value;
 		}
 
-		COMPILE::SWF
-		private var background:Sprite;
-
 		COMPILE::JS
 		private var controller:ItemRendererMouseController;
 
-		/**
-		 * @private
-		 */
-		COMPILE::SWF
-		override public function addedToParent():void
-		{
-			super.addedToParent();
-
-			background = new Sprite();
-			addChild(background);
-		}
 
 		/**
 		 * @private
@@ -138,10 +124,10 @@ package org.apache.flex.html.supportClasses
 			{
 				super.updateRenderer();
 
-				background.graphics.clear();
-				background.graphics.beginFill(useColor, (down||selected||hovered)?1:0);
-				background.graphics.drawRect(0, 0, width, height);
-				background.graphics.endFill();
+				graphics.clear();
+				graphics.beginFill(useColor, (down||selected||hovered)?1:0);
+				graphics.drawRect(0, 0, width, height);
+				graphics.endFill();
 			}
 			COMPILE::JS
 			{


[08/13] git commit: [flex-asjs] [refs/heads/release0.8.0] - try to improve Flex-box layout in SWF. Support align-items and flex-basis and fully size on the cross-axis

Posted by ah...@apache.org.
try to improve Flex-box layout in SWF.  Support align-items and flex-basis and fully size on the cross-axis


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

Branch: refs/heads/release0.8.0
Commit: 646d01d3b36ba3a95a411175cc935807753d265d
Parents: 198ab8a
Author: Alex Harui <ah...@apache.org>
Authored: Sun May 21 23:33:24 2017 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue May 23 00:15:56 2017 -0700

----------------------------------------------------------------------
 .../FlexibleFirstChildHorizontalLayout.as       |  5 +-
 .../html/beads/layouts/HorizontalFlexLayout.as  |  2 +
 .../layouts/OneFlexibleChildHorizontalLayout.as | 53 +++++++++++++------
 .../layouts/OneFlexibleChildVerticalLayout.as   | 54 ++++++++++++++------
 .../html/beads/layouts/VerticalFlexLayout.as    |  2 +
 5 files changed, 85 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/646d01d3/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
index c1e6d27..30398f1 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
@@ -209,7 +209,8 @@ package org.apache.flex.html.beads.layouts
 			// set the display on the contentView
 			contentView.element.style["display"] = "flex";
 			contentView.element.style["flex-flow"] = "row";
-			contentView.element.style["align-items"] = "center";
+			if (!contentView.element.style["align-items"])
+				contentView.element.style["align-items"] = "center";
 
 			var n:int = contentView.numElements;
 			if (n == 0) return false;
@@ -218,6 +219,8 @@ package org.apache.flex.html.beads.layouts
 				var child:UIBase = contentView.getElementAt(i) as UIBase;
 				child.element.style["flex-grow"] = (i == 0) ? "1" : "0";
 				child.element.style["flex-shrink"] = "0";
+				if (!isNaN(child.percentWidth))
+				    child.element.style["flex-basis"] = child.percentWidth.toString() + "%";
 			}
 
 			return true;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/646d01d3/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/HorizontalFlexLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/HorizontalFlexLayout.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/HorizontalFlexLayout.as
index 65404ea..bbdeceb 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/HorizontalFlexLayout.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/HorizontalFlexLayout.as
@@ -260,6 +260,8 @@ package org.apache.flex.html.beads.layouts
 					
 					if (grow >= 0) child.element.style["flex-grow"] = String(grow);
 					if (shrink >= 0) child.element.style["flex-shrink"] = String(shrink);
+					if (!isNaN(child.percentWidth))
+						child.element.style["flex-basis"] = child.percentWidth.toString() + "%";
 					child.dispatchEvent(new Event("layoutNeeded"));
 				}
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/646d01d3/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayout.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayout.as
index 17fb651..c1afc83 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayout.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayout.as
@@ -65,7 +65,7 @@ package org.apache.flex.html.beads.layouts
 
         private var _flexibleChild:String;
 
-        private var actualChild:ILayoutChild;
+        protected var actualChild:ILayoutChild;
 
         /**
          *  @private
@@ -153,7 +153,8 @@ package org.apache.flex.html.beads.layouts
 			// set the display on the contentView
 			contentView.element.style["display"] = "flex";
 			contentView.element.style["flex-flow"] = "row";
-			contentView.element.style["align-items"] = "center";
+			if (!contentView.element.style["align-items"])
+				contentView.element.style["align-items"] = "center";
 
 			var n:int = contentView.numElements;
 			if (n == 0) return false;
@@ -162,6 +163,8 @@ package org.apache.flex.html.beads.layouts
 				var child:UIBase = contentView.getElementAt(i) as UIBase;
 				child.element.style["flex-grow"] = (child == actualChild) ? "1" : "0";
 				child.element.style["flex-shrink"] = "0";
+				if (!isNaN(child.percentWidth))
+				    child.element.style["flex-basis"] = child.percentWidth.toString() + "%";
 			}
 
 			return true;
@@ -171,7 +174,7 @@ package org.apache.flex.html.beads.layouts
 		override public function layout():Boolean
 		{
 			var contentView:ILayoutView = layoutView;
-			var actualChild:IUIBase = document.hasOwnProperty(flexibleChild) ? document[flexibleChild] : null;
+			actualChild = document.hasOwnProperty(flexibleChild) ? document[flexibleChild] : null;
 
 			var n:Number = contentView.numElements;
 			if (n == 0) return false;
@@ -225,12 +228,19 @@ package org.apache.flex.html.beads.layouts
 				childYpos = ypos + margins.top; // default y position
 
 				childHeight = child.height;
-				if (ilc != null && !isNaN(ilc.percentHeight)) {
-					childHeight = host.height * ilc.percentHeight/100.0;
+				if (ilc != null)
+				{
+					if (!isNaN(ilc.percentHeight)) {
+						childHeight = host.height * ilc.percentHeight/100.0;
+					}
+					else if (isNaN(ilc.explicitHeight)) {
+						childHeight = host.height;
+					}
 					ilc.setHeight(childHeight);
 				}
-				// the following code middle-aligns the child
-				childYpos = hostHeight/2 - childHeight/2 + ypos;
+                var align:String = ValuesManager.valuesImpl.getValue(host, "alignItems");
+				if (align == "center")
+					childYpos = hostHeight/2 - childHeight/2 + ypos;
 
 				if (ilc) {
 					ilc.setX(xpos);
@@ -264,12 +274,19 @@ package org.apache.flex.html.beads.layouts
 				childYpos = ypos + margins.top; // default y position
 
 				childHeight = child.height;
-				if (ilc != null && !isNaN(ilc.percentHeight)) {
-					childHeight = hostHeight * ilc.percentHeight/100.0;
+				if (ilc != null)
+				{
+					if (!isNaN(ilc.percentHeight)) {
+						childHeight = host.height * ilc.percentHeight/100.0;
+					}
+					else if (isNaN(ilc.explicitHeight)) {
+						childHeight = host.height;
+					}
 					ilc.setHeight(childHeight);
 				}
-				// the following code middle-aligns the child
-				childYpos = hostHeight/2 - childHeight/2 + ypos;
+                align = ValuesManager.valuesImpl.getValue(host, "alignItems");
+				if (align == "center")
+					childYpos = hostHeight/2 - childHeight/2 + ypos;
 
 				if (ilc) {
 					if (!isNaN(ilc.percentWidth)) {
@@ -296,14 +313,20 @@ package org.apache.flex.html.beads.layouts
 				margins = childMargins(actualChild, hostWidth, hostHeight);
 				ilc = actualChild as ILayoutChild;
 				childHeight = actualChild.height;
-				if (ilc != null && !isNaN(ilc.percentHeight)) {
-					childHeight = hostHeight * ilc.percentHeight/100.0;
+				if (ilc != null)
+				{
+					if (!isNaN(ilc.percentHeight)) {
+						childHeight = host.height * ilc.percentHeight/100.0;
+					}
+					else if (isNaN(ilc.explicitHeight)) {
+						childHeight = host.height;
+					}
 					ilc.setHeight(childHeight);
 				}
 				childYpos = ypos + margins.top;
-				if (!hostSizedToContent) {
+                align = ValuesManager.valuesImpl.getValue(host, "alignItems");
+				if (align == "center")
 					childYpos = hostHeight/2 - childHeight/2 + ypos;
-				}
 				actualChild.x = adjustLeft + margins.left;
 				actualChild.y = childYpos;
 				if (ilc) {

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/646d01d3/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayout.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayout.as
index f80bafe..51dbb72 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayout.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayout.as
@@ -66,7 +66,7 @@ package org.apache.flex.html.beads.layouts
 
         private var _flexibleChild:String;
 
-        private var actualChild:ILayoutChild;
+        protected var actualChild:ILayoutChild;
 
         /**
          *  @private
@@ -154,7 +154,8 @@ package org.apache.flex.html.beads.layouts
 			// set the display on the contentView
 			contentView.element.style["display"] = "flex";
 			contentView.element.style["flex-flow"] = "column";
-			contentView.element.style["align-items"] = "center";
+			if (!contentView.element.style["align-items"])
+				contentView.element.style["align-items"] = "center";
 
 			var n:int = contentView.numElements;
 			if (n == 0) return false;
@@ -163,6 +164,8 @@ package org.apache.flex.html.beads.layouts
 				var child:UIBase = contentView.getElementAt(i) as UIBase;
 				child.element.style["flex-grow"] = (child == actualChild) ? "1" : "0";
 				child.element.style["flex-shrink"] = "0";
+				if (!isNaN(child.percentHeight))
+				    child.element.style["flex-basis"] = child.percentHeight.toString() + "%";
 			}
 
 			return true;
@@ -172,7 +175,7 @@ package org.apache.flex.html.beads.layouts
 		override public function layout():Boolean
 		{
 			var contentView:ILayoutView = layoutView;
-			var actualChild:IUIBase = document.hasOwnProperty(flexibleChild) ? document[flexibleChild] : null;
+			actualChild = document.hasOwnProperty(flexibleChild) ? document[flexibleChild] : null;
 
 			var n:Number = contentView.numElements;
 			if (n == 0) return false;
@@ -226,12 +229,19 @@ package org.apache.flex.html.beads.layouts
 				childXpos = xpos + margins.left; // default x position
 
 				childWidth = child.width;
-				if (ilc != null && !isNaN(ilc.percentWidth)) {
-					childWidth = hostWidth * ilc.percentWidth/100.0;
+				if (ilc != null)
+				{
+					if (!isNaN(ilc.percentWidth)) {
+						childWidth = hostWidth * ilc.percentWidth/100.0;
+					}
+					else if (isNaN(ilc.explicitWidth)) {
+						childWidth = hostWidth;
+					}
 					ilc.setWidth(childWidth);
 				}
-				// the following code middle-aligns the child
-				childXpos = hostWidth/2 - childWidth/2 + xpos;
+                var align:String = ValuesManager.valuesImpl.getValue(host, "alignItems");
+				if (align == "center")
+					childXpos = hostWidth/2 - childWidth/2 + xpos;
 
 				if (ilc) {
 					ilc.setX(childXpos);
@@ -265,12 +275,19 @@ package org.apache.flex.html.beads.layouts
 				childXpos = xpos + margins.left; // default x position
 
 				childWidth = child.width;
-				if (ilc != null && !isNaN(ilc.percentWidth)) {
-					childWidth = hostWidth * ilc.percentWidth/100.0;
+				if (ilc != null)
+				{
+					if (!isNaN(ilc.percentWidth)) {
+						childWidth = hostWidth * ilc.percentWidth/100.0;
+					}
+					else if (isNaN(ilc.explicitWidth)) {
+						childWidth = hostWidth;
+					}
 					ilc.setWidth(childWidth);
 				}
-				// the following code middle-aligns the child
-				childXpos = hostWidth/2 - childWidth/2 + xpos;
+                align = ValuesManager.valuesImpl.getValue(host, "alignItems");
+				if (align == "center")
+					childXpos = hostWidth/2 - childWidth/2 + xpos;
 
 				if (ilc) {
 					if (!isNaN(ilc.percentHeight)) {
@@ -297,14 +314,21 @@ package org.apache.flex.html.beads.layouts
 				margins = childMargins(actualChild, hostWidth, hostHeight);
 				ilc = actualChild as ILayoutChild;
 				childWidth = actualChild.width;
-				if (ilc != null && !isNaN(ilc.percentWidth)) {
-					childWidth = hostWidth * ilc.percentWidth/100.0;
+				if (ilc != null)
+				{
+					if (!isNaN(ilc.percentWidth)) {
+						childWidth = hostWidth * ilc.percentWidth/100.0;
+					}
+					else if (isNaN(ilc.explicitWidth)) {
+						childWidth = hostWidth;
+					}
 					ilc.setWidth(childWidth);
 				}
 				childXpos = xpos + margins.left;
-				if (!hostSizedToContent) {
+                align = ValuesManager.valuesImpl.getValue(host, "alignItems");
+				if (align == "center")
 					childXpos = hostWidth/2 - childWidth/2 + xpos;
-				}
+					
 				actualChild.x = childXpos
 				actualChild.y = adjustTop + margins.top;
 				if (ilc) {

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/646d01d3/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/VerticalFlexLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/VerticalFlexLayout.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/VerticalFlexLayout.as
index 6dd6a3c..0b845b5 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/VerticalFlexLayout.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/VerticalFlexLayout.as
@@ -254,6 +254,8 @@ package org.apache.flex.html.beads.layouts
 
 					if (grow >= 0) child.element.style["flex-grow"] = String(grow);
 					if (shrink >= 0) child.element.style["flex-shrink"] = String(shrink);
+					if (!isNaN(child.percentHeight))
+						child.element.style["flex-basis"] = child.percentHeight.toString() + "%";
 					child.dispatchEvent(new Event("layoutNeeded"));
 				}
 


[06/13] git commit: [flex-asjs] [refs/heads/release0.8.0] - get ASDoc working on both SWF and JS. Needed to tickle layout more often for SWF.

Posted by ah...@apache.org.
get ASDoc working on both SWF and JS.  Needed to tickle layout more often for SWF.


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

Branch: refs/heads/release0.8.0
Commit: c505d67c22d51ca95bfd758f5a04742a2657bd2f
Parents: d550f67
Author: Alex Harui <ah...@apache.org>
Authored: Sun May 21 23:39:14 2017 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue May 23 00:15:56 2017 -0700

----------------------------------------------------------------------
 .../ASDoc/src/main/flex/ASDocMainView.mxml      | 81 ++++++++++----------
 1 file changed, 42 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c505d67c/examples/flexjs/ASDoc/src/main/flex/ASDocMainView.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/ASDoc/src/main/flex/ASDocMainView.mxml b/examples/flexjs/ASDoc/src/main/flex/ASDocMainView.mxml
index e7dde44..cd5a978 100644
--- a/examples/flexjs/ASDoc/src/main/flex/ASDocMainView.mxml
+++ b/examples/flexjs/ASDoc/src/main/flex/ASDocMainView.mxml
@@ -19,7 +19,8 @@ limitations under the License.
 -->
 <js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
 				xmlns:js="library://ns.apache.org/flexjs/basic"
-			    width="100%" height="100%">
+			    width="100%" height="100%"
+			    >
     <fx:Script>
         <![CDATA[
 			import models.ASDocModel;
@@ -33,7 +34,7 @@ limitations under the License.
                 currentPackage = packageList.selectedItem as String;
                 dispatchEvent(new Event("packageChanged"));
             }
-            
+                        
             public var currentClass:String;
             
             private function classChangedHandler():void
@@ -51,7 +52,7 @@ limitations under the License.
             {
                 dispatchEvent(new DetailEvent(viewBeads.selected ? "addTag" : "removeTag", false, false, "viewbead"));
             }
-                                    
+            
 		]]>
     </fx:Script>
 	<fx:Style>
@@ -60,54 +61,56 @@ limitations under the License.
         <js:ViewDataBinding />
         <js:OneFlexibleChildVerticalLayout flexibleChild="topContainer" />                
     </js:beads>
-    <js:Container width="100%">
+    <js:Group width="100%" id="titleGroup">
         <js:beads>
             <js:FlexibleFirstChildHorizontalLayout/>
         </js:beads>
         <js:Label text="FlexJS ActionScript Library Reference" height="30" style="fontSize:20"/>
         <js:CheckBox id="topLevel" text="Top-Level" click="showTopLevel()" />
         <js:CheckBox id="viewBeads" text="View Bead" click="showViewBeads()" />
-    </js:Container>
-    <js:Container className="topContainer" id="topContainer" width="100%">
+    </js:Group>
+    <js:Group width="100%" className="topContainer" id="topContainer" style="align-items: start">
         <js:beads>
-            <js:OneFlexibleChildHorizontalLayout flexibleChild="rightSide" />
+            <js:OneFlexibleChildHorizontalLayoutLockChildHeight flexibleChild="rightSide" />
+            <js:LayoutChangeNotifier watchedProperty="{ASDocModel(applicationModel).packageList}" initialValue="null" />
         </js:beads>
-        <js:Container width="300" height="100%" className="leftSide">
+        <js:Group width="300" className="leftSide" id="leftSide">
             <js:beads>
-                <js:VerticalLayout />
+                <js:VerticalFlexLayout />
             </js:beads>
-            <js:Container className="packages" height="50%" width="100%">
-                <js:List id="packageList" dataProvider="{ASDocModel(applicationModel).packageList}" change="packageChangedHandler()" width="100%" height="100%"/>
-            </js:Container>
-            <js:Container className="classes" height="50%" width="100%">
-                <js:List id="classList" dataProvider="{ASDocModel(applicationModel).classList}" change="classChangedHandler()"  width="100%" height="100%"/>
-            </js:Container>
-        </js:Container>
-        <js:Container className="rightSide" id="rightSide" style="verticalAlign:top" height="100%">
+            <js:List id="packageList" dataProvider="{ASDocModel(applicationModel).packageList}" change="packageChangedHandler()" width="100%" height="50%" style="flex-grow: '1';flex-shrink: '1'"/>
+            <js:List id="classList" dataProvider="{ASDocModel(applicationModel).classList}" change="classChangedHandler()"  width="100%" height="50%" style="flex-grow: '1';flex-shrink: '1'"/>
+        </js:Group>
+        <js:Container className="rightSide" id="rightSide" style="align-items: start">
             <js:beads>
-                <js:VerticalLayout />
+                <js:OneFlexibleChildVerticalLayoutLockChildWidth flexibleChild="detailsPane" />
                 <js:ScrollingViewport />
             </js:beads>
-            <js:Label id="packageName"  text="{ASDocModel(applicationModel).currentPackage}" width="100%"/>
-            <js:Label id="baseName" text="{ASDocModel(applicationModel).currentClass}" width="100%" style="fontSize:20"/>
-            <js:Label id="inheritance" text="{ASDocModel(applicationModel).inheritance}" width="100%"/>
-            <js:MultilineLabel id="attributes" text="{ASDocModel(applicationModel).attributes}" width="100%"/>
-            <js:MultilineLabel id="description" text="{ASDocModel(applicationModel).description}" width="100%"/>
-            <js:Label text="Public Properties" />
-            <js:List id="publicPropertyList" dataProvider="{ASDocModel(applicationModel).publicProperties}"
-                     itemRenderer="SummaryRenderer" width="100%"/>
-            <js:Label text="Public Methods" />
-            <js:List id="publicMethodList" dataProvider="{ASDocModel(applicationModel).publicMethods}" 
-                     itemRenderer="SummaryRenderer" width="100%"/>
-            <js:Label text="Property Details" />
-            <js:DataContainer id="propertyDetails" dataProvider="{ASDocModel(applicationModel).publicProperties}" 
-                              itemRenderer="DetailRenderer" width="100%"/>
-            <js:Label text="Constructor Details" />
-            <js:DataContainer id="constructorDetails" dataProvider="{ASDocModel(applicationModel).constructorList}" 
-                              itemRenderer="DetailRenderer" width="100%"/>
-            <js:Label text="Method Details" />
-            <js:DataContainer id="MethodDetails" dataProvider="{ASDocModel(applicationModel).publicMethods}" 
-                              itemRenderer="DetailRenderer" width="100%"/>
+            <js:Group id="detailsPane">
+	            <js:beads>
+	                <js:VerticalFlexLayout />
+	            </js:beads>
+	            <js:Label id="packageName"  text="{ASDocModel(applicationModel).currentPackage}" width="100%"/>
+	            <js:Label id="baseName" text="{ASDocModel(applicationModel).currentClass}" width="100%" style="fontSize:20"/>
+	            <js:Label id="inheritance" text="{ASDocModel(applicationModel).inheritance}" width="100%"/>
+	            <js:MultilineLabel id="attributes" text="{ASDocModel(applicationModel).attributes}" width="100%"/>
+	            <js:MultilineLabel id="description" text="{ASDocModel(applicationModel).description}" width="100%"/>
+	            <js:Label text="Public Properties" />
+	            <js:List id="publicPropertyList" dataProvider="{ASDocModel(applicationModel).publicProperties}"
+	                     itemRenderer="SummaryRenderer" width="100%"/>
+	            <js:Label text="Public Methods" />
+	            <js:List id="publicMethodList" dataProvider="{ASDocModel(applicationModel).publicMethods}" 
+	                     itemRenderer="SummaryRenderer" width="100%"/>
+	            <js:Label text="Property Details" />
+	            <js:DataContainer id="propertyDetails" dataProvider="{ASDocModel(applicationModel).publicProperties}" 
+	                              itemRenderer="DetailRenderer" width="100%"/>
+	            <js:Label text="Constructor Details" />
+	            <js:DataContainer id="constructorDetails" dataProvider="{ASDocModel(applicationModel).constructorList}" 
+	                              itemRenderer="DetailRenderer" width="100%"/>
+	            <js:Label text="Method Details" />
+	            <js:DataContainer id="MethodDetails" dataProvider="{ASDocModel(applicationModel).publicMethods}" 
+	                              itemRenderer="DetailRenderer" width="100%"/>
+	        </js:Group>
         </js:Container>
-    </js:Container>	
+    </js:Group>	
 </js:View>


[13/13] git commit: [flex-asjs] [refs/heads/release0.8.0] - overflow layouts should watch parent container for changes. In overflow layouts the parent may not ask the child to re-layout since the child's size may not change since we set it to cause over

Posted by ah...@apache.org.
overflow layouts should watch parent container for changes.  In overflow layouts the parent may not ask the child to re-layout since the child's size may not change since we set it to cause overflow


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

Branch: refs/heads/release0.8.0
Commit: 1e450bb751e1dad52605a10909e0954a20ffb565
Parents: f05a94f
Author: Alex Harui <ah...@apache.org>
Authored: Tue May 23 00:15:48 2017 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue May 23 00:15:57 2017 -0700

----------------------------------------------------------------------
 ...eFlexibleChildHorizontalLayoutForOverflow.as | 19 ++++++++++++++++++-
 ...OneFlexibleChildVerticalLayoutForOverflow.as | 20 +++++++++++++++++++-
 2 files changed, 37 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1e450bb7/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayoutForOverflow.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayoutForOverflow.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayoutForOverflow.as
index c6abc22..027f2ee 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayoutForOverflow.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayoutForOverflow.as
@@ -30,6 +30,7 @@ package org.apache.flex.html.beads.layouts
 	import org.apache.flex.core.ValuesManager;
 	import org.apache.flex.core.UIBase;
 	import org.apache.flex.events.Event;
+	import org.apache.flex.events.IEventDispatcher;
 	import org.apache.flex.geom.Rectangle;
 	import org.apache.flex.utils.CSSContainerUtils;
 	import org.apache.flex.utils.CSSUtils;
@@ -64,7 +65,23 @@ package org.apache.flex.html.beads.layouts
 		{
 			super();
 		}
+		
+        /**
+         *  @flexjsignorecoercion org.apache.flex.events.IEventDispatcher;
+         */
+		COMPILE::JS
+		override public function set strand(value:IStrand):void
+		{
+			super.strand = value;
+			(host.parent as IEventDispatcher).addEventListener("sizeChanged", parentSizeChangedHandler);
+		}
 
+		COMPILE::JS
+		private function parentSizeChangedHandler(event:Event):void
+		{
+			performLayout();	
+		}
+		
         private var _flexibleChild:String;
 
         protected var actualChild:ILayoutChild;
@@ -115,7 +132,7 @@ package org.apache.flex.html.beads.layouts
 					child.element.style["display"] = "inline-block";
 			}
 
-			var w:Number = host.width;
+			var w:Number = host.width - 1;
 			for(i=0; i < n; i++) {
 				child = contentView.getElementAt(i) as UIBase;
 				if (child != actualChild)

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1e450bb7/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayoutForOverflow.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayoutForOverflow.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayoutForOverflow.as
index 5679f80..f9f0b1d 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayoutForOverflow.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayoutForOverflow.as
@@ -31,6 +31,7 @@ package org.apache.flex.html.beads.layouts
 	import org.apache.flex.core.ValuesManager;
 	import org.apache.flex.core.UIBase;
 	import org.apache.flex.events.Event;
+	import org.apache.flex.events.IEventDispatcher;
 	import org.apache.flex.geom.Rectangle;
 	import org.apache.flex.utils.CSSContainerUtils;
 	import org.apache.flex.utils.CSSUtils;
@@ -66,6 +67,23 @@ package org.apache.flex.html.beads.layouts
 			super();
 		}
 
+	
+        /**
+         *  @flexjsignorecoercion org.apache.flex.events.IEventDispatcher;
+         */
+		COMPILE::JS
+		override public function set strand(value:IStrand):void
+		{
+			super.strand = value;
+			(host.parent as IEventDispatcher).addEventListener("sizeChanged", parentSizeChangedHandler);
+		}
+
+		COMPILE::JS
+		private function parentSizeChangedHandler(event:Event):void
+		{
+			performLayout();	
+		}
+
         private var _flexibleChild:String;
 
         protected var actualChild:ILayoutChild;
@@ -116,7 +134,7 @@ package org.apache.flex.html.beads.layouts
 					child.element.style["display"] = "block";
 			}
 
-			var h:Number = host.height;
+			var h:Number = host.height - 1;
 			for(i=0; i < n; i++) {
 				child = contentView.getElementAt(i) as UIBase;
 				if (child != actualChild)


Re: [07/13] git commit: [flex-asjs] [refs/heads/release0.8.0] - give up on trying to use FlexBox for full-screen 3-pane views. FlexBox seems more happy stretching to content size instead of clipping at the computed flex-ed size. These custom layouts will d

Posted by yishayw <yi...@hotmail.com>.
Here's a test app [1] that demonstrates it.

[1] https://paste.apache.org/i5Ui




--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/Re-07-13-git-commit-flex-asjs-refs-heads-release0-8-0-give-up-on-trying-to-use-FlexBox-for-full-scred-tp63598p63599.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [07/13] git commit: [flex-asjs] [refs/heads/release0.8.0] - give up on trying to use FlexBox for full-screen 3-pane views. FlexBox seems more happy stretching to content size instead of clipping at the computed flex-ed size. These custom layouts wi...

Posted by Alex Harui <ah...@adobe.com.INVALID>.
If I understand the problem (which I'm not sure, since the fix you posted
runs code if not Safari), you could create a
OneFlexibleChildLayoutWithSafariXSupport and put your fixes with browser
sniffing in there.  That way folks who don't need it, don't pay for the
sniffing.  There might be a version of Safari some day that behaves like
the other browsers.

My 2 cents,
-Alex

On 9/26/17, 1:25 PM, "Harbs" <ha...@gmail.com> wrote:

>I’m showing how to fix the “non-ForOverflow” layouts.
>
>The problem is that Safari handles flex layouts differently than other
>browsers.
>
>I’d like to use the flexbox layouts and AFAICT, they need browser
>sniffing to work across the board. Ideally, the browser sniffing should
>be included in the layout itself, but I was not sure the best way to do
>that…
>
>> On Sep 26, 2017, at 11:02 PM, Alex Harui <ah...@adobe.com.INVALID>
>>wrote:
>> 
>> I'm not sure if you have the exact same problem as ASDoc, but the ASDoc
>> example is working fine with the "ForOverflow" layouts and no extra code
>> in the app.  Or are you saying ASDoc isn't working for you on some
>>browser?
>> 
>> IMO, that's the whole point of having many different flavors of layouts.
>> Folks can try different ones until they find one that works.  No need to
>> add custom code 3 places in the app.  Fixes for quirks get encapsulated
>> into a PAYG variant of a base component.
>> 
>> My 2 cents,
>> -Alex
>> 
>> On 9/26/17, 12:56 PM, "Harbs" <ha...@gmail.com> wrote:
>> 
>>> I ran into the Safari problem in my app.
>>> 
>>> I needed to add code like this:
>>> 
>>> var info:BrowserInfo = BrowserInfo.current();
>>> if(info.browser != "Safari" && info.formFactor.indexOf("iP") == -1){
>>> 	outerContainer.percentHeight = 100;
>>> 	leftResizeThumb.percentHeight = 100;
>>> }
>>> 
>>> The components look something like this:
>>> 
>>> 		<js:Container x="0" y="40" width="100%" id="dockAndOuterContainer"
>>> height="0%" style="align-items:stretch">
>>> 			<js:beads>
>>> 				<js:OneFlexibleChildHorizontalLayout
>>>flexibleChild="outerContainer"/>
>>> 			</js:beads>
>>> 			<components:LeftDock id="leftDock"/>
>>> 			<js:Group visible="false" id="leftResizeThumb">
>>> 			</js:Group>
>>> 			<js:Container id="outerContainer"/>
>>> 		</js:Container
>>> 
>>> Basically, all browsers except Safari and iOS browsers need to be set
>>>to
>>> 100%. Safari and iOS browsers CANNOT be set to 100%.
>>> 
>>> I’m not sure how to generalize this code…
>>> 
>>> I have it in three places in my app to make it behave correctly.
>>> 
>>> I’ve been meaning to bring up this issue on the dev@ list. Sorry I
>>>didn’t
>>> do it sooner… ;-)
>>> 
>>> Harbs
>>> 
>>>> On Sep 26, 2017, at 10:44 PM, Alex Harui <ah...@adobe.com.INVALID>
>>>> wrote:
>>>> 
>>>> I just reverted ASDoc back to the "ForOverflow" layouts.  ASDoc was
>>>>not
>>>> showing up correctly for me (Safari).  Maybe flex-basis is handled
>>>> differently on different browsers.  We can look into it more later.
>>>> 
>>>> Looking into this did make me glad we are changing over to "Royale" so
>>>> "Flex" and "FlexJS" will not be confused with FlexBox and the flex-xxx
>>>> attributes.
>>>> 
>>>> -Alex
>>>> 
>>>> On 7/31/17, 12:57 AM, "Harbs" <ha...@gmail.com> wrote:
>>>> 
>>>>> The only example I found was the ASDoc app.
>>>>> 
>>>>> I switched it and it appears to work. (I pushed my changes.)
>>>>> 
>>>>>> On Jul 31, 2017, at 7:35 AM, Alex Harui <ah...@adobe.com.INVALID>
>>>>>> wrote:
>>>>>> 
>>>>>> It will either work in the examples that use it or it won't.  Try it
>>>>>> and
>>>>>> find out.
>>>>>> 
>>>>>> -Alex
>>>>>> 
>>>>>> On 7/30/17, 3:04 AM, "Harbs" <ha...@gmail.com> wrote:
>>>>>> 
>>>>>>> I think I just ran into the same issue.
>>>>>>> 
>>>>>>> This layout seems to more-or-less do the job, but it’s kind of
>>>>>>>heavy.
>>>>>>> 
>>>>>>> I did some research into flexbox and it appear that setting
>>>>>>> flex-basis
>>>>>>> to
>>>>>>> 0 does the job. It needs to be set on ONLY the one flexible child.
>>>>>>> 
>>>>>>> Here’s a codepen which shows a use case.
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcod
>>>>>>>ep
>>>>>>> en
>>>>>>> .i
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>>o%2Fjpdevries%2Fpen%2FoXxPOP&data=02%7C01%7C%7C699bbb170b2c4f0bf3ae0
>>>>>>>8d
>>>>>>> 4d
>>>>>>> 73
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>>2638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C63637005881876651
>>>>>>>1&
>>>>>>> sd
>>>>>>> at
>>>>>>> a=tSTNYANFFiQ4DMGYbAZaz0dJ9qYDYpcwP2ZoSYRIcG8%3D&reserved=0
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>><https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fco
>>>>>>>de
>>>>>>> pe
>>>>>>> n.
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>>io%2Fjpdevries%2Fpen%2FoXxPOP&data=02%7C01%7C%7C699bbb170b2c4f0bf3ae
>>>>>>>08
>>>>>>> d4
>>>>>>> d7
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>>32638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6363700588187665
>>>>>>>11
>>>>>>> &s
>>>>>>> da
>>>>>>> ta=tSTNYANFFiQ4DMGYbAZaz0dJ9qYDYpcwP2ZoSYRIcG8%3D&reserved=0>
>>>>>>> 
>>>>>>> I noticed that the OneFlexibleLayouts have code which set the
>>>>>>> flex-basis
>>>>>>> of the children if a percentage value is set. When setting the size
>>>>>>> of
>>>>>>> the one flexible child to 0% this causes the flex-basis to be set
>>>>>>>to
>>>>>>> 0
>>>>>>> and then the one flexible child will fit the remaining space even
>>>>>>>if
>>>>>>> it
>>>>>>> might overflow because of its children.
>>>>>>> 
>>>>>>> I have wasted quite a bit of time before I discovered this. I’m not
>>>>>>> sure
>>>>>>> whether the OneFlexibleLayout classes should be changed, or maybe
>>>>>>>we
>>>>>>> need
>>>>>>> documentation that to fit content that might overflow, the
>>>>>>>percentage
>>>>>>> should be set to 0. It could be there are cases where the entire
>>>>>>> OnFlexibleLayout should be fit when smaller and expand (and not
>>>>>>> scroll)
>>>>>>> when bigger. In that case, the current behavior might be correct.
>>>>>>> 
>>>>>>> Thoughts?
>>>>>>> Harbs
>>>>>>> 
>>>>>>>> On May 23, 2017, at 10:16 AM, aharui@apache.org wrote:
>>>>>>>> 
>>>>>>>> give up on trying to use FlexBox for full-screen 3-pane views.
>>>>>>>> FlexBox
>>>>>>>> seems more happy stretching to content size instead of clipping at
>>>>>>>> the
>>>>>>>> computed flex-ed size.  These custom layouts will do the proper
>>>>>>>> sizing
>>>>>>>> 
>>>>>>>> 
>>>>>>>> Project: 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit
>>>>>>>>-w
>>>>>>>> ip
>>>>>>>> -u
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Frepo&data=02%7C01%7C%7C699
>>>>>>>>bb
>>>>>>>> b1
>>>>>>>> 70
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%
>>>>>>>>7C
>>>>>>>> 63
>>>>>>>> 63
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>70058818766511&sdata=P%2FMkfZAwCYwpQEoCe5UGx8tW0mZaIZsMdDg6VxlaKWA%
>>>>>>>>3D
>>>>>>>> &r
>>>>>>>> es
>>>>>>>> erved=0
>>>>>>>> Commit: 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit
>>>>>>>>-w
>>>>>>>> ip
>>>>>>>> -u
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fcommit%2Fbdd34d2e&data=02%
>>>>>>>>7C
>>>>>>>> 01
>>>>>>>> %7
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>C%7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178de
>>>>>>>>ce
>>>>>>>> e1
>>>>>>>> %7
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>C0%7C0%7C636370058818766511&sdata=QosBAau8lE4nCS7c%2F8B6GDc%2Bqa%2B
>>>>>>>>pS
>>>>>>>> ko
>>>>>>>> P5
>>>>>>>> 5x3oji5FnI%3D&reserved=0
>>>>>>>> Tree: 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit
>>>>>>>>-w
>>>>>>>> ip
>>>>>>>> -u
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Ftree%2Fbdd34d2e&data=02%7C
>>>>>>>>01
>>>>>>>> %7
>>>>>>>> C%
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178dece
>>>>>>>>e1
>>>>>>>> %7
>>>>>>>> C0
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>%7C0%7C636370058818766511&sdata=T4CCqwtn%2FgFTmAnaI%2BuCXqtX0P75ebp
>>>>>>>>KV
>>>>>>>> ZO
>>>>>>>> xf
>>>>>>>> XOTbIE%3D&reserved=0
>>>>>>>> Diff: 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit
>>>>>>>>-w
>>>>>>>> ip
>>>>>>>> -u
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fdiff%2Fbdd34d2e&data=02%7C
>>>>>>>>01
>>>>>>>> %7
>>>>>>>> C%
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178dece
>>>>>>>>e1
>>>>>>>> %7
>>>>>>>> C0
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>%7C0%7C636370058818766511&sdata=f8WVJXc81KrLMuUgRckULYCfglNL7d%2Bfd
>>>>>>>>jS
>>>>>>>> bB
>>>>>>>> BU
>>>>>>>> 0fRo%3D&reserved=0
>>>>>>>> 
>>>>>>>> Branch: refs/heads/release0.8.0
>>>>>>>> Commit: bdd34d2ef4d8117fa1b222ac470482a42dbea9eb
>>>>>>>> Parents: c505d67
>>>>>>>> Author: Alex Harui <ah...@apache.org>
>>>>>>>> Authored: Mon May 22 10:12:02 2017 -0700
>>>>>>>> Committer: Alex Harui <ah...@apache.org>
>>>>>>>> Committed: Tue May 23 00:15:56 2017 -0700
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>-------------------------------------------------------------------
>>>>>>>>--
>>>>>>>> -
>>>>>>>> ...eFlexibleChildHorizontalLayoutForOverflow.as | 290
>>>>>>>> ++++++++++++++++++
>>>>>>>> ...xibleChildHorizontalLayoutLockChildHeight.as |  91 ------
>>>>>>>> ...OneFlexibleChildVerticalLayoutForOverflow.as | 291
>>>>>>>> +++++++++++++++++++
>>>>>>>> ...FlexibleChildVerticalLayoutLockChildWidth.as |  93 ------
>>>>>>>> .../Basic/src/main/resources/basic-manifest.xml |   4 +-
>>>>>>>> 5 files changed, 583 insertions(+), 186 deletions(-)
>>>>>>>> 
>>>>>>>> 
>>>>>>>>-------------------------------------------------------------------
>>>>>>>>--
>>>>>>>> -
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit
>>>>>>>>-w
>>>>>>>> ip
>>>>>>>> -u
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2Fbdd34d2e%2Fframewor
>>>>>>>>ks
>>>>>>>> %2
>>>>>>>> Fp
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>rojects%2FBasic%2Fsrc%2Fmain%2Fflex%2Forg%2Fapache%2Fflex%2Fhtml%2F
>>>>>>>>be
>>>>>>>> ad
>>>>>>>> s%
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>2Flayouts%2FOneFlexibleChildHorizontalLayoutForOverflow.as&data=02%
>>>>>>>>7C
>>>>>>>> 01
>>>>>>>> %7
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>C%7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178de
>>>>>>>>ce
>>>>>>>> e1
>>>>>>>> %7
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>C0%7C0%7C636370058818766511&sdata=L7BjG%2BM7nTwguX%2BNaE5Op6BIT7XZr
>>>>>>>>Eq
>>>>>>>> KF
>>>>>>>> op
>>>>>>>> 0D%2Frc0Aw%3D&reserved=0
>>>>>>>> 
>>>>>>>> 
>>>>>>>>-------------------------------------------------------------------
>>>>>>>>--
>>>>>>>> -
>>>>>>>> diff --git
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/bead
>>>>>>>>s/
>>>>>>>> la
>>>>>>>> yo
>>>>>>>> uts/OneFlexibleChildHorizontalLayoutForOverflow.as
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/bead
>>>>>>>>s/
>>>>>>>> la
>>>>>>>> yo
>>>>>>>> uts/OneFlexibleChildHorizontalLayoutForOverflow.as
>>>>>>>> new file mode 100644
>>>>>>>> index 0000000..c6abc22
>>>>>>>> --- /dev/null
>>>>>>>> +++ 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/bead
>>>>>>>>s/
>>>>>>>> la
>>>>>>>> yo
>>>>>>>> uts/OneFlexibleChildHorizontalLayoutForOverflow.as
>>>>>>>> @@ -0,0 +1,290 @@
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>+//////////////////////////////////////////////////////////////////
>>>>>>>>//
>>>>>>>> //
>>>>>>>> //
>>>>>>>> ////////
>>>>>>>> +//
>>>>>>>> +//  Licensed to the Apache Software Foundation (ASF) under one or
>>>>>>>> more
>>>>>>>> +//  contributor license agreements.  See the NOTICE file
>>>>>>>> distributed
>>>>>>>> with
>>>>>>>> +//  this work for additional information regarding copyright
>>>>>>>> ownership.
>>>>>>>> +//  The ASF licenses this file to You under the Apache License,
>>>>>>>> Version 2.0
>>>>>>>> +//  (the "License"); you may not use this file except in
>>>>>>>>compliance
>>>>>>>> with
>>>>>>>> +//  the License.  You may obtain a copy of the License at
>>>>>>>> +//
>>>>>>>> +//      
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww
>>>>>>>>.a
>>>>>>>> pa
>>>>>>>> ch
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>e.org%2Flicenses%2FLICENSE-2.0&data=02%7C01%7C%7C699bbb170b2c4f0bf3
>>>>>>>>ae
>>>>>>>> 08
>>>>>>>> d4
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6363700588187
>>>>>>>>66
>>>>>>>> 51
>>>>>>>> 1&
>>>>>>>> sdata=bButr5xXaczhl741iZvjXub0l1B72d%2FvImajqD7mvyA%3D&reserved=0
>>>>>>>> +//
>>>>>>>> +//  Unless required by applicable law or agreed to in writing,
>>>>>>>> software
>>>>>>>> +//  distributed under the License is distributed on an "AS IS"
>>>>>>>> BASIS,
>>>>>>>> +//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
>>>>>>>>or
>>>>>>>> implied.
>>>>>>>> +//  See the License for the specific language governing
>>>>>>>>permissions
>>>>>>>> and
>>>>>>>> +//  limitations under the License.
>>>>>>>> +//
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>+//////////////////////////////////////////////////////////////////
>>>>>>>>//
>>>>>>>> //
>>>>>>>> //
>>>>>>>> ////////
>>>>>>>> +package org.apache.flex.html.beads.layouts
>>>>>>>> +{
>>>>>>>> +	import org.apache.flex.core.LayoutBase;
>>>>>>>> +	import org.apache.flex.core.IDocument;
>>>>>>>> +	import org.apache.flex.core.ILayoutChild;
>>>>>>>> +	import org.apache.flex.core.ILayoutHost;
>>>>>>>> +	import org.apache.flex.core.ILayoutView;
>>>>>>>> +	import org.apache.flex.core.ILayoutParent;
>>>>>>>> +	import org.apache.flex.core.IParentIUIBase;
>>>>>>>> +	import org.apache.flex.core.IStrand;
>>>>>>>> +	import org.apache.flex.core.IUIBase;
>>>>>>>> +	import org.apache.flex.core.ValuesManager;
>>>>>>>> +	import org.apache.flex.core.UIBase;
>>>>>>>> +	import org.apache.flex.events.Event;
>>>>>>>> +	import org.apache.flex.geom.Rectangle;
>>>>>>>> +	import org.apache.flex.utils.CSSContainerUtils;
>>>>>>>> +	import org.apache.flex.utils.CSSUtils;
>>>>>>>> +
>>>>>>>> +    /**
>>>>>>>> +     *  The OneFlexibleChildHorizontalLayoutForOverflowis
>>>>>>>> +	 *  intended for building apps that clip
>>>>>>>> +	 *  and/or scroll the overflow, especially in a
>>>>>>>> +	 *  3-pane view like the ASDoc examples.  It does not use
>>>>>>>> +	 *  FlexBox because FlexBox wants to grow to the size
>>>>>>>> +	 *  of the content without specifying width/height on
>>>>>>>> +	 *  the flexible child.  But then the children in
>>>>>>>> +	 *  the flexible child cannot use % sizing.
>>>>>>>> +	 *  This layout presumes the parent is a known size.
>>>>>>>> +	 *
>>>>>>>> +     *  @langversion 3.0
>>>>>>>> +     *  @playerversion Flash 10.2
>>>>>>>> +     *  @playerversion AIR 2.6
>>>>>>>> +     *  @productversion FlexJS 0.0
>>>>>>>> +     */
>>>>>>>> +	public class OneFlexibleChildHorizontalLayoutForOverflow extends
>>>>>>>> LayoutBase implements IOneFlexibleChildLayout, IDocument
>>>>>>>> +	{
>>>>>>>> +        /**
>>>>>>>> +         *  Constructor.
>>>>>>>> +         *
>>>>>>>> +         *  @langversion 3.0
>>>>>>>> +         *  @playerversion Flash 10.2
>>>>>>>> +         *  @playerversion AIR 2.6
>>>>>>>> +         *  @productversion FlexJS 0.0
>>>>>>>> +         */
>>>>>>>> +		public function OneFlexibleChildHorizontalLayoutForOverflow()
>>>>>>>> +		{
>>>>>>>> +			super();
>>>>>>>> +		}
>>>>>>>> +
>>>>>>>> +        private var _flexibleChild:String;
>>>>>>>> +
>>>>>>>> +        protected var actualChild:ILayoutChild;
>>>>>>>> +
>>>>>>>> +        /**
>>>>>>>> +         *  @private
>>>>>>>> +         *  The document.
>>>>>>>> +         */
>>>>>>>> +        private var document:Object;
>>>>>>>> +
>>>>>>>> +		/**
>>>>>>>> +		 *  The id of the flexible child
>>>>>>>> +		 *
>>>>>>>> +		 *  @langversion 3.0
>>>>>>>> +		 *  @playerversion Flash 10.2
>>>>>>>> +		 *  @playerversion AIR 2.6
>>>>>>>> +		 *  @productversion FlexJS 0.0
>>>>>>>> +		 */
>>>>>>>> +		public function get flexibleChild():String
>>>>>>>> +		{
>>>>>>>> +			return _flexibleChild;
>>>>>>>> +		}
>>>>>>>> +
>>>>>>>> +		/**
>>>>>>>> +		 * @private
>>>>>>>> +		 */
>>>>>>>> +		public function set flexibleChild(value:String):void
>>>>>>>> +		{
>>>>>>>> +			_flexibleChild = value;
>>>>>>>> +		}
>>>>>>>> +
>>>>>>>> +        /**
>>>>>>>> +         * @copy org.apache.flex.core.IBeadLayout#layout
>>>>>>>> +         */
>>>>>>>> +		COMPILE::JS
>>>>>>>> +		override public function layout():Boolean
>>>>>>>> +		{
>>>>>>>> +			var contentView:ILayoutView = layoutView;
>>>>>>>> +
>>>>>>>> +			actualChild = document[flexibleChild];
>>>>>>>> +
>>>>>>>> +			var n:int = contentView.numElements;
>>>>>>>> +			if (n == 0) return false;
>>>>>>>> +
>>>>>>>> +			for(var i:int=0; i < n; i++) {
>>>>>>>> +				var child:UIBase = contentView.getElementAt(i) as UIBase;
>>>>>>>> +				if (child.element.style["display"] != "inline-flex" &&
>>>>>>>> child.element.style["display"] != "none")
>>>>>>>> +					child.element.style["display"] = "inline-block";
>>>>>>>> +			}
>>>>>>>> +
>>>>>>>> +			var w:Number = host.width;
>>>>>>>> +			for(i=0; i < n; i++) {
>>>>>>>> +				child = contentView.getElementAt(i) as UIBase;
>>>>>>>> +				if (child != actualChild)
>>>>>>>> +					w -= child.width;
>>>>>>>> +			}
>>>>>>>> +			actualChild.width = w;
>>>>>>>> +					
>>>>>>>> +			return true;
>>>>>>>> +		}
>>>>>>>> +
>>>>>>>> +		COMPILE::SWF
>>>>>>>> +		override public function layout():Boolean
>>>>>>>> +		{
>>>>>>>> +			var contentView:ILayoutView = layoutView;
>>>>>>>> +			actualChild = document.hasOwnProperty(flexibleChild) ?
>>>>>>>> document[flexibleChild] : null;
>>>>>>>> +
>>>>>>>> +			var n:Number = contentView.numElements;
>>>>>>>> +			if (n == 0) return false;
>>>>>>>> +			
>>>>>>>> +			var maxWidth:Number = 0;
>>>>>>>> +			var maxHeight:Number = 0;
>>>>>>>> +			var hostSizedToContent:Boolean =
>>>>>>>>host.isHeightSizedToContent();
>>>>>>>> +			var hostWidth:Number = host.width;
>>>>>>>> +			var hostHeight:Number = host.height;
>>>>>>>> +
>>>>>>>> +			var ilc:ILayoutChild;
>>>>>>>> +			var data:Object;
>>>>>>>> +			var canAdjust:Boolean = false;
>>>>>>>> +			var margins:Object;
>>>>>>>> +
>>>>>>>> +			var paddingMetrics:Rectangle =
>>>>>>>> CSSContainerUtils.getPaddingMetrics(host);
>>>>>>>> +			var borderMetrics:Rectangle =
>>>>>>>> CSSContainerUtils.getBorderMetrics(host);
>>>>>>>> +			
>>>>>>>> +			// adjust the host's usable size by the metrics. If
>>>>>>>> hostSizedToContent, then the
>>>>>>>> +			// resulting adjusted value may be less than zero.
>>>>>>>> +			hostWidth -= paddingMetrics.left + paddingMetrics.right +
>>>>>>>> borderMetrics.left + borderMetrics.right;
>>>>>>>> +			hostHeight -= paddingMetrics.top + paddingMetrics.bottom +
>>>>>>>> borderMetrics.top + borderMetrics.bottom;
>>>>>>>> +
>>>>>>>> +			var xpos:Number = borderMetrics.left + paddingMetrics.left;
>>>>>>>> +			var ypos:Number = borderMetrics.top + paddingMetrics.left;
>>>>>>>> +			var child:IUIBase;
>>>>>>>> +			var childHeight:Number;
>>>>>>>> +			var i:int;
>>>>>>>> +			var childYpos:Number;
>>>>>>>> +			var adjustLeft:Number = 0;
>>>>>>>> +			var adjustRight:Number = hostWidth + borderMetrics.left +
>>>>>>>> paddingMetrics.left;
>>>>>>>> +
>>>>>>>> +			// first work from left to right
>>>>>>>> +			for(i=0; i < n; i++)
>>>>>>>> +			{
>>>>>>>> +				child = contentView.getElementAt(i) as IUIBase;
>>>>>>>> +				if (child == null || !child.visible) continue;
>>>>>>>> +				if (child == actualChild) break;
>>>>>>>> +
>>>>>>>> +				margins = childMargins(child, hostWidth, hostHeight);
>>>>>>>> +				ilc = child as ILayoutChild;
>>>>>>>> +
>>>>>>>> +				xpos += margins.left;
>>>>>>>> +
>>>>>>>> +				childYpos = ypos + margins.top; // default y position
>>>>>>>> +
>>>>>>>> +				childHeight = child.height;
>>>>>>>> +				if (ilc != null)
>>>>>>>> +				{
>>>>>>>> +					if (!isNaN(ilc.percentHeight)) {
>>>>>>>> +						childHeight = host.height * ilc.percentHeight/100.0;
>>>>>>>> +					}
>>>>>>>> +					else if (isNaN(ilc.explicitHeight)) {
>>>>>>>> +						childHeight = host.height;
>>>>>>>> +					}
>>>>>>>> +					ilc.setHeight(childHeight);
>>>>>>>> +				}
>>>>>>>> +
>>>>>>>> +				if (ilc) {
>>>>>>>> +					ilc.setX(xpos);
>>>>>>>> +					ilc.setY(childYpos);
>>>>>>>> +
>>>>>>>> +					if (!isNaN(ilc.percentWidth)) {
>>>>>>>> +						ilc.setWidth(hostWidth * ilc.percentWidth / 100);
>>>>>>>> +					}
>>>>>>>> +
>>>>>>>> +				} else {
>>>>>>>> +					child.x = xpos;
>>>>>>>> +					child.y = childYpos;
>>>>>>>> +				}
>>>>>>>> +
>>>>>>>> +				xpos += child.width + margins.right;
>>>>>>>> +				adjustLeft = xpos;
>>>>>>>> +			}
>>>>>>>> +
>>>>>>>> +			// then work from right to left
>>>>>>>> +			xpos = hostWidth + borderMetrics.left + paddingMetrics.left;
>>>>>>>> +
>>>>>>>> +			for(i=(n-1); actualChild != null && i >= 0; i--)
>>>>>>>> +			{
>>>>>>>> +				child = contentView.getElementAt(i) as IUIBase;
>>>>>>>> +				if (child == null || !child.visible) continue;
>>>>>>>> +				if (child == actualChild) break;
>>>>>>>> +
>>>>>>>> +				margins = childMargins(child, hostWidth, hostHeight);
>>>>>>>> +				ilc = child as ILayoutChild;
>>>>>>>> +
>>>>>>>> +				childYpos = ypos + margins.top; // default y position
>>>>>>>> +
>>>>>>>> +				childHeight = child.height;
>>>>>>>> +				if (ilc != null)
>>>>>>>> +				{
>>>>>>>> +					if (!isNaN(ilc.percentHeight)) {
>>>>>>>> +						childHeight = host.height * ilc.percentHeight/100.0;
>>>>>>>> +					}
>>>>>>>> +					else if (isNaN(ilc.explicitHeight)) {
>>>>>>>> +						childHeight = host.height;
>>>>>>>> +					}
>>>>>>>> +					ilc.setHeight(childHeight);
>>>>>>>> +				}
>>>>>>>> +
>>>>>>>> +				if (ilc) {
>>>>>>>> +					if (!isNaN(ilc.percentWidth)) {
>>>>>>>> +						ilc.setWidth(hostWidth * ilc.percentWidth / 100);
>>>>>>>> +					}
>>>>>>>> +				}
>>>>>>>> +
>>>>>>>> +				xpos -= child.width + margins.right;
>>>>>>>> +
>>>>>>>> +				if (ilc) {
>>>>>>>> +					ilc.setX(xpos);
>>>>>>>> +					ilc.setY(childYpos);
>>>>>>>> +				} else {
>>>>>>>> +					child.x = xpos;
>>>>>>>> +					child.y = childYpos;
>>>>>>>> +				}
>>>>>>>> +
>>>>>>>> +				xpos -= margins.left;
>>>>>>>> +				adjustRight = xpos;
>>>>>>>> +			}
>>>>>>>> +
>>>>>>>> +			// now adjust the actualChild to fill the space.
>>>>>>>> +			if (actualChild != null) {
>>>>>>>> +				margins = childMargins(actualChild, hostWidth, hostHeight);
>>>>>>>> +				ilc = actualChild as ILayoutChild;
>>>>>>>> +				childHeight = actualChild.height;
>>>>>>>> +				if (ilc != null)
>>>>>>>> +				{
>>>>>>>> +					if (!isNaN(ilc.percentHeight)) {
>>>>>>>> +						childHeight = host.height * ilc.percentHeight/100.0;
>>>>>>>> +					}
>>>>>>>> +					else if (isNaN(ilc.explicitHeight)) {
>>>>>>>> +						childHeight = host.height;
>>>>>>>> +					}
>>>>>>>> +					ilc.setHeight(childHeight);
>>>>>>>> +				}
>>>>>>>> +				childYpos = ypos + margins.top;
>>>>>>>> +				actualChild.x = adjustLeft + margins.left;
>>>>>>>> +				actualChild.y = childYpos;
>>>>>>>> +				if (ilc) {
>>>>>>>> +					ilc.setWidth((adjustRight-margins.right) -
>>>>>>>> (adjustLeft+margins.left));
>>>>>>>> +				} else {
>>>>>>>> +					actualChild.width = (adjustRight-margins.right) -
>>>>>>>> (adjustLeft+margins.left);
>>>>>>>> +				}
>>>>>>>> +			}
>>>>>>>> +
>>>>>>>> +            return true;
>>>>>>>> +		}
>>>>>>>> +
>>>>>>>> +        public function setDocument(document:Object, id:String =
>>>>>>>> null):void
>>>>>>>> +        {
>>>>>>>> +            this.document = document;
>>>>>>>> +        }
>>>>>>>> +
>>>>>>>> +    }
>>>>>>>> +
>>>>>>>> +}
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit
>>>>>>>>-w
>>>>>>>> ip
>>>>>>>> -u
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2Fbdd34d2e%2Fframewor
>>>>>>>>ks
>>>>>>>> %2
>>>>>>>> Fp
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>rojects%2FBasic%2Fsrc%2Fmain%2Fflex%2Forg%2Fapache%2Fflex%2Fhtml%2F
>>>>>>>>be
>>>>>>>> ad
>>>>>>>> s%
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>2Flayouts%2FOneFlexibleChildHorizontalLayoutLockChildHeight.as&data
>>>>>>>>=0
>>>>>>>> 2%
>>>>>>>> 7C
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>01%7C%7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c1
>>>>>>>>78
>>>>>>>> de
>>>>>>>> ce
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>e1%7C0%7C0%7C636370058818766511&sdata=Ir1Siye21IUzzijpvWA1XmQN0AbHk
>>>>>>>>tL
>>>>>>>> u%
>>>>>>>> 2F
>>>>>>>> u3h%2BRtBZT0%3D&reserved=0
>>>>>>>> 
>>>>>>>> 
>>>>>>>>-------------------------------------------------------------------
>>>>>>>>--
>>>>>>>> -
>>>>>>>> diff --git
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/bead
>>>>>>>>s/
>>>>>>>> la
>>>>>>>> yo
>>>>>>>> uts/OneFlexibleChildHorizontalLayoutLockChildHeight.as
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/bead
>>>>>>>>s/
>>>>>>>> la
>>>>>>>> yo
>>>>>>>> uts/OneFlexibleChildHorizontalLayoutLockChildHeight.as
>>>>>>>> deleted file mode 100644
>>>>>>>> index d170d23..0000000
>>>>>>>> --- 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/bead
>>>>>>>>s/
>>>>>>>> la
>>>>>>>> yo
>>>>>>>> uts/OneFlexibleChildHorizontalLayoutLockChildHeight.as
>>>>>>>> +++ /dev/null
>>>>>>>> @@ -1,91 +0,0 @@
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>-//////////////////////////////////////////////////////////////////
>>>>>>>>//
>>>>>>>> //
>>>>>>>> //
>>>>>>>> ////////
>>>>>>>> -//
>>>>>>>> -//  Licensed to the Apache Software Foundation (ASF) under one or
>>>>>>>> more
>>>>>>>> -//  contributor license agreements.  See the NOTICE file
>>>>>>>> distributed
>>>>>>>> with
>>>>>>>> -//  this work for additional information regarding copyright
>>>>>>>> ownership.
>>>>>>>> -//  The ASF licenses this file to You under the Apache License,
>>>>>>>> Version 2.0
>>>>>>>> -//  (the "License"); you may not use this file except in
>>>>>>>>compliance
>>>>>>>> with
>>>>>>>> -//  the License.  You may obtain a copy of the License at
>>>>>>>> -//
>>>>>>>> -//      
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww
>>>>>>>>.a
>>>>>>>> pa
>>>>>>>> ch
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>e.org%2Flicenses%2FLICENSE-2.0&data=02%7C01%7C%7C699bbb170b2c4f0bf3
>>>>>>>>ae
>>>>>>>> 08
>>>>>>>> d4
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6363700588187
>>>>>>>>66
>>>>>>>> 51
>>>>>>>> 1&
>>>>>>>> sdata=bButr5xXaczhl741iZvjXub0l1B72d%2FvImajqD7mvyA%3D&reserved=0
>>>>>>>> -//
>>>>>>>> -//  Unless required by applicable law or agreed to in writing,
>>>>>>>> software
>>>>>>>> -//  distributed under the License is distributed on an "AS IS"
>>>>>>>> BASIS,
>>>>>>>> -//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
>>>>>>>>or
>>>>>>>> implied.
>>>>>>>> -//  See the License for the specific language governing
>>>>>>>>permissions
>>>>>>>> and
>>>>>>>> -//  limitations under the License.
>>>>>>>> -//
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>-//////////////////////////////////////////////////////////////////
>>>>>>>>//
>>>>>>>> //
>>>>>>>> //
>>>>>>>> ////////
>>>>>>>> -package org.apache.flex.html.beads.layouts
>>>>>>>> -{
>>>>>>>> -	import org.apache.flex.core.LayoutBase;
>>>>>>>> -	import org.apache.flex.core.IDocument;
>>>>>>>> -	import org.apache.flex.core.ILayoutChild;
>>>>>>>> -	import org.apache.flex.core.ILayoutHost;
>>>>>>>> -	import org.apache.flex.core.ILayoutView;
>>>>>>>> -	import org.apache.flex.core.ILayoutParent;
>>>>>>>> -	import org.apache.flex.core.IParentIUIBase;
>>>>>>>> -	import org.apache.flex.core.IStrand;
>>>>>>>> -	import org.apache.flex.core.IUIBase;
>>>>>>>> -	import org.apache.flex.core.ValuesManager;
>>>>>>>> -	import org.apache.flex.core.UIBase;
>>>>>>>> -	import org.apache.flex.events.Event;
>>>>>>>> -	import org.apache.flex.geom.Rectangle;
>>>>>>>> -	import org.apache.flex.utils.CSSContainerUtils;
>>>>>>>> -	import org.apache.flex.utils.CSSUtils;
>>>>>>>> -
>>>>>>>> -    /**
>>>>>>>> -     *  The OneFlexibleChildHorizontalLayoutLockChildHeight
>>>>>>>> -	 *  is a subclass of OneFlexibleChildHorizontalLayout
>>>>>>>> -	 *  that sets the flexible child's height to be the height
>>>>>>>> -	 *  of the host container.  This is useful when you
>>>>>>>> -	 *  don't want the actual child's height to dictate the
>>>>>>>> -	 *  height of the container in order to force
>>>>>>>> -	 *  scrollbars
>>>>>>>> -     *
>>>>>>>> -     *  @langversion 3.0
>>>>>>>> -     *  @playerversion Flash 10.2
>>>>>>>> -     *  @playerversion AIR 2.6
>>>>>>>> -     *  @productversion FlexJS 0.0
>>>>>>>> -     */
>>>>>>>> -	public class OneFlexibleChildHorizontalLayoutLockChildHeight
>>>>>>>> extends
>>>>>>>> OneFlexibleChildHorizontalLayout
>>>>>>>> -	{
>>>>>>>> -        /**
>>>>>>>> -         *  Constructor.
>>>>>>>> -         *
>>>>>>>> -         *  @langversion 3.0
>>>>>>>> -         *  @playerversion Flash 10.2
>>>>>>>> -         *  @playerversion AIR 2.6
>>>>>>>> -         *  @productversion FlexJS 0.0
>>>>>>>> -         */
>>>>>>>> -		public function
>>>>>>>>OneFlexibleChildHorizontalLayoutLockChildHeight()
>>>>>>>> -		{
>>>>>>>> -			super();
>>>>>>>> -		}
>>>>>>>> -
>>>>>>>> -        /**
>>>>>>>> -         * @copy org.apache.flex.core.IBeadLayout#layout
>>>>>>>> -         */
>>>>>>>> -		override public function layout():Boolean
>>>>>>>> -		{
>>>>>>>> -			var ret:Boolean = super.layout();
>>>>>>>> -			if (ret)
>>>>>>>> -			{
>>>>>>>> -				var contentView:ILayoutView = layoutView;
>>>>>>>> -	
>>>>>>>> -				var n:int = contentView.numElements;
>>>>>>>> -
>>>>>>>> -				var h:Number = host.height;
>>>>>>>> -				for(var i:int=0; i < n; i++) {
>>>>>>>> -					var child:UIBase = contentView.getElementAt(i) as UIBase;
>>>>>>>> -					if (child != actualChild)
>>>>>>>> -						h = child.height;
>>>>>>>> -				}
>>>>>>>> -				actualChild.setHeight(h);
>>>>>>>> -			}
>>>>>>>> -			return ret;
>>>>>>>> -		}
>>>>>>>> -
>>>>>>>> -    }
>>>>>>>> -
>>>>>>>> -}
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit
>>>>>>>>-w
>>>>>>>> ip
>>>>>>>> -u
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2Fbdd34d2e%2Fframewor
>>>>>>>>ks
>>>>>>>> %2
>>>>>>>> Fp
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>rojects%2FBasic%2Fsrc%2Fmain%2Fflex%2Forg%2Fapache%2Fflex%2Fhtml%2F
>>>>>>>>be
>>>>>>>> ad
>>>>>>>> s%
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>2Flayouts%2FOneFlexibleChildVerticalLayoutForOverflow.as&data=02%7C
>>>>>>>>01
>>>>>>>> %7
>>>>>>>> C%
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178dece
>>>>>>>>e1
>>>>>>>> %7
>>>>>>>> C0
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>%7C0%7C636370058818766511&sdata=WdJnx6IGbPwIxUibKB3UqfKTHgHugWIleqB
>>>>>>>>Vs
>>>>>>>> qJ
>>>>>>>> 5f
>>>>>>>> eE%3D&reserved=0
>>>>>>>> 
>>>>>>>> 
>>>>>>>>-------------------------------------------------------------------
>>>>>>>>--
>>>>>>>> -
>>>>>>>> diff --git
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/bead
>>>>>>>>s/
>>>>>>>> la
>>>>>>>> yo
>>>>>>>> uts/OneFlexibleChildVerticalLayoutForOverflow.as
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/bead
>>>>>>>>s/
>>>>>>>> la
>>>>>>>> yo
>>>>>>>> uts/OneFlexibleChildVerticalLayoutForOverflow.as
>>>>>>>> new file mode 100644
>>>>>>>> index 0000000..5679f80
>>>>>>>> --- /dev/null
>>>>>>>> +++ 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/bead
>>>>>>>>s/
>>>>>>>> la
>>>>>>>> yo
>>>>>>>> uts/OneFlexibleChildVerticalLayoutForOverflow.as
>>>>>>>> @@ -0,0 +1,291 @@
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>+//////////////////////////////////////////////////////////////////
>>>>>>>>//
>>>>>>>> //
>>>>>>>> //
>>>>>>>> ////////
>>>>>>>> +//
>>>>>>>> +//  Licensed to the Apache Software Foundation (ASF) under one or
>>>>>>>> more
>>>>>>>> +//  contributor license agreements.  See the NOTICE file
>>>>>>>> distributed
>>>>>>>> with
>>>>>>>> +//  this work for additional information regarding copyright
>>>>>>>> ownership.
>>>>>>>> +//  The ASF licenses this file to You under the Apache License,
>>>>>>>> Version 2.0
>>>>>>>> +//  (the "License"); you may not use this file except in
>>>>>>>>compliance
>>>>>>>> with
>>>>>>>> +//  the License.  You may obtain a copy of the License at
>>>>>>>> +//
>>>>>>>> +//      
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww
>>>>>>>>.a
>>>>>>>> pa
>>>>>>>> ch
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>e.org%2Flicenses%2FLICENSE-2.0&data=02%7C01%7C%7C699bbb170b2c4f0bf3
>>>>>>>>ae
>>>>>>>> 08
>>>>>>>> d4
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6363700588187
>>>>>>>>66
>>>>>>>> 51
>>>>>>>> 1&
>>>>>>>> sdata=bButr5xXaczhl741iZvjXub0l1B72d%2FvImajqD7mvyA%3D&reserved=0
>>>>>>>> +//
>>>>>>>> +//  Unless required by applicable law or agreed to in writing,
>>>>>>>> software
>>>>>>>> +//  distributed under the License is distributed on an "AS IS"
>>>>>>>> BASIS,
>>>>>>>> +//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 
>>>>>>>>or
>>>>>>>> implied.
>>>>>>>> +//  See the License for the specific language governing 
>>>>>>>>permissions
>>>>>>>> and
>>>>>>>> +//  limitations under the License.
>>>>>>>> +//
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>+//////////////////////////////////////////////////////////////////
>>>>>>>>//
>>>>>>>> //
>>>>>>>> //
>>>>>>>> ////////
>>>>>>>> +package org.apache.flex.html.beads.layouts
>>>>>>>> +{
>>>>>>>> +	import org.apache.flex.core.LayoutBase;
>>>>>>>> +	import org.apache.flex.core.IDocument;
>>>>>>>> +	import org.apache.flex.core.ILayoutChild;
>>>>>>>> +	import org.apache.flex.core.ILayoutHost;
>>>>>>>> +	import org.apache.flex.core.ILayoutView;
>>>>>>>> +	import org.apache.flex.core.ILayoutParent;
>>>>>>>> +	import org.apache.flex.core.IParentIUIBase;
>>>>>>>> +	import org.apache.flex.core.IStrand;
>>>>>>>> +	import org.apache.flex.core.IStyleableObject;
>>>>>>>> +	import org.apache.flex.core.IUIBase;
>>>>>>>> +	import org.apache.flex.core.ValuesManager;
>>>>>>>> +	import org.apache.flex.core.UIBase;
>>>>>>>> +	import org.apache.flex.events.Event;
>>>>>>>> +	import org.apache.flex.geom.Rectangle;
>>>>>>>> +	import org.apache.flex.utils.CSSContainerUtils;
>>>>>>>> +	import org.apache.flex.utils.CSSUtils;
>>>>>>>> +
>>>>>>>> +    /**
>>>>>>>> +     *  The OneFlexibleChildVerticalLayoutForOverflow is
>>>>>>>> +	 *  intended for building apps that clip
>>>>>>>> +	 *  and/or scroll the overflow, especially in a
>>>>>>>> +	 *  3-pane view like the ASDoc examples.  It does not use
>>>>>>>> +	 *  FlexBox because FlexBox wants to grow to the size
>>>>>>>> +	 *  of the content without specifying width/height on
>>>>>>>> +	 *  the flexible child.  But then the children in
>>>>>>>> +	 *  the flexible child cannot use % sizing.
>>>>>>>> +	 *  This layout presumes the parent is a known size.
>>>>>>>> +     *
>>>>>>>> +     *  @langversion 3.0
>>>>>>>> +     *  @playerversion Flash 10.2
>>>>>>>> +     *  @playerversion AIR 2.6
>>>>>>>> +     *  @productversion FlexJS 0.0
>>>>>>>> +     */
>>>>>>>> +	public class OneFlexibleChildVerticalLayoutForOverflow extends
>>>>>>>> LayoutBase implements IOneFlexibleChildLayout, IDocument
>>>>>>>> +	{
>>>>>>>> +        /**
>>>>>>>> +         *  Constructor.
>>>>>>>> +         *
>>>>>>>> +         *  @langversion 3.0
>>>>>>>> +         *  @playerversion Flash 10.2
>>>>>>>> +         *  @playerversion AIR 2.6
>>>>>>>> +         *  @productversion FlexJS 0.0
>>>>>>>> +         */
>>>>>>>> +		public function OneFlexibleChildVerticalLayoutForOverflow()
>>>>>>>> +		{
>>>>>>>> +			super();
>>>>>>>> +		}
>>>>>>>> +
>>>>>>>> +        private var _flexibleChild:String;
>>>>>>>> +
>>>>>>>> +        protected var actualChild:ILayoutChild;
>>>>>>>> +
>>>>>>>> +        /**
>>>>>>>> +         *  @private
>>>>>>>> +         *  The document.
>>>>>>>> +         */
>>>>>>>> +        private var document:Object;
>>>>>>>> +
>>>>>>>> +		/**
>>>>>>>> +		 *  The id of the flexible child
>>>>>>>> +		 *
>>>>>>>> +		 *  @langversion 3.0
>>>>>>>> +		 *  @playerversion Flash 10.2
>>>>>>>> +		 *  @playerversion AIR 2.6
>>>>>>>> +		 *  @productversion FlexJS 0.0
>>>>>>>> +		 */
>>>>>>>> +		public function get flexibleChild():String
>>>>>>>> +		{
>>>>>>>> +			return _flexibleChild;
>>>>>>>> +		}
>>>>>>>> +
>>>>>>>> +		/**
>>>>>>>> +		 * @private
>>>>>>>> +		 */
>>>>>>>> +		public function set flexibleChild(value:String):void
>>>>>>>> +		{
>>>>>>>> +			_flexibleChild = value;
>>>>>>>> +		}
>>>>>>>> +
>>>>>>>> +        /**
>>>>>>>> +         * @copy org.apache.flex.core.IBeadLayout#layout
>>>>>>>> +         */
>>>>>>>> +		COMPILE::JS
>>>>>>>> +		override public function layout():Boolean
>>>>>>>> +		{
>>>>>>>> +			var contentView:ILayoutView = layoutView;
>>>>>>>> +
>>>>>>>> +			actualChild = document[flexibleChild];
>>>>>>>> +
>>>>>>>> +			var n:int = contentView.numElements;
>>>>>>>> +			if (n == 0) return false;
>>>>>>>> +
>>>>>>>> +			for(var i:int=0; i < n; i++) {
>>>>>>>> +				var child:UIBase = contentView.getElementAt(i) as UIBase;
>>>>>>>> +				if (child.element.style["display"] != "flex" &&
>>>>>>>> child.element.style["display"] != "none")
>>>>>>>> +					child.element.style["display"] = "block";
>>>>>>>> +			}
>>>>>>>> +
>>>>>>>> +			var h:Number = host.height;
>>>>>>>> +			for(i=0; i < n; i++) {
>>>>>>>> +				child = contentView.getElementAt(i) as UIBase;
>>>>>>>> +				if (child != actualChild)
>>>>>>>> +					h -= child.height;
>>>>>>>> +			}
>>>>>>>> +			actualChild.height = h;
>>>>>>>> +					
>>>>>>>> +			return true;
>>>>>>>> +		}
>>>>>>>> +
>>>>>>>> +		COMPILE::SWF
>>>>>>>> +		override public function layout():Boolean
>>>>>>>> +		{
>>>>>>>> +			var contentView:ILayoutView = layoutView;
>>>>>>>> +			actualChild = document.hasOwnProperty(flexibleChild) ?
>>>>>>>> document[flexibleChild] : null;
>>>>>>>> +
>>>>>>>> +			var n:Number = contentView.numElements;
>>>>>>>> +			if (n == 0) return false;
>>>>>>>> +			
>>>>>>>> +			var maxWidth:Number = 0;
>>>>>>>> +			var maxHeight:Number = 0;
>>>>>>>> +			var hostSizedToContent:Boolean = host.isWidthSizedToContent();
>>>>>>>> +			var hostWidth:Number = host.width;
>>>>>>>> +			var hostHeight:Number = host.height;
>>>>>>>> +
>>>>>>>> +			var ilc:ILayoutChild;
>>>>>>>> +			var data:Object;
>>>>>>>> +			var canAdjust:Boolean = false;
>>>>>>>> +			var margins:Object;
>>>>>>>> +
>>>>>>>> +			var paddingMetrics:Rectangle =
>>>>>>>> CSSContainerUtils.getPaddingMetrics(host);
>>>>>>>> +			var borderMetrics:Rectangle =
>>>>>>>> CSSContainerUtils.getBorderMetrics(host);
>>>>>>>> +			
>>>>>>>> +			// adjust the host's usable size by the metrics. If
>>>>>>>> hostSizedToContent, then the
>>>>>>>> +			// resulting adjusted value may be less than zero.
>>>>>>>> +			hostWidth -= paddingMetrics.left + paddingMetrics.right +
>>>>>>>> borderMetrics.left + borderMetrics.right;
>>>>>>>> +			hostHeight -= paddingMetrics.top + paddingMetrics.bottom +
>>>>>>>> borderMetrics.top + borderMetrics.bottom;
>>>>>>>> +
>>>>>>>> +			var xpos:Number = borderMetrics.left + paddingMetrics.left;
>>>>>>>> +			var ypos:Number = borderMetrics.top + paddingMetrics.left;
>>>>>>>> +			var child:IUIBase;
>>>>>>>> +			var childWidth:Number;
>>>>>>>> +			var i:int;
>>>>>>>> +			var childXpos:Number;
>>>>>>>> +			var adjustTop:Number = 0;
>>>>>>>> +			var adjustBottom:Number = hostHeight + borderMetrics.top +
>>>>>>>> paddingMetrics.top;
>>>>>>>> +
>>>>>>>> +			// first work from top to bottom
>>>>>>>> +			for(i=0; i < n; i++)
>>>>>>>> +			{
>>>>>>>> +				child = contentView.getElementAt(i) as IUIBase;
>>>>>>>> +				if (child == null || !child.visible) continue;
>>>>>>>> +				if (child == actualChild) break;
>>>>>>>> +
>>>>>>>> +				margins = childMargins(child, hostWidth, hostHeight);
>>>>>>>> +				ilc = child as ILayoutChild;
>>>>>>>> +
>>>>>>>> +				ypos += margins.top;
>>>>>>>> +
>>>>>>>> +				childXpos = xpos + margins.left; // default x position
>>>>>>>> +
>>>>>>>> +				childWidth = child.width;
>>>>>>>> +				if (ilc != null)
>>>>>>>> +				{
>>>>>>>> +					if (!isNaN(ilc.percentWidth)) {
>>>>>>>> +						childWidth = hostWidth * ilc.percentWidth/100.0;
>>>>>>>> +					}
>>>>>>>> +					else if (isNaN(ilc.explicitWidth)) {
>>>>>>>> +						childWidth = hostWidth;
>>>>>>>> +					}
>>>>>>>> +					ilc.setWidth(childWidth);
>>>>>>>> +				}
>>>>>>>> +
>>>>>>>> +				if (ilc) {
>>>>>>>> +					ilc.setX(childXpos);
>>>>>>>> +					ilc.setY(ypos);
>>>>>>>> +
>>>>>>>> +					if (!isNaN(ilc.percentHeight)) {
>>>>>>>> +						ilc.setHeight(hostHeight * ilc.percentHeight / 100);
>>>>>>>> +					}
>>>>>>>> +
>>>>>>>> +				} else {
>>>>>>>> +					child.x = childXpos;
>>>>>>>> +					child.y = ypos;
>>>>>>>> +				}
>>>>>>>> +
>>>>>>>> +				ypos += child.height + margins.bottom;
>>>>>>>> +				adjustTop = ypos;
>>>>>>>> +			}
>>>>>>>> +
>>>>>>>> +			// then work from bottom to top
>>>>>>>> +			ypos = hostHeight + borderMetrics.top + paddingMetrics.top;
>>>>>>>> +
>>>>>>>> +			for(i=(n-1); actualChild != null && i >= 0; i--)
>>>>>>>> +			{
>>>>>>>> +				child = contentView.getElementAt(i) as IUIBase;
>>>>>>>> +				if (child == null || !child.visible) continue;
>>>>>>>> +				if (child == actualChild) break;
>>>>>>>> +
>>>>>>>> +				margins = childMargins(child, hostWidth, hostHeight);
>>>>>>>> +				ilc = child as ILayoutChild;
>>>>>>>> +
>>>>>>>> +				childXpos = xpos + margins.left; // default x position
>>>>>>>> +
>>>>>>>> +				childWidth = child.width;
>>>>>>>> +				if (ilc != null)
>>>>>>>> +				{
>>>>>>>> +					if (!isNaN(ilc.percentWidth)) {
>>>>>>>> +						childWidth = hostWidth * ilc.percentWidth/100.0;
>>>>>>>> +					}
>>>>>>>> +					else if (isNaN(ilc.explicitWidth)) {
>>>>>>>> +						childWidth = hostWidth;
>>>>>>>> +					}
>>>>>>>> +					ilc.setWidth(childWidth);
>>>>>>>> +				}
>>>>>>>> +
>>>>>>>> +				if (ilc) {
>>>>>>>> +					if (!isNaN(ilc.percentHeight)) {
>>>>>>>> +						ilc.setHeight(hostHeight * ilc.percentHeight / 100);
>>>>>>>> +					}
>>>>>>>> +				}
>>>>>>>> +
>>>>>>>> +				ypos -= child.height + margins.bottom;
>>>>>>>> +
>>>>>>>> +				if (ilc) {
>>>>>>>> +					ilc.setX(childXpos);
>>>>>>>> +					ilc.setY(ypos);
>>>>>>>> +				} else {
>>>>>>>> +					child.x = childXpos;
>>>>>>>> +					child.y = ypos;
>>>>>>>> +				}
>>>>>>>> +
>>>>>>>> +				ypos -= margins.top;
>>>>>>>> +				adjustBottom = ypos;
>>>>>>>> +			}
>>>>>>>> +
>>>>>>>> +			// now adjust the actualChild to fill the space.
>>>>>>>> +			if (actualChild != null) {
>>>>>>>> +				margins = childMargins(actualChild, hostWidth, hostHeight);
>>>>>>>> +				ilc = actualChild as ILayoutChild;
>>>>>>>> +				childWidth = actualChild.width;
>>>>>>>> +				if (ilc != null)
>>>>>>>> +				{
>>>>>>>> +					if (!isNaN(ilc.percentWidth)) {
>>>>>>>> +						childWidth = hostWidth * ilc.percentWidth/100.0;
>>>>>>>> +					}
>>>>>>>> +					else if (isNaN(ilc.explicitWidth)) {
>>>>>>>> +						childWidth = hostWidth;
>>>>>>>> +					}
>>>>>>>> +					ilc.setWidth(childWidth);
>>>>>>>> +				}
>>>>>>>> +				childXpos = xpos + margins.left;
>>>>>>>> +					
>>>>>>>> +				actualChild.x = childXpos
>>>>>>>> +				actualChild.y = adjustTop + margins.top;
>>>>>>>> +				if (ilc) {
>>>>>>>> +					ilc.setHeight((adjustBottom-margins.bottom) -
>>>>>>>> (adjustTop+margins.top));
>>>>>>>> +				} else {
>>>>>>>> +					actualChild.height = (adjustBottom-margins.bottom) -
>>>>>>>> (adjustTop+margins.top);
>>>>>>>> +				}
>>>>>>>> +			}
>>>>>>>> +
>>>>>>>> +			return true;
>>>>>>>> +		}
>>>>>>>> +
>>>>>>>> +        public function setDocument(document:Object, id:String =
>>>>>>>> null):void
>>>>>>>> +        {
>>>>>>>> +            this.document = document;
>>>>>>>> +        }
>>>>>>>> +    }
>>>>>>>> +
>>>>>>>> +}
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit
>>>>>>>>-w
>>>>>>>> ip
>>>>>>>> -u
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2Fbdd34d2e%2Fframewor
>>>>>>>>ks
>>>>>>>> %2
>>>>>>>> Fp
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>rojects%2FBasic%2Fsrc%2Fmain%2Fflex%2Forg%2Fapache%2Fflex%2Fhtml%2F
>>>>>>>>be
>>>>>>>> ad
>>>>>>>> s%
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>2Flayouts%2FOneFlexibleChildVerticalLayoutLockChildWidth.as&data=02
>>>>>>>>%7
>>>>>>>> C0
>>>>>>>> 1%
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>7C%7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178d
>>>>>>>>ec
>>>>>>>> ee
>>>>>>>> 1%
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>7C0%7C0%7C636370058818766511&sdata=4Q4bkts0dp4wvvLUtu2yTYNg%2Fr7jS8
>>>>>>>>bR
>>>>>>>> t4
>>>>>>>> co
>>>>>>>> 3nYbPKc%3D&reserved=0
>>>>>>>> 
>>>>>>>> 
>>>>>>>>-------------------------------------------------------------------
>>>>>>>>--
>>>>>>>> -
>>>>>>>> diff --git 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/bead
>>>>>>>>s/
>>>>>>>> la
>>>>>>>> yo
>>>>>>>> uts/OneFlexibleChildVerticalLayoutLockChildWidth.as
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/bead
>>>>>>>>s/
>>>>>>>> la
>>>>>>>> yo
>>>>>>>> uts/OneFlexibleChildVerticalLayoutLockChildWidth.as
>>>>>>>> deleted file mode 100644
>>>>>>>> index 7415299..0000000
>>>>>>>> --- 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/bead
>>>>>>>>s/
>>>>>>>> la
>>>>>>>> yo
>>>>>>>> uts/OneFlexibleChildVerticalLayoutLockChildWidth.as
>>>>>>>> +++ /dev/null
>>>>>>>> @@ -1,93 +0,0 @@
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>-//////////////////////////////////////////////////////////////////
>>>>>>>>//
>>>>>>>> //
>>>>>>>> //
>>>>>>>> ////////
>>>>>>>> -//
>>>>>>>> -//  Licensed to the Apache Software Foundation (ASF) under one 
>>>>>>>>or 
>>>>>>>> more
>>>>>>>> -//  contributor license agreements.  See the NOTICE file 
>>>>>>>> distributed
>>>>>>>> with
>>>>>>>> -//  this work for additional information regarding copyright 
>>>>>>>> ownership.
>>>>>>>> -//  The ASF licenses this file to You under the Apache License,
>>>>>>>> Version 2.0
>>>>>>>> -//  (the "License"); you may not use this file except in 
>>>>>>>>compliance
>>>>>>>> with
>>>>>>>> -//  the License.  You may obtain a copy of the License at
>>>>>>>> -//
>>>>>>>> -//      
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww
>>>>>>>>.a
>>>>>>>> pa
>>>>>>>> ch
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>e.org%2Flicenses%2FLICENSE-2.0&data=02%7C01%7C%7C699bbb170b2c4f0bf3
>>>>>>>>ae
>>>>>>>> 08
>>>>>>>> d4
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6363700588187
>>>>>>>>66
>>>>>>>> 51
>>>>>>>> 1&
>>>>>>>> sdata=bButr5xXaczhl741iZvjXub0l1B72d%2FvImajqD7mvyA%3D&reserved=0
>>>>>>>> -//
>>>>>>>> -//  Unless required by applicable law or agreed to in writing, 
>>>>>>>> software
>>>>>>>> -//  distributed under the License is distributed on an "AS IS" 
>>>>>>>> BASIS,
>>>>>>>> -//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 
>>>>>>>> or 
>>>>>>>> implied.
>>>>>>>> -//  See the License for the specific language governing 
>>>>>>>> permissions 
>>>>>>>> and
>>>>>>>> -//  limitations under the License.
>>>>>>>> -//
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>-//////////////////////////////////////////////////////////////////
>>>>>>>>//
>>>>>>>> //
>>>>>>>> //
>>>>>>>> ////////
>>>>>>>> -package org.apache.flex.html.beads.layouts
>>>>>>>> -{
>>>>>>>> -	import org.apache.flex.core.LayoutBase;
>>>>>>>> -	import org.apache.flex.core.IDocument;
>>>>>>>> -	import org.apache.flex.core.ILayoutChild;
>>>>>>>> -	import org.apache.flex.core.ILayoutHost;
>>>>>>>> -	import org.apache.flex.core.ILayoutView;
>>>>>>>> -	import org.apache.flex.core.ILayoutParent;
>>>>>>>> -	import org.apache.flex.core.IParentIUIBase;
>>>>>>>> -	import org.apache.flex.core.IStrand;
>>>>>>>> -	import org.apache.flex.core.IStyleableObject;
>>>>>>>> -	import org.apache.flex.core.IUIBase;
>>>>>>>> -	import org.apache.flex.core.ValuesManager;
>>>>>>>> -	import org.apache.flex.core.UIBase;
>>>>>>>> -	import org.apache.flex.events.Event;
>>>>>>>> -	import org.apache.flex.geom.Rectangle;
>>>>>>>> -	import org.apache.flex.utils.CSSContainerUtils;
>>>>>>>> -	import org.apache.flex.utils.CSSUtils;
>>>>>>>> -
>>>>>>>> -    /**
>>>>>>>> -     *  The OneFlexibleChildHorizontalLayoutLockChildHeight 
>>>>>>>> -	 *  is a subclass of OneFlexibleChildHorizontalLayout
>>>>>>>> -	 *  that sets the flexible child's height to be the height
>>>>>>>> -	 *  of the host container.  This is useful when you
>>>>>>>> -	 *  don't want the actual child's height to dictate the
>>>>>>>> -	 *  height of the container in order to force
>>>>>>>> -	 *  scrollbars or line wrapping.
>>>>>>>> -     *
>>>>>>>> -     *  @langversion 3.0
>>>>>>>> -     *  @playerversion Flash 10.2
>>>>>>>> -     *  @playerversion AIR 2.6
>>>>>>>> -     *  @productversion FlexJS 0.0
>>>>>>>> -     */
>>>>>>>> -	public class OneFlexibleChildVerticalLayoutLockChildWidth 
>>>>>>>>extends 
>>>>>>>> OneFlexibleChildVerticalLayout
>>>>>>>> -	{
>>>>>>>> -        /**
>>>>>>>> -         *  Constructor.
>>>>>>>> -         *
>>>>>>>> -         *  @langversion 3.0
>>>>>>>> -         *  @playerversion Flash 10.2
>>>>>>>> -         *  @playerversion AIR 2.6
>>>>>>>> -         *  @productversion FlexJS 0.0
>>>>>>>> -         */
>>>>>>>> -		public function OneFlexibleChildVerticalLayoutLockChildWidth()
>>>>>>>> -		{
>>>>>>>> -			super();
>>>>>>>> -		}
>>>>>>>> -
>>>>>>>> -        /**
>>>>>>>> -         * @copy org.apache.flex.core.IBeadLayout#layout
>>>>>>>> -         */
>>>>>>>> -		override public function layout():Boolean
>>>>>>>> -		{
>>>>>>>> -			var ret:Boolean = super.layout();
>>>>>>>> -			if (ret)
>>>>>>>> -			{
>>>>>>>> -				var contentView:ILayoutView = layoutView;
>>>>>>>> -	
>>>>>>>> -				var n:int = contentView.numElements;
>>>>>>>> -
>>>>>>>> -				var w:Number = host.width;
>>>>>>>> -				for(var i:int=0; i < n; i++) {
>>>>>>>> -					var child:UIBase = contentView.getElementAt(i) as UIBase;
>>>>>>>> -					if (child != actualChild)
>>>>>>>> -						w = child.width;
>>>>>>>> -				}
>>>>>>>> -				
>>>>>>>> -				actualChild.setWidth(w); 
>>>>>>>> -			}
>>>>>>>> -			return ret;
>>>>>>>> -		}
>>>>>>>> -
>>>>>>>> -    }
>>>>>>>> -
>>>>>>>> -}
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit
>>>>>>>>-w
>>>>>>>> ip
>>>>>>>> -u
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2Fbdd34d2e%2Fframewor
>>>>>>>>ks
>>>>>>>> %2
>>>>>>>> Fp
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>rojects%2FBasic%2Fsrc%2Fmain%2Fresources%2Fbasic-manifest.xml&data=
>>>>>>>>02
>>>>>>>> %7
>>>>>>>> C0
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>1%7C%7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c17
>>>>>>>>8d
>>>>>>>> ec
>>>>>>>> ee
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>1%7C0%7C0%7C636370058818766511&sdata=mPldYCuDfp%2BxQ4QROdu4BWSl3Dh7
>>>>>>>>HP
>>>>>>>> 19
>>>>>>>> VX
>>>>>>>> BR3B3IXOg%3D&reserved=0
>>>>>>>> 
>>>>>>>> 
>>>>>>>>-------------------------------------------------------------------
>>>>>>>>--
>>>>>>>> -
>>>>>>>> diff --git 
>>>>>>>> a/frameworks/projects/Basic/src/main/resources/basic-manifest.xml 
>>>>>>>> b/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
>>>>>>>> index 7cbc05d..09bb1a3 100644
>>>>>>>> --- 
>>>>>>>> a/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
>>>>>>>> +++ 
>>>>>>>> b/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
>>>>>>>> @@ -150,8 +150,8 @@
>>>>>>>>  <component id="FlexibleFirstChildHorizontalLayout" 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>class="org.apache.flex.html.beads.layouts.FlexibleFirstChildHorizon
>>>>>>>>ta
>>>>>>>> lL
>>>>>>>> ay
>>>>>>>> out"/>
>>>>>>>>  <component id="OneFlexibleChildVerticalLayout" 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>class="org.apache.flex.html.beads.layouts.OneFlexibleChildVerticalL
>>>>>>>>ay
>>>>>>>> ou
>>>>>>>> t"
>>>>>>>> />
>>>>>>>>  <component id="OneFlexibleChildHorizontalLayout" 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>class="org.apache.flex.html.beads.layouts.OneFlexibleChildHorizonta
>>>>>>>>lL
>>>>>>>> ay
>>>>>>>> ou
>>>>>>>> t"/>
>>>>>>>> -    <component id="OneFlexibleChildVerticalLayoutLockChildWidth" 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>class="org.apache.flex.html.beads.layouts.OneFlexibleChildVerticalL
>>>>>>>>ay
>>>>>>>> ou
>>>>>>>> tL
>>>>>>>> ockChildWidth"/>
>>>>>>>> -    <component 
>>>>>>>> id="OneFlexibleChildHorizontalLayoutLockChildHeight" 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>class="org.apache.flex.html.beads.layouts.OneFlexibleChildHorizonta
>>>>>>>>lL
>>>>>>>> ay
>>>>>>>> ou
>>>>>>>> tLockChildHeight"/>
>>>>>>>> +    <component id="OneFlexibleChildVerticalLayoutForOverflow" 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>class="org.apache.flex.html.beads.layouts.OneFlexibleChildVerticalL
>>>>>>>>ay
>>>>>>>> ou
>>>>>>>> tF
>>>>>>>> orOverflow"/>
>>>>>>>> +    <component id="OneFlexibleChildHorizontalLayoutForOverflow" 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>class="org.apache.flex.html.beads.layouts.OneFlexibleChildHorizonta
>>>>>>>>lL
>>>>>>>> ay
>>>>>>>> ou
>>>>>>>> tForOverflow"/>
>>>>>>>>  <component id="MXMLBeadView" 
>>>>>>>> class="org.apache.flex.html.MXMLBeadView"/>
>>>>>>>> 
>>>>>>>>  <component id="SubAppLoader" 
>>>>>>>> class="org.apache.flex.html.SubAppLoader" />
>>>>>>>> 
>>>>>>> 
>>>>>> 
>>>>> 
>>>>> 
>>>> 
>>> 
>>> 
>> 
>


Re: [07/13] git commit: [flex-asjs] [refs/heads/release0.8.0] - give up on trying to use FlexBox for full-screen 3-pane views. FlexBox seems more happy stretching to content size instead of clipping at the computed flex-ed size. These custom layouts wi...

Posted by Harbs <ha...@gmail.com>.
I’m showing how to fix the “non-ForOverflow” layouts.

The problem is that Safari handles flex layouts differently than other browsers.

I’d like to use the flexbox layouts and AFAICT, they need browser sniffing to work across the board. Ideally, the browser sniffing should be included in the layout itself, but I was not sure the best way to do that…

> On Sep 26, 2017, at 11:02 PM, Alex Harui <ah...@adobe.com.INVALID> wrote:
> 
> I'm not sure if you have the exact same problem as ASDoc, but the ASDoc
> example is working fine with the "ForOverflow" layouts and no extra code
> in the app.  Or are you saying ASDoc isn't working for you on some browser?
> 
> IMO, that's the whole point of having many different flavors of layouts.
> Folks can try different ones until they find one that works.  No need to
> add custom code 3 places in the app.  Fixes for quirks get encapsulated
> into a PAYG variant of a base component.
> 
> My 2 cents,
> -Alex
> 
> On 9/26/17, 12:56 PM, "Harbs" <ha...@gmail.com> wrote:
> 
>> I ran into the Safari problem in my app.
>> 
>> I needed to add code like this:
>> 
>> var info:BrowserInfo = BrowserInfo.current();
>> if(info.browser != "Safari" && info.formFactor.indexOf("iP") == -1){
>> 	outerContainer.percentHeight = 100;
>> 	leftResizeThumb.percentHeight = 100;
>> }
>> 
>> The components look something like this:
>> 
>> 		<js:Container x="0" y="40" width="100%" id="dockAndOuterContainer"
>> height="0%" style="align-items:stretch">
>> 			<js:beads>
>> 				<js:OneFlexibleChildHorizontalLayout flexibleChild="outerContainer"/>
>> 			</js:beads>
>> 			<components:LeftDock id="leftDock"/>
>> 			<js:Group visible="false" id="leftResizeThumb">
>> 			</js:Group>
>> 			<js:Container id="outerContainer"/>
>> 		</js:Container
>> 
>> Basically, all browsers except Safari and iOS browsers need to be set to
>> 100%. Safari and iOS browsers CANNOT be set to 100%.
>> 
>> I’m not sure how to generalize this code…
>> 
>> I have it in three places in my app to make it behave correctly.
>> 
>> I’ve been meaning to bring up this issue on the dev@ list. Sorry I didn’t
>> do it sooner… ;-)
>> 
>> Harbs
>> 
>>> On Sep 26, 2017, at 10:44 PM, Alex Harui <ah...@adobe.com.INVALID>
>>> wrote:
>>> 
>>> I just reverted ASDoc back to the "ForOverflow" layouts.  ASDoc was not
>>> showing up correctly for me (Safari).  Maybe flex-basis is handled
>>> differently on different browsers.  We can look into it more later.
>>> 
>>> Looking into this did make me glad we are changing over to "Royale" so
>>> "Flex" and "FlexJS" will not be confused with FlexBox and the flex-xxx
>>> attributes.
>>> 
>>> -Alex
>>> 
>>> On 7/31/17, 12:57 AM, "Harbs" <ha...@gmail.com> wrote:
>>> 
>>>> The only example I found was the ASDoc app.
>>>> 
>>>> I switched it and it appears to work. (I pushed my changes.)
>>>> 
>>>>> On Jul 31, 2017, at 7:35 AM, Alex Harui <ah...@adobe.com.INVALID>
>>>>> wrote:
>>>>> 
>>>>> It will either work in the examples that use it or it won't.  Try it
>>>>> and
>>>>> find out.
>>>>> 
>>>>> -Alex
>>>>> 
>>>>> On 7/30/17, 3:04 AM, "Harbs" <ha...@gmail.com> wrote:
>>>>> 
>>>>>> I think I just ran into the same issue.
>>>>>> 
>>>>>> This layout seems to more-or-less do the job, but it’s kind of heavy.
>>>>>> 
>>>>>> I did some research into flexbox and it appear that setting
>>>>>> flex-basis
>>>>>> to
>>>>>> 0 does the job. It needs to be set on ONLY the one flexible child.
>>>>>> 
>>>>>> Here’s a codepen which shows a use case.
>>>>>> 
>>>>>> 
>>>>>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcodep
>>>>>> en
>>>>>> .i
>>>>>> 
>>>>>> 
>>>>>> o%2Fjpdevries%2Fpen%2FoXxPOP&data=02%7C01%7C%7C699bbb170b2c4f0bf3ae08d
>>>>>> 4d
>>>>>> 73
>>>>>> 
>>>>>> 
>>>>>> 2638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636370058818766511&
>>>>>> sd
>>>>>> at
>>>>>> a=tSTNYANFFiQ4DMGYbAZaz0dJ9qYDYpcwP2ZoSYRIcG8%3D&reserved=0
>>>>>> 
>>>>>> 
>>>>>> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcode
>>>>>> pe
>>>>>> n.
>>>>>> 
>>>>>> 
>>>>>> io%2Fjpdevries%2Fpen%2FoXxPOP&data=02%7C01%7C%7C699bbb170b2c4f0bf3ae08
>>>>>> d4
>>>>>> d7
>>>>>> 
>>>>>> 
>>>>>> 32638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636370058818766511
>>>>>> &s
>>>>>> da
>>>>>> ta=tSTNYANFFiQ4DMGYbAZaz0dJ9qYDYpcwP2ZoSYRIcG8%3D&reserved=0>
>>>>>> 
>>>>>> I noticed that the OneFlexibleLayouts have code which set the
>>>>>> flex-basis
>>>>>> of the children if a percentage value is set. When setting the size
>>>>>> of
>>>>>> the one flexible child to 0% this causes the flex-basis to be set to
>>>>>> 0
>>>>>> and then the one flexible child will fit the remaining space even if
>>>>>> it
>>>>>> might overflow because of its children.
>>>>>> 
>>>>>> I have wasted quite a bit of time before I discovered this. I’m not
>>>>>> sure
>>>>>> whether the OneFlexibleLayout classes should be changed, or maybe we
>>>>>> need
>>>>>> documentation that to fit content that might overflow, the percentage
>>>>>> should be set to 0. It could be there are cases where the entire
>>>>>> OnFlexibleLayout should be fit when smaller and expand (and not
>>>>>> scroll)
>>>>>> when bigger. In that case, the current behavior might be correct.
>>>>>> 
>>>>>> Thoughts?
>>>>>> Harbs
>>>>>> 
>>>>>>> On May 23, 2017, at 10:16 AM, aharui@apache.org wrote:
>>>>>>> 
>>>>>>> give up on trying to use FlexBox for full-screen 3-pane views.
>>>>>>> FlexBox
>>>>>>> seems more happy stretching to content size instead of clipping at
>>>>>>> the
>>>>>>> computed flex-ed size.  These custom layouts will do the proper
>>>>>>> sizing
>>>>>>> 
>>>>>>> 
>>>>>>> Project: 
>>>>>>> 
>>>>>>> 
>>>>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-w
>>>>>>> ip
>>>>>>> -u
>>>>>>> 
>>>>>>> 
>>>>>>> s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Frepo&data=02%7C01%7C%7C699bb
>>>>>>> b1
>>>>>>> 70
>>>>>>> 
>>>>>>> 
>>>>>>> b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C
>>>>>>> 63
>>>>>>> 63
>>>>>>> 
>>>>>>> 
>>>>>>> 70058818766511&sdata=P%2FMkfZAwCYwpQEoCe5UGx8tW0mZaIZsMdDg6VxlaKWA%3D
>>>>>>> &r
>>>>>>> es
>>>>>>> erved=0
>>>>>>> Commit: 
>>>>>>> 
>>>>>>> 
>>>>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-w
>>>>>>> ip
>>>>>>> -u
>>>>>>> 
>>>>>>> 
>>>>>>> s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fcommit%2Fbdd34d2e&data=02%7C
>>>>>>> 01
>>>>>>> %7
>>>>>>> 
>>>>>>> 
>>>>>>> C%7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178dece
>>>>>>> e1
>>>>>>> %7
>>>>>>> 
>>>>>>> 
>>>>>>> C0%7C0%7C636370058818766511&sdata=QosBAau8lE4nCS7c%2F8B6GDc%2Bqa%2BpS
>>>>>>> ko
>>>>>>> P5
>>>>>>> 5x3oji5FnI%3D&reserved=0
>>>>>>> Tree: 
>>>>>>> 
>>>>>>> 
>>>>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-w
>>>>>>> ip
>>>>>>> -u
>>>>>>> 
>>>>>>> 
>>>>>>> s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Ftree%2Fbdd34d2e&data=02%7C01
>>>>>>> %7
>>>>>>> C%
>>>>>>> 
>>>>>>> 
>>>>>>> 7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee1
>>>>>>> %7
>>>>>>> C0
>>>>>>> 
>>>>>>> 
>>>>>>> %7C0%7C636370058818766511&sdata=T4CCqwtn%2FgFTmAnaI%2BuCXqtX0P75ebpKV
>>>>>>> ZO
>>>>>>> xf
>>>>>>> XOTbIE%3D&reserved=0
>>>>>>> Diff: 
>>>>>>> 
>>>>>>> 
>>>>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-w
>>>>>>> ip
>>>>>>> -u
>>>>>>> 
>>>>>>> 
>>>>>>> s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fdiff%2Fbdd34d2e&data=02%7C01
>>>>>>> %7
>>>>>>> C%
>>>>>>> 
>>>>>>> 
>>>>>>> 7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee1
>>>>>>> %7
>>>>>>> C0
>>>>>>> 
>>>>>>> 
>>>>>>> %7C0%7C636370058818766511&sdata=f8WVJXc81KrLMuUgRckULYCfglNL7d%2BfdjS
>>>>>>> bB
>>>>>>> BU
>>>>>>> 0fRo%3D&reserved=0
>>>>>>> 
>>>>>>> Branch: refs/heads/release0.8.0
>>>>>>> Commit: bdd34d2ef4d8117fa1b222ac470482a42dbea9eb
>>>>>>> Parents: c505d67
>>>>>>> Author: Alex Harui <ah...@apache.org>
>>>>>>> Authored: Mon May 22 10:12:02 2017 -0700
>>>>>>> Committer: Alex Harui <ah...@apache.org>
>>>>>>> Committed: Tue May 23 00:15:56 2017 -0700
>>>>>>> 
>>>>>>> 
>>>>>>> ---------------------------------------------------------------------
>>>>>>> -
>>>>>>> ...eFlexibleChildHorizontalLayoutForOverflow.as | 290
>>>>>>> ++++++++++++++++++
>>>>>>> ...xibleChildHorizontalLayoutLockChildHeight.as |  91 ------
>>>>>>> ...OneFlexibleChildVerticalLayoutForOverflow.as | 291
>>>>>>> +++++++++++++++++++
>>>>>>> ...FlexibleChildVerticalLayoutLockChildWidth.as |  93 ------
>>>>>>> .../Basic/src/main/resources/basic-manifest.xml |   4 +-
>>>>>>> 5 files changed, 583 insertions(+), 186 deletions(-)
>>>>>>> 
>>>>>>> ---------------------------------------------------------------------
>>>>>>> -
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-w
>>>>>>> ip
>>>>>>> -u
>>>>>>> 
>>>>>>> 
>>>>>>> s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2Fbdd34d2e%2Fframeworks
>>>>>>> %2
>>>>>>> Fp
>>>>>>> 
>>>>>>> 
>>>>>>> rojects%2FBasic%2Fsrc%2Fmain%2Fflex%2Forg%2Fapache%2Fflex%2Fhtml%2Fbe
>>>>>>> ad
>>>>>>> s%
>>>>>>> 
>>>>>>> 
>>>>>>> 2Flayouts%2FOneFlexibleChildHorizontalLayoutForOverflow.as&data=02%7C
>>>>>>> 01
>>>>>>> %7
>>>>>>> 
>>>>>>> 
>>>>>>> C%7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178dece
>>>>>>> e1
>>>>>>> %7
>>>>>>> 
>>>>>>> 
>>>>>>> C0%7C0%7C636370058818766511&sdata=L7BjG%2BM7nTwguX%2BNaE5Op6BIT7XZrEq
>>>>>>> KF
>>>>>>> op
>>>>>>> 0D%2Frc0Aw%3D&reserved=0
>>>>>>> 
>>>>>>> ---------------------------------------------------------------------
>>>>>>> -
>>>>>>> diff --git 
>>>>>>> 
>>>>>>> 
>>>>>>> a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/
>>>>>>> la
>>>>>>> yo
>>>>>>> uts/OneFlexibleChildHorizontalLayoutForOverflow.as
>>>>>>> 
>>>>>>> 
>>>>>>> b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/
>>>>>>> la
>>>>>>> yo
>>>>>>> uts/OneFlexibleChildHorizontalLayoutForOverflow.as
>>>>>>> new file mode 100644
>>>>>>> index 0000000..c6abc22
>>>>>>> --- /dev/null
>>>>>>> +++ 
>>>>>>> 
>>>>>>> 
>>>>>>> b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/
>>>>>>> la
>>>>>>> yo
>>>>>>> uts/OneFlexibleChildHorizontalLayoutForOverflow.as
>>>>>>> @@ -0,0 +1,290 @@
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> +////////////////////////////////////////////////////////////////////
>>>>>>> //
>>>>>>> //
>>>>>>> ////////
>>>>>>> +//
>>>>>>> +//  Licensed to the Apache Software Foundation (ASF) under one or
>>>>>>> more
>>>>>>> +//  contributor license agreements.  See the NOTICE file
>>>>>>> distributed
>>>>>>> with
>>>>>>> +//  this work for additional information regarding copyright
>>>>>>> ownership.
>>>>>>> +//  The ASF licenses this file to You under the Apache License,
>>>>>>> Version 2.0
>>>>>>> +//  (the "License"); you may not use this file except in compliance
>>>>>>> with
>>>>>>> +//  the License.  You may obtain a copy of the License at
>>>>>>> +//
>>>>>>> +//      
>>>>>>> 
>>>>>>> 
>>>>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.a
>>>>>>> pa
>>>>>>> ch
>>>>>>> 
>>>>>>> 
>>>>>>> e.org%2Flicenses%2FLICENSE-2.0&data=02%7C01%7C%7C699bbb170b2c4f0bf3ae
>>>>>>> 08
>>>>>>> d4
>>>>>>> 
>>>>>>> 
>>>>>>> d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636370058818766
>>>>>>> 51
>>>>>>> 1&
>>>>>>> sdata=bButr5xXaczhl741iZvjXub0l1B72d%2FvImajqD7mvyA%3D&reserved=0
>>>>>>> +//
>>>>>>> +//  Unless required by applicable law or agreed to in writing,
>>>>>>> software
>>>>>>> +//  distributed under the License is distributed on an "AS IS"
>>>>>>> BASIS,
>>>>>>> +//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>>>>> implied.
>>>>>>> +//  See the License for the specific language governing permissions
>>>>>>> and
>>>>>>> +//  limitations under the License.
>>>>>>> +//
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> +////////////////////////////////////////////////////////////////////
>>>>>>> //
>>>>>>> //
>>>>>>> ////////
>>>>>>> +package org.apache.flex.html.beads.layouts
>>>>>>> +{
>>>>>>> +	import org.apache.flex.core.LayoutBase;
>>>>>>> +	import org.apache.flex.core.IDocument;
>>>>>>> +	import org.apache.flex.core.ILayoutChild;
>>>>>>> +	import org.apache.flex.core.ILayoutHost;
>>>>>>> +	import org.apache.flex.core.ILayoutView;
>>>>>>> +	import org.apache.flex.core.ILayoutParent;
>>>>>>> +	import org.apache.flex.core.IParentIUIBase;
>>>>>>> +	import org.apache.flex.core.IStrand;
>>>>>>> +	import org.apache.flex.core.IUIBase;
>>>>>>> +	import org.apache.flex.core.ValuesManager;
>>>>>>> +	import org.apache.flex.core.UIBase;
>>>>>>> +	import org.apache.flex.events.Event;
>>>>>>> +	import org.apache.flex.geom.Rectangle;
>>>>>>> +	import org.apache.flex.utils.CSSContainerUtils;
>>>>>>> +	import org.apache.flex.utils.CSSUtils;
>>>>>>> +
>>>>>>> +    /**
>>>>>>> +     *  The OneFlexibleChildHorizontalLayoutForOverflowis
>>>>>>> +	 *  intended for building apps that clip
>>>>>>> +	 *  and/or scroll the overflow, especially in a
>>>>>>> +	 *  3-pane view like the ASDoc examples.  It does not use
>>>>>>> +	 *  FlexBox because FlexBox wants to grow to the size
>>>>>>> +	 *  of the content without specifying width/height on
>>>>>>> +	 *  the flexible child.  But then the children in
>>>>>>> +	 *  the flexible child cannot use % sizing.
>>>>>>> +	 *  This layout presumes the parent is a known size.
>>>>>>> +	 *
>>>>>>> +     *  @langversion 3.0
>>>>>>> +     *  @playerversion Flash 10.2
>>>>>>> +     *  @playerversion AIR 2.6
>>>>>>> +     *  @productversion FlexJS 0.0
>>>>>>> +     */
>>>>>>> +	public class OneFlexibleChildHorizontalLayoutForOverflow extends
>>>>>>> LayoutBase implements IOneFlexibleChildLayout, IDocument
>>>>>>> +	{
>>>>>>> +        /**
>>>>>>> +         *  Constructor.
>>>>>>> +         *
>>>>>>> +         *  @langversion 3.0
>>>>>>> +         *  @playerversion Flash 10.2
>>>>>>> +         *  @playerversion AIR 2.6
>>>>>>> +         *  @productversion FlexJS 0.0
>>>>>>> +         */
>>>>>>> +		public function OneFlexibleChildHorizontalLayoutForOverflow()
>>>>>>> +		{
>>>>>>> +			super();
>>>>>>> +		}
>>>>>>> +
>>>>>>> +        private var _flexibleChild:String;
>>>>>>> +
>>>>>>> +        protected var actualChild:ILayoutChild;
>>>>>>> +
>>>>>>> +        /**
>>>>>>> +         *  @private
>>>>>>> +         *  The document.
>>>>>>> +         */
>>>>>>> +        private var document:Object;
>>>>>>> +
>>>>>>> +		/**
>>>>>>> +		 *  The id of the flexible child
>>>>>>> +		 *
>>>>>>> +		 *  @langversion 3.0
>>>>>>> +		 *  @playerversion Flash 10.2
>>>>>>> +		 *  @playerversion AIR 2.6
>>>>>>> +		 *  @productversion FlexJS 0.0
>>>>>>> +		 */
>>>>>>> +		public function get flexibleChild():String
>>>>>>> +		{
>>>>>>> +			return _flexibleChild;
>>>>>>> +		}
>>>>>>> +
>>>>>>> +		/**
>>>>>>> +		 * @private
>>>>>>> +		 */
>>>>>>> +		public function set flexibleChild(value:String):void
>>>>>>> +		{
>>>>>>> +			_flexibleChild = value;
>>>>>>> +		}
>>>>>>> +
>>>>>>> +        /**
>>>>>>> +         * @copy org.apache.flex.core.IBeadLayout#layout
>>>>>>> +         */
>>>>>>> +		COMPILE::JS
>>>>>>> +		override public function layout():Boolean
>>>>>>> +		{
>>>>>>> +			var contentView:ILayoutView = layoutView;
>>>>>>> +
>>>>>>> +			actualChild = document[flexibleChild];
>>>>>>> +
>>>>>>> +			var n:int = contentView.numElements;
>>>>>>> +			if (n == 0) return false;
>>>>>>> +
>>>>>>> +			for(var i:int=0; i < n; i++) {
>>>>>>> +				var child:UIBase = contentView.getElementAt(i) as UIBase;
>>>>>>> +				if (child.element.style["display"] != "inline-flex" &&
>>>>>>> child.element.style["display"] != "none")
>>>>>>> +					child.element.style["display"] = "inline-block";
>>>>>>> +			}
>>>>>>> +
>>>>>>> +			var w:Number = host.width;
>>>>>>> +			for(i=0; i < n; i++) {
>>>>>>> +				child = contentView.getElementAt(i) as UIBase;
>>>>>>> +				if (child != actualChild)
>>>>>>> +					w -= child.width;
>>>>>>> +			}
>>>>>>> +			actualChild.width = w;
>>>>>>> +					
>>>>>>> +			return true;
>>>>>>> +		}
>>>>>>> +
>>>>>>> +		COMPILE::SWF
>>>>>>> +		override public function layout():Boolean
>>>>>>> +		{
>>>>>>> +			var contentView:ILayoutView = layoutView;
>>>>>>> +			actualChild = document.hasOwnProperty(flexibleChild) ?
>>>>>>> document[flexibleChild] : null;
>>>>>>> +
>>>>>>> +			var n:Number = contentView.numElements;
>>>>>>> +			if (n == 0) return false;
>>>>>>> +			
>>>>>>> +			var maxWidth:Number = 0;
>>>>>>> +			var maxHeight:Number = 0;
>>>>>>> +			var hostSizedToContent:Boolean = host.isHeightSizedToContent();
>>>>>>> +			var hostWidth:Number = host.width;
>>>>>>> +			var hostHeight:Number = host.height;
>>>>>>> +
>>>>>>> +			var ilc:ILayoutChild;
>>>>>>> +			var data:Object;
>>>>>>> +			var canAdjust:Boolean = false;
>>>>>>> +			var margins:Object;
>>>>>>> +
>>>>>>> +			var paddingMetrics:Rectangle =
>>>>>>> CSSContainerUtils.getPaddingMetrics(host);
>>>>>>> +			var borderMetrics:Rectangle =
>>>>>>> CSSContainerUtils.getBorderMetrics(host);
>>>>>>> +			
>>>>>>> +			// adjust the host's usable size by the metrics. If
>>>>>>> hostSizedToContent, then the
>>>>>>> +			// resulting adjusted value may be less than zero.
>>>>>>> +			hostWidth -= paddingMetrics.left + paddingMetrics.right +
>>>>>>> borderMetrics.left + borderMetrics.right;
>>>>>>> +			hostHeight -= paddingMetrics.top + paddingMetrics.bottom +
>>>>>>> borderMetrics.top + borderMetrics.bottom;
>>>>>>> +
>>>>>>> +			var xpos:Number = borderMetrics.left + paddingMetrics.left;
>>>>>>> +			var ypos:Number = borderMetrics.top + paddingMetrics.left;
>>>>>>> +			var child:IUIBase;
>>>>>>> +			var childHeight:Number;
>>>>>>> +			var i:int;
>>>>>>> +			var childYpos:Number;
>>>>>>> +			var adjustLeft:Number = 0;
>>>>>>> +			var adjustRight:Number = hostWidth + borderMetrics.left +
>>>>>>> paddingMetrics.left;
>>>>>>> +
>>>>>>> +			// first work from left to right
>>>>>>> +			for(i=0; i < n; i++)
>>>>>>> +			{
>>>>>>> +				child = contentView.getElementAt(i) as IUIBase;
>>>>>>> +				if (child == null || !child.visible) continue;
>>>>>>> +				if (child == actualChild) break;
>>>>>>> +
>>>>>>> +				margins = childMargins(child, hostWidth, hostHeight);
>>>>>>> +				ilc = child as ILayoutChild;
>>>>>>> +
>>>>>>> +				xpos += margins.left;
>>>>>>> +
>>>>>>> +				childYpos = ypos + margins.top; // default y position
>>>>>>> +
>>>>>>> +				childHeight = child.height;
>>>>>>> +				if (ilc != null)
>>>>>>> +				{
>>>>>>> +					if (!isNaN(ilc.percentHeight)) {
>>>>>>> +						childHeight = host.height * ilc.percentHeight/100.0;
>>>>>>> +					}
>>>>>>> +					else if (isNaN(ilc.explicitHeight)) {
>>>>>>> +						childHeight = host.height;
>>>>>>> +					}
>>>>>>> +					ilc.setHeight(childHeight);
>>>>>>> +				}
>>>>>>> +
>>>>>>> +				if (ilc) {
>>>>>>> +					ilc.setX(xpos);
>>>>>>> +					ilc.setY(childYpos);
>>>>>>> +
>>>>>>> +					if (!isNaN(ilc.percentWidth)) {
>>>>>>> +						ilc.setWidth(hostWidth * ilc.percentWidth / 100);
>>>>>>> +					}
>>>>>>> +
>>>>>>> +				} else {
>>>>>>> +					child.x = xpos;
>>>>>>> +					child.y = childYpos;
>>>>>>> +				}
>>>>>>> +
>>>>>>> +				xpos += child.width + margins.right;
>>>>>>> +				adjustLeft = xpos;
>>>>>>> +			}
>>>>>>> +
>>>>>>> +			// then work from right to left
>>>>>>> +			xpos = hostWidth + borderMetrics.left + paddingMetrics.left;
>>>>>>> +
>>>>>>> +			for(i=(n-1); actualChild != null && i >= 0; i--)
>>>>>>> +			{
>>>>>>> +				child = contentView.getElementAt(i) as IUIBase;
>>>>>>> +				if (child == null || !child.visible) continue;
>>>>>>> +				if (child == actualChild) break;
>>>>>>> +
>>>>>>> +				margins = childMargins(child, hostWidth, hostHeight);
>>>>>>> +				ilc = child as ILayoutChild;
>>>>>>> +
>>>>>>> +				childYpos = ypos + margins.top; // default y position
>>>>>>> +
>>>>>>> +				childHeight = child.height;
>>>>>>> +				if (ilc != null)
>>>>>>> +				{
>>>>>>> +					if (!isNaN(ilc.percentHeight)) {
>>>>>>> +						childHeight = host.height * ilc.percentHeight/100.0;
>>>>>>> +					}
>>>>>>> +					else if (isNaN(ilc.explicitHeight)) {
>>>>>>> +						childHeight = host.height;
>>>>>>> +					}
>>>>>>> +					ilc.setHeight(childHeight);
>>>>>>> +				}
>>>>>>> +
>>>>>>> +				if (ilc) {
>>>>>>> +					if (!isNaN(ilc.percentWidth)) {
>>>>>>> +						ilc.setWidth(hostWidth * ilc.percentWidth / 100);
>>>>>>> +					}
>>>>>>> +				}
>>>>>>> +
>>>>>>> +				xpos -= child.width + margins.right;
>>>>>>> +
>>>>>>> +				if (ilc) {
>>>>>>> +					ilc.setX(xpos);
>>>>>>> +					ilc.setY(childYpos);
>>>>>>> +				} else {
>>>>>>> +					child.x = xpos;
>>>>>>> +					child.y = childYpos;
>>>>>>> +				}
>>>>>>> +
>>>>>>> +				xpos -= margins.left;
>>>>>>> +				adjustRight = xpos;
>>>>>>> +			}
>>>>>>> +
>>>>>>> +			// now adjust the actualChild to fill the space.
>>>>>>> +			if (actualChild != null) {
>>>>>>> +				margins = childMargins(actualChild, hostWidth, hostHeight);
>>>>>>> +				ilc = actualChild as ILayoutChild;
>>>>>>> +				childHeight = actualChild.height;
>>>>>>> +				if (ilc != null)
>>>>>>> +				{
>>>>>>> +					if (!isNaN(ilc.percentHeight)) {
>>>>>>> +						childHeight = host.height * ilc.percentHeight/100.0;
>>>>>>> +					}
>>>>>>> +					else if (isNaN(ilc.explicitHeight)) {
>>>>>>> +						childHeight = host.height;
>>>>>>> +					}
>>>>>>> +					ilc.setHeight(childHeight);
>>>>>>> +				}
>>>>>>> +				childYpos = ypos + margins.top;
>>>>>>> +				actualChild.x = adjustLeft + margins.left;
>>>>>>> +				actualChild.y = childYpos;
>>>>>>> +				if (ilc) {
>>>>>>> +					ilc.setWidth((adjustRight-margins.right) -
>>>>>>> (adjustLeft+margins.left));
>>>>>>> +				} else {
>>>>>>> +					actualChild.width = (adjustRight-margins.right) -
>>>>>>> (adjustLeft+margins.left);
>>>>>>> +				}
>>>>>>> +			}
>>>>>>> +
>>>>>>> +            return true;
>>>>>>> +		}
>>>>>>> +
>>>>>>> +        public function setDocument(document:Object, id:String =
>>>>>>> null):void
>>>>>>> +        {
>>>>>>> +            this.document = document;
>>>>>>> +        }
>>>>>>> +
>>>>>>> +    }
>>>>>>> +
>>>>>>> +}
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-w
>>>>>>> ip
>>>>>>> -u
>>>>>>> 
>>>>>>> 
>>>>>>> s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2Fbdd34d2e%2Fframeworks
>>>>>>> %2
>>>>>>> Fp
>>>>>>> 
>>>>>>> 
>>>>>>> rojects%2FBasic%2Fsrc%2Fmain%2Fflex%2Forg%2Fapache%2Fflex%2Fhtml%2Fbe
>>>>>>> ad
>>>>>>> s%
>>>>>>> 
>>>>>>> 
>>>>>>> 2Flayouts%2FOneFlexibleChildHorizontalLayoutLockChildHeight.as&data=0
>>>>>>> 2%
>>>>>>> 7C
>>>>>>> 
>>>>>>> 
>>>>>>> 01%7C%7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178
>>>>>>> de
>>>>>>> ce
>>>>>>> 
>>>>>>> 
>>>>>>> e1%7C0%7C0%7C636370058818766511&sdata=Ir1Siye21IUzzijpvWA1XmQN0AbHktL
>>>>>>> u%
>>>>>>> 2F
>>>>>>> u3h%2BRtBZT0%3D&reserved=0
>>>>>>> 
>>>>>>> ---------------------------------------------------------------------
>>>>>>> -
>>>>>>> diff --git 
>>>>>>> 
>>>>>>> 
>>>>>>> a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/
>>>>>>> la
>>>>>>> yo
>>>>>>> uts/OneFlexibleChildHorizontalLayoutLockChildHeight.as
>>>>>>> 
>>>>>>> 
>>>>>>> b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/
>>>>>>> la
>>>>>>> yo
>>>>>>> uts/OneFlexibleChildHorizontalLayoutLockChildHeight.as
>>>>>>> deleted file mode 100644
>>>>>>> index d170d23..0000000
>>>>>>> --- 
>>>>>>> 
>>>>>>> 
>>>>>>> a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/
>>>>>>> la
>>>>>>> yo
>>>>>>> uts/OneFlexibleChildHorizontalLayoutLockChildHeight.as
>>>>>>> +++ /dev/null
>>>>>>> @@ -1,91 +0,0 @@
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> -////////////////////////////////////////////////////////////////////
>>>>>>> //
>>>>>>> //
>>>>>>> ////////
>>>>>>> -//
>>>>>>> -//  Licensed to the Apache Software Foundation (ASF) under one or
>>>>>>> more
>>>>>>> -//  contributor license agreements.  See the NOTICE file
>>>>>>> distributed
>>>>>>> with
>>>>>>> -//  this work for additional information regarding copyright
>>>>>>> ownership.
>>>>>>> -//  The ASF licenses this file to You under the Apache License,
>>>>>>> Version 2.0
>>>>>>> -//  (the "License"); you may not use this file except in compliance
>>>>>>> with
>>>>>>> -//  the License.  You may obtain a copy of the License at
>>>>>>> -//
>>>>>>> -//      
>>>>>>> 
>>>>>>> 
>>>>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.a
>>>>>>> pa
>>>>>>> ch
>>>>>>> 
>>>>>>> 
>>>>>>> e.org%2Flicenses%2FLICENSE-2.0&data=02%7C01%7C%7C699bbb170b2c4f0bf3ae
>>>>>>> 08
>>>>>>> d4
>>>>>>> 
>>>>>>> 
>>>>>>> d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636370058818766
>>>>>>> 51
>>>>>>> 1&
>>>>>>> sdata=bButr5xXaczhl741iZvjXub0l1B72d%2FvImajqD7mvyA%3D&reserved=0
>>>>>>> -//
>>>>>>> -//  Unless required by applicable law or agreed to in writing,
>>>>>>> software
>>>>>>> -//  distributed under the License is distributed on an "AS IS"
>>>>>>> BASIS,
>>>>>>> -//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>>>>> implied.
>>>>>>> -//  See the License for the specific language governing permissions
>>>>>>> and
>>>>>>> -//  limitations under the License.
>>>>>>> -//
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> -////////////////////////////////////////////////////////////////////
>>>>>>> //
>>>>>>> //
>>>>>>> ////////
>>>>>>> -package org.apache.flex.html.beads.layouts
>>>>>>> -{
>>>>>>> -	import org.apache.flex.core.LayoutBase;
>>>>>>> -	import org.apache.flex.core.IDocument;
>>>>>>> -	import org.apache.flex.core.ILayoutChild;
>>>>>>> -	import org.apache.flex.core.ILayoutHost;
>>>>>>> -	import org.apache.flex.core.ILayoutView;
>>>>>>> -	import org.apache.flex.core.ILayoutParent;
>>>>>>> -	import org.apache.flex.core.IParentIUIBase;
>>>>>>> -	import org.apache.flex.core.IStrand;
>>>>>>> -	import org.apache.flex.core.IUIBase;
>>>>>>> -	import org.apache.flex.core.ValuesManager;
>>>>>>> -	import org.apache.flex.core.UIBase;
>>>>>>> -	import org.apache.flex.events.Event;
>>>>>>> -	import org.apache.flex.geom.Rectangle;
>>>>>>> -	import org.apache.flex.utils.CSSContainerUtils;
>>>>>>> -	import org.apache.flex.utils.CSSUtils;
>>>>>>> -
>>>>>>> -    /**
>>>>>>> -     *  The OneFlexibleChildHorizontalLayoutLockChildHeight
>>>>>>> -	 *  is a subclass of OneFlexibleChildHorizontalLayout
>>>>>>> -	 *  that sets the flexible child's height to be the height
>>>>>>> -	 *  of the host container.  This is useful when you
>>>>>>> -	 *  don't want the actual child's height to dictate the
>>>>>>> -	 *  height of the container in order to force
>>>>>>> -	 *  scrollbars
>>>>>>> -     *
>>>>>>> -     *  @langversion 3.0
>>>>>>> -     *  @playerversion Flash 10.2
>>>>>>> -     *  @playerversion AIR 2.6
>>>>>>> -     *  @productversion FlexJS 0.0
>>>>>>> -     */
>>>>>>> -	public class OneFlexibleChildHorizontalLayoutLockChildHeight
>>>>>>> extends
>>>>>>> OneFlexibleChildHorizontalLayout
>>>>>>> -	{
>>>>>>> -        /**
>>>>>>> -         *  Constructor.
>>>>>>> -         *
>>>>>>> -         *  @langversion 3.0
>>>>>>> -         *  @playerversion Flash 10.2
>>>>>>> -         *  @playerversion AIR 2.6
>>>>>>> -         *  @productversion FlexJS 0.0
>>>>>>> -         */
>>>>>>> -		public function OneFlexibleChildHorizontalLayoutLockChildHeight()
>>>>>>> -		{
>>>>>>> -			super();
>>>>>>> -		}
>>>>>>> -
>>>>>>> -        /**
>>>>>>> -         * @copy org.apache.flex.core.IBeadLayout#layout
>>>>>>> -         */
>>>>>>> -		override public function layout():Boolean
>>>>>>> -		{
>>>>>>> -			var ret:Boolean = super.layout();
>>>>>>> -			if (ret)
>>>>>>> -			{
>>>>>>> -				var contentView:ILayoutView = layoutView;
>>>>>>> -	
>>>>>>> -				var n:int = contentView.numElements;
>>>>>>> -
>>>>>>> -				var h:Number = host.height;
>>>>>>> -				for(var i:int=0; i < n; i++) {
>>>>>>> -					var child:UIBase = contentView.getElementAt(i) as UIBase;
>>>>>>> -					if (child != actualChild)
>>>>>>> -						h = child.height;
>>>>>>> -				}
>>>>>>> -				actualChild.setHeight(h);
>>>>>>> -			}
>>>>>>> -			return ret;
>>>>>>> -		}
>>>>>>> -
>>>>>>> -    }
>>>>>>> -
>>>>>>> -}
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-w
>>>>>>> ip
>>>>>>> -u
>>>>>>> 
>>>>>>> 
>>>>>>> s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2Fbdd34d2e%2Fframeworks
>>>>>>> %2
>>>>>>> Fp
>>>>>>> 
>>>>>>> 
>>>>>>> rojects%2FBasic%2Fsrc%2Fmain%2Fflex%2Forg%2Fapache%2Fflex%2Fhtml%2Fbe
>>>>>>> ad
>>>>>>> s%
>>>>>>> 
>>>>>>> 
>>>>>>> 2Flayouts%2FOneFlexibleChildVerticalLayoutForOverflow.as&data=02%7C01
>>>>>>> %7
>>>>>>> C%
>>>>>>> 
>>>>>>> 
>>>>>>> 7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee1
>>>>>>> %7
>>>>>>> C0
>>>>>>> 
>>>>>>> 
>>>>>>> %7C0%7C636370058818766511&sdata=WdJnx6IGbPwIxUibKB3UqfKTHgHugWIleqBVs
>>>>>>> qJ
>>>>>>> 5f
>>>>>>> eE%3D&reserved=0
>>>>>>> 
>>>>>>> ---------------------------------------------------------------------
>>>>>>> -
>>>>>>> diff --git 
>>>>>>> 
>>>>>>> 
>>>>>>> a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/
>>>>>>> la
>>>>>>> yo
>>>>>>> uts/OneFlexibleChildVerticalLayoutForOverflow.as
>>>>>>> 
>>>>>>> 
>>>>>>> b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/
>>>>>>> la
>>>>>>> yo
>>>>>>> uts/OneFlexibleChildVerticalLayoutForOverflow.as
>>>>>>> new file mode 100644
>>>>>>> index 0000000..5679f80
>>>>>>> --- /dev/null
>>>>>>> +++ 
>>>>>>> 
>>>>>>> 
>>>>>>> b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/
>>>>>>> la
>>>>>>> yo
>>>>>>> uts/OneFlexibleChildVerticalLayoutForOverflow.as
>>>>>>> @@ -0,0 +1,291 @@
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> +////////////////////////////////////////////////////////////////////
>>>>>>> //
>>>>>>> //
>>>>>>> ////////
>>>>>>> +//
>>>>>>> +//  Licensed to the Apache Software Foundation (ASF) under one or
>>>>>>> more
>>>>>>> +//  contributor license agreements.  See the NOTICE file
>>>>>>> distributed
>>>>>>> with
>>>>>>> +//  this work for additional information regarding copyright
>>>>>>> ownership.
>>>>>>> +//  The ASF licenses this file to You under the Apache License,
>>>>>>> Version 2.0
>>>>>>> +//  (the "License"); you may not use this file except in compliance
>>>>>>> with
>>>>>>> +//  the License.  You may obtain a copy of the License at
>>>>>>> +//
>>>>>>> +//      
>>>>>>> 
>>>>>>> 
>>>>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.a
>>>>>>> pa
>>>>>>> ch
>>>>>>> 
>>>>>>> 
>>>>>>> e.org%2Flicenses%2FLICENSE-2.0&data=02%7C01%7C%7C699bbb170b2c4f0bf3ae
>>>>>>> 08
>>>>>>> d4
>>>>>>> 
>>>>>>> 
>>>>>>> d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636370058818766
>>>>>>> 51
>>>>>>> 1&
>>>>>>> sdata=bButr5xXaczhl741iZvjXub0l1B72d%2FvImajqD7mvyA%3D&reserved=0
>>>>>>> +//
>>>>>>> +//  Unless required by applicable law or agreed to in writing,
>>>>>>> software
>>>>>>> +//  distributed under the License is distributed on an "AS IS"
>>>>>>> BASIS,
>>>>>>> +//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>>>>> implied.
>>>>>>> +//  See the License for the specific language governing permissions
>>>>>>> and
>>>>>>> +//  limitations under the License.
>>>>>>> +//
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> +////////////////////////////////////////////////////////////////////
>>>>>>> //
>>>>>>> //
>>>>>>> ////////
>>>>>>> +package org.apache.flex.html.beads.layouts
>>>>>>> +{
>>>>>>> +	import org.apache.flex.core.LayoutBase;
>>>>>>> +	import org.apache.flex.core.IDocument;
>>>>>>> +	import org.apache.flex.core.ILayoutChild;
>>>>>>> +	import org.apache.flex.core.ILayoutHost;
>>>>>>> +	import org.apache.flex.core.ILayoutView;
>>>>>>> +	import org.apache.flex.core.ILayoutParent;
>>>>>>> +	import org.apache.flex.core.IParentIUIBase;
>>>>>>> +	import org.apache.flex.core.IStrand;
>>>>>>> +	import org.apache.flex.core.IStyleableObject;
>>>>>>> +	import org.apache.flex.core.IUIBase;
>>>>>>> +	import org.apache.flex.core.ValuesManager;
>>>>>>> +	import org.apache.flex.core.UIBase;
>>>>>>> +	import org.apache.flex.events.Event;
>>>>>>> +	import org.apache.flex.geom.Rectangle;
>>>>>>> +	import org.apache.flex.utils.CSSContainerUtils;
>>>>>>> +	import org.apache.flex.utils.CSSUtils;
>>>>>>> +
>>>>>>> +    /**
>>>>>>> +     *  The OneFlexibleChildVerticalLayoutForOverflow is
>>>>>>> +	 *  intended for building apps that clip
>>>>>>> +	 *  and/or scroll the overflow, especially in a
>>>>>>> +	 *  3-pane view like the ASDoc examples.  It does not use
>>>>>>> +	 *  FlexBox because FlexBox wants to grow to the size
>>>>>>> +	 *  of the content without specifying width/height on
>>>>>>> +	 *  the flexible child.  But then the children in
>>>>>>> +	 *  the flexible child cannot use % sizing.
>>>>>>> +	 *  This layout presumes the parent is a known size.
>>>>>>> +     *
>>>>>>> +     *  @langversion 3.0
>>>>>>> +     *  @playerversion Flash 10.2
>>>>>>> +     *  @playerversion AIR 2.6
>>>>>>> +     *  @productversion FlexJS 0.0
>>>>>>> +     */
>>>>>>> +	public class OneFlexibleChildVerticalLayoutForOverflow extends
>>>>>>> LayoutBase implements IOneFlexibleChildLayout, IDocument
>>>>>>> +	{
>>>>>>> +        /**
>>>>>>> +         *  Constructor.
>>>>>>> +         *
>>>>>>> +         *  @langversion 3.0
>>>>>>> +         *  @playerversion Flash 10.2
>>>>>>> +         *  @playerversion AIR 2.6
>>>>>>> +         *  @productversion FlexJS 0.0
>>>>>>> +         */
>>>>>>> +		public function OneFlexibleChildVerticalLayoutForOverflow()
>>>>>>> +		{
>>>>>>> +			super();
>>>>>>> +		}
>>>>>>> +
>>>>>>> +        private var _flexibleChild:String;
>>>>>>> +
>>>>>>> +        protected var actualChild:ILayoutChild;
>>>>>>> +
>>>>>>> +        /**
>>>>>>> +         *  @private
>>>>>>> +         *  The document.
>>>>>>> +         */
>>>>>>> +        private var document:Object;
>>>>>>> +
>>>>>>> +		/**
>>>>>>> +		 *  The id of the flexible child
>>>>>>> +		 *
>>>>>>> +		 *  @langversion 3.0
>>>>>>> +		 *  @playerversion Flash 10.2
>>>>>>> +		 *  @playerversion AIR 2.6
>>>>>>> +		 *  @productversion FlexJS 0.0
>>>>>>> +		 */
>>>>>>> +		public function get flexibleChild():String
>>>>>>> +		{
>>>>>>> +			return _flexibleChild;
>>>>>>> +		}
>>>>>>> +
>>>>>>> +		/**
>>>>>>> +		 * @private
>>>>>>> +		 */
>>>>>>> +		public function set flexibleChild(value:String):void
>>>>>>> +		{
>>>>>>> +			_flexibleChild = value;
>>>>>>> +		}
>>>>>>> +
>>>>>>> +        /**
>>>>>>> +         * @copy org.apache.flex.core.IBeadLayout#layout
>>>>>>> +         */
>>>>>>> +		COMPILE::JS
>>>>>>> +		override public function layout():Boolean
>>>>>>> +		{
>>>>>>> +			var contentView:ILayoutView = layoutView;
>>>>>>> +
>>>>>>> +			actualChild = document[flexibleChild];
>>>>>>> +
>>>>>>> +			var n:int = contentView.numElements;
>>>>>>> +			if (n == 0) return false;
>>>>>>> +
>>>>>>> +			for(var i:int=0; i < n; i++) {
>>>>>>> +				var child:UIBase = contentView.getElementAt(i) as UIBase;
>>>>>>> +				if (child.element.style["display"] != "flex" &&
>>>>>>> child.element.style["display"] != "none")
>>>>>>> +					child.element.style["display"] = "block";
>>>>>>> +			}
>>>>>>> +
>>>>>>> +			var h:Number = host.height;
>>>>>>> +			for(i=0; i < n; i++) {
>>>>>>> +				child = contentView.getElementAt(i) as UIBase;
>>>>>>> +				if (child != actualChild)
>>>>>>> +					h -= child.height;
>>>>>>> +			}
>>>>>>> +			actualChild.height = h;
>>>>>>> +					
>>>>>>> +			return true;
>>>>>>> +		}
>>>>>>> +
>>>>>>> +		COMPILE::SWF
>>>>>>> +		override public function layout():Boolean
>>>>>>> +		{
>>>>>>> +			var contentView:ILayoutView = layoutView;
>>>>>>> +			actualChild = document.hasOwnProperty(flexibleChild) ?
>>>>>>> document[flexibleChild] : null;
>>>>>>> +
>>>>>>> +			var n:Number = contentView.numElements;
>>>>>>> +			if (n == 0) return false;
>>>>>>> +			
>>>>>>> +			var maxWidth:Number = 0;
>>>>>>> +			var maxHeight:Number = 0;
>>>>>>> +			var hostSizedToContent:Boolean = host.isWidthSizedToContent();
>>>>>>> +			var hostWidth:Number = host.width;
>>>>>>> +			var hostHeight:Number = host.height;
>>>>>>> +
>>>>>>> +			var ilc:ILayoutChild;
>>>>>>> +			var data:Object;
>>>>>>> +			var canAdjust:Boolean = false;
>>>>>>> +			var margins:Object;
>>>>>>> +
>>>>>>> +			var paddingMetrics:Rectangle =
>>>>>>> CSSContainerUtils.getPaddingMetrics(host);
>>>>>>> +			var borderMetrics:Rectangle =
>>>>>>> CSSContainerUtils.getBorderMetrics(host);
>>>>>>> +			
>>>>>>> +			// adjust the host's usable size by the metrics. If
>>>>>>> hostSizedToContent, then the
>>>>>>> +			// resulting adjusted value may be less than zero.
>>>>>>> +			hostWidth -= paddingMetrics.left + paddingMetrics.right +
>>>>>>> borderMetrics.left + borderMetrics.right;
>>>>>>> +			hostHeight -= paddingMetrics.top + paddingMetrics.bottom +
>>>>>>> borderMetrics.top + borderMetrics.bottom;
>>>>>>> +
>>>>>>> +			var xpos:Number = borderMetrics.left + paddingMetrics.left;
>>>>>>> +			var ypos:Number = borderMetrics.top + paddingMetrics.left;
>>>>>>> +			var child:IUIBase;
>>>>>>> +			var childWidth:Number;
>>>>>>> +			var i:int;
>>>>>>> +			var childXpos:Number;
>>>>>>> +			var adjustTop:Number = 0;
>>>>>>> +			var adjustBottom:Number = hostHeight + borderMetrics.top +
>>>>>>> paddingMetrics.top;
>>>>>>> +
>>>>>>> +			// first work from top to bottom
>>>>>>> +			for(i=0; i < n; i++)
>>>>>>> +			{
>>>>>>> +				child = contentView.getElementAt(i) as IUIBase;
>>>>>>> +				if (child == null || !child.visible) continue;
>>>>>>> +				if (child == actualChild) break;
>>>>>>> +
>>>>>>> +				margins = childMargins(child, hostWidth, hostHeight);
>>>>>>> +				ilc = child as ILayoutChild;
>>>>>>> +
>>>>>>> +				ypos += margins.top;
>>>>>>> +
>>>>>>> +				childXpos = xpos + margins.left; // default x position
>>>>>>> +
>>>>>>> +				childWidth = child.width;
>>>>>>> +				if (ilc != null)
>>>>>>> +				{
>>>>>>> +					if (!isNaN(ilc.percentWidth)) {
>>>>>>> +						childWidth = hostWidth * ilc.percentWidth/100.0;
>>>>>>> +					}
>>>>>>> +					else if (isNaN(ilc.explicitWidth)) {
>>>>>>> +						childWidth = hostWidth;
>>>>>>> +					}
>>>>>>> +					ilc.setWidth(childWidth);
>>>>>>> +				}
>>>>>>> +
>>>>>>> +				if (ilc) {
>>>>>>> +					ilc.setX(childXpos);
>>>>>>> +					ilc.setY(ypos);
>>>>>>> +
>>>>>>> +					if (!isNaN(ilc.percentHeight)) {
>>>>>>> +						ilc.setHeight(hostHeight * ilc.percentHeight / 100);
>>>>>>> +					}
>>>>>>> +
>>>>>>> +				} else {
>>>>>>> +					child.x = childXpos;
>>>>>>> +					child.y = ypos;
>>>>>>> +				}
>>>>>>> +
>>>>>>> +				ypos += child.height + margins.bottom;
>>>>>>> +				adjustTop = ypos;
>>>>>>> +			}
>>>>>>> +
>>>>>>> +			// then work from bottom to top
>>>>>>> +			ypos = hostHeight + borderMetrics.top + paddingMetrics.top;
>>>>>>> +
>>>>>>> +			for(i=(n-1); actualChild != null && i >= 0; i--)
>>>>>>> +			{
>>>>>>> +				child = contentView.getElementAt(i) as IUIBase;
>>>>>>> +				if (child == null || !child.visible) continue;
>>>>>>> +				if (child == actualChild) break;
>>>>>>> +
>>>>>>> +				margins = childMargins(child, hostWidth, hostHeight);
>>>>>>> +				ilc = child as ILayoutChild;
>>>>>>> +
>>>>>>> +				childXpos = xpos + margins.left; // default x position
>>>>>>> +
>>>>>>> +				childWidth = child.width;
>>>>>>> +				if (ilc != null)
>>>>>>> +				{
>>>>>>> +					if (!isNaN(ilc.percentWidth)) {
>>>>>>> +						childWidth = hostWidth * ilc.percentWidth/100.0;
>>>>>>> +					}
>>>>>>> +					else if (isNaN(ilc.explicitWidth)) {
>>>>>>> +						childWidth = hostWidth;
>>>>>>> +					}
>>>>>>> +					ilc.setWidth(childWidth);
>>>>>>> +				}
>>>>>>> +
>>>>>>> +				if (ilc) {
>>>>>>> +					if (!isNaN(ilc.percentHeight)) {
>>>>>>> +						ilc.setHeight(hostHeight * ilc.percentHeight / 100);
>>>>>>> +					}
>>>>>>> +				}
>>>>>>> +
>>>>>>> +				ypos -= child.height + margins.bottom;
>>>>>>> +
>>>>>>> +				if (ilc) {
>>>>>>> +					ilc.setX(childXpos);
>>>>>>> +					ilc.setY(ypos);
>>>>>>> +				} else {
>>>>>>> +					child.x = childXpos;
>>>>>>> +					child.y = ypos;
>>>>>>> +				}
>>>>>>> +
>>>>>>> +				ypos -= margins.top;
>>>>>>> +				adjustBottom = ypos;
>>>>>>> +			}
>>>>>>> +
>>>>>>> +			// now adjust the actualChild to fill the space.
>>>>>>> +			if (actualChild != null) {
>>>>>>> +				margins = childMargins(actualChild, hostWidth, hostHeight);
>>>>>>> +				ilc = actualChild as ILayoutChild;
>>>>>>> +				childWidth = actualChild.width;
>>>>>>> +				if (ilc != null)
>>>>>>> +				{
>>>>>>> +					if (!isNaN(ilc.percentWidth)) {
>>>>>>> +						childWidth = hostWidth * ilc.percentWidth/100.0;
>>>>>>> +					}
>>>>>>> +					else if (isNaN(ilc.explicitWidth)) {
>>>>>>> +						childWidth = hostWidth;
>>>>>>> +					}
>>>>>>> +					ilc.setWidth(childWidth);
>>>>>>> +				}
>>>>>>> +				childXpos = xpos + margins.left;
>>>>>>> +					
>>>>>>> +				actualChild.x = childXpos
>>>>>>> +				actualChild.y = adjustTop + margins.top;
>>>>>>> +				if (ilc) {
>>>>>>> +					ilc.setHeight((adjustBottom-margins.bottom) -
>>>>>>> (adjustTop+margins.top));
>>>>>>> +				} else {
>>>>>>> +					actualChild.height = (adjustBottom-margins.bottom) -
>>>>>>> (adjustTop+margins.top);
>>>>>>> +				}
>>>>>>> +			}
>>>>>>> +
>>>>>>> +			return true;
>>>>>>> +		}
>>>>>>> +
>>>>>>> +        public function setDocument(document:Object, id:String =
>>>>>>> null):void
>>>>>>> +        {
>>>>>>> +            this.document = document;
>>>>>>> +        }
>>>>>>> +    }
>>>>>>> +
>>>>>>> +}
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-w
>>>>>>> ip
>>>>>>> -u
>>>>>>> 
>>>>>>> 
>>>>>>> s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2Fbdd34d2e%2Fframeworks
>>>>>>> %2
>>>>>>> Fp
>>>>>>> 
>>>>>>> 
>>>>>>> rojects%2FBasic%2Fsrc%2Fmain%2Fflex%2Forg%2Fapache%2Fflex%2Fhtml%2Fbe
>>>>>>> ad
>>>>>>> s%
>>>>>>> 
>>>>>>> 
>>>>>>> 2Flayouts%2FOneFlexibleChildVerticalLayoutLockChildWidth.as&data=02%7
>>>>>>> C0
>>>>>>> 1%
>>>>>>> 
>>>>>>> 
>>>>>>> 7C%7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178dec
>>>>>>> ee
>>>>>>> 1%
>>>>>>> 
>>>>>>> 
>>>>>>> 7C0%7C0%7C636370058818766511&sdata=4Q4bkts0dp4wvvLUtu2yTYNg%2Fr7jS8bR
>>>>>>> t4
>>>>>>> co
>>>>>>> 3nYbPKc%3D&reserved=0
>>>>>>> 
>>>>>>> ---------------------------------------------------------------------
>>>>>>> -
>>>>>>> diff --git 
>>>>>>> 
>>>>>>> 
>>>>>>> a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/
>>>>>>> la
>>>>>>> yo
>>>>>>> uts/OneFlexibleChildVerticalLayoutLockChildWidth.as
>>>>>>> 
>>>>>>> 
>>>>>>> b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/
>>>>>>> la
>>>>>>> yo
>>>>>>> uts/OneFlexibleChildVerticalLayoutLockChildWidth.as
>>>>>>> deleted file mode 100644
>>>>>>> index 7415299..0000000
>>>>>>> --- 
>>>>>>> 
>>>>>>> 
>>>>>>> a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/
>>>>>>> la
>>>>>>> yo
>>>>>>> uts/OneFlexibleChildVerticalLayoutLockChildWidth.as
>>>>>>> +++ /dev/null
>>>>>>> @@ -1,93 +0,0 @@
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> -////////////////////////////////////////////////////////////////////
>>>>>>> //
>>>>>>> //
>>>>>>> ////////
>>>>>>> -//
>>>>>>> -//  Licensed to the Apache Software Foundation (ASF) under one or 
>>>>>>> more
>>>>>>> -//  contributor license agreements.  See the NOTICE file 
>>>>>>> distributed
>>>>>>> with
>>>>>>> -//  this work for additional information regarding copyright 
>>>>>>> ownership.
>>>>>>> -//  The ASF licenses this file to You under the Apache License,
>>>>>>> Version 2.0
>>>>>>> -//  (the "License"); you may not use this file except in compliance
>>>>>>> with
>>>>>>> -//  the License.  You may obtain a copy of the License at
>>>>>>> -//
>>>>>>> -//      
>>>>>>> 
>>>>>>> 
>>>>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.a
>>>>>>> pa
>>>>>>> ch
>>>>>>> 
>>>>>>> 
>>>>>>> e.org%2Flicenses%2FLICENSE-2.0&data=02%7C01%7C%7C699bbb170b2c4f0bf3ae
>>>>>>> 08
>>>>>>> d4
>>>>>>> 
>>>>>>> 
>>>>>>> d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636370058818766
>>>>>>> 51
>>>>>>> 1&
>>>>>>> sdata=bButr5xXaczhl741iZvjXub0l1B72d%2FvImajqD7mvyA%3D&reserved=0
>>>>>>> -//
>>>>>>> -//  Unless required by applicable law or agreed to in writing, 
>>>>>>> software
>>>>>>> -//  distributed under the License is distributed on an "AS IS" 
>>>>>>> BASIS,
>>>>>>> -//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 
>>>>>>> or 
>>>>>>> implied.
>>>>>>> -//  See the License for the specific language governing 
>>>>>>> permissions 
>>>>>>> and
>>>>>>> -//  limitations under the License.
>>>>>>> -//
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> -////////////////////////////////////////////////////////////////////
>>>>>>> //
>>>>>>> //
>>>>>>> ////////
>>>>>>> -package org.apache.flex.html.beads.layouts
>>>>>>> -{
>>>>>>> -	import org.apache.flex.core.LayoutBase;
>>>>>>> -	import org.apache.flex.core.IDocument;
>>>>>>> -	import org.apache.flex.core.ILayoutChild;
>>>>>>> -	import org.apache.flex.core.ILayoutHost;
>>>>>>> -	import org.apache.flex.core.ILayoutView;
>>>>>>> -	import org.apache.flex.core.ILayoutParent;
>>>>>>> -	import org.apache.flex.core.IParentIUIBase;
>>>>>>> -	import org.apache.flex.core.IStrand;
>>>>>>> -	import org.apache.flex.core.IStyleableObject;
>>>>>>> -	import org.apache.flex.core.IUIBase;
>>>>>>> -	import org.apache.flex.core.ValuesManager;
>>>>>>> -	import org.apache.flex.core.UIBase;
>>>>>>> -	import org.apache.flex.events.Event;
>>>>>>> -	import org.apache.flex.geom.Rectangle;
>>>>>>> -	import org.apache.flex.utils.CSSContainerUtils;
>>>>>>> -	import org.apache.flex.utils.CSSUtils;
>>>>>>> -
>>>>>>> -    /**
>>>>>>> -     *  The OneFlexibleChildHorizontalLayoutLockChildHeight 
>>>>>>> -	 *  is a subclass of OneFlexibleChildHorizontalLayout
>>>>>>> -	 *  that sets the flexible child's height to be the height
>>>>>>> -	 *  of the host container.  This is useful when you
>>>>>>> -	 *  don't want the actual child's height to dictate the
>>>>>>> -	 *  height of the container in order to force
>>>>>>> -	 *  scrollbars or line wrapping.
>>>>>>> -     *
>>>>>>> -     *  @langversion 3.0
>>>>>>> -     *  @playerversion Flash 10.2
>>>>>>> -     *  @playerversion AIR 2.6
>>>>>>> -     *  @productversion FlexJS 0.0
>>>>>>> -     */
>>>>>>> -	public class OneFlexibleChildVerticalLayoutLockChildWidth extends 
>>>>>>> OneFlexibleChildVerticalLayout
>>>>>>> -	{
>>>>>>> -        /**
>>>>>>> -         *  Constructor.
>>>>>>> -         *
>>>>>>> -         *  @langversion 3.0
>>>>>>> -         *  @playerversion Flash 10.2
>>>>>>> -         *  @playerversion AIR 2.6
>>>>>>> -         *  @productversion FlexJS 0.0
>>>>>>> -         */
>>>>>>> -		public function OneFlexibleChildVerticalLayoutLockChildWidth()
>>>>>>> -		{
>>>>>>> -			super();
>>>>>>> -		}
>>>>>>> -
>>>>>>> -        /**
>>>>>>> -         * @copy org.apache.flex.core.IBeadLayout#layout
>>>>>>> -         */
>>>>>>> -		override public function layout():Boolean
>>>>>>> -		{
>>>>>>> -			var ret:Boolean = super.layout();
>>>>>>> -			if (ret)
>>>>>>> -			{
>>>>>>> -				var contentView:ILayoutView = layoutView;
>>>>>>> -	
>>>>>>> -				var n:int = contentView.numElements;
>>>>>>> -
>>>>>>> -				var w:Number = host.width;
>>>>>>> -				for(var i:int=0; i < n; i++) {
>>>>>>> -					var child:UIBase = contentView.getElementAt(i) as UIBase;
>>>>>>> -					if (child != actualChild)
>>>>>>> -						w = child.width;
>>>>>>> -				}
>>>>>>> -				
>>>>>>> -				actualChild.setWidth(w); 
>>>>>>> -			}
>>>>>>> -			return ret;
>>>>>>> -		}
>>>>>>> -
>>>>>>> -    }
>>>>>>> -
>>>>>>> -}
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-w
>>>>>>> ip
>>>>>>> -u
>>>>>>> 
>>>>>>> 
>>>>>>> s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2Fbdd34d2e%2Fframeworks
>>>>>>> %2
>>>>>>> Fp
>>>>>>> 
>>>>>>> 
>>>>>>> rojects%2FBasic%2Fsrc%2Fmain%2Fresources%2Fbasic-manifest.xml&data=02
>>>>>>> %7
>>>>>>> C0
>>>>>>> 
>>>>>>> 
>>>>>>> 1%7C%7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178d
>>>>>>> ec
>>>>>>> ee
>>>>>>> 
>>>>>>> 
>>>>>>> 1%7C0%7C0%7C636370058818766511&sdata=mPldYCuDfp%2BxQ4QROdu4BWSl3Dh7HP
>>>>>>> 19
>>>>>>> VX
>>>>>>> BR3B3IXOg%3D&reserved=0
>>>>>>> 
>>>>>>> ---------------------------------------------------------------------
>>>>>>> -
>>>>>>> diff --git 
>>>>>>> a/frameworks/projects/Basic/src/main/resources/basic-manifest.xml 
>>>>>>> b/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
>>>>>>> index 7cbc05d..09bb1a3 100644
>>>>>>> --- 
>>>>>>> a/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
>>>>>>> +++ 
>>>>>>> b/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
>>>>>>> @@ -150,8 +150,8 @@
>>>>>>>  <component id="FlexibleFirstChildHorizontalLayout" 
>>>>>>> 
>>>>>>> 
>>>>>>> class="org.apache.flex.html.beads.layouts.FlexibleFirstChildHorizonta
>>>>>>> lL
>>>>>>> ay
>>>>>>> out"/>
>>>>>>>  <component id="OneFlexibleChildVerticalLayout" 
>>>>>>> 
>>>>>>> 
>>>>>>> class="org.apache.flex.html.beads.layouts.OneFlexibleChildVerticalLay
>>>>>>> ou
>>>>>>> t"
>>>>>>> />
>>>>>>>  <component id="OneFlexibleChildHorizontalLayout" 
>>>>>>> 
>>>>>>> 
>>>>>>> class="org.apache.flex.html.beads.layouts.OneFlexibleChildHorizontalL
>>>>>>> ay
>>>>>>> ou
>>>>>>> t"/>
>>>>>>> -    <component id="OneFlexibleChildVerticalLayoutLockChildWidth" 
>>>>>>> 
>>>>>>> 
>>>>>>> class="org.apache.flex.html.beads.layouts.OneFlexibleChildVerticalLay
>>>>>>> ou
>>>>>>> tL
>>>>>>> ockChildWidth"/>
>>>>>>> -    <component 
>>>>>>> id="OneFlexibleChildHorizontalLayoutLockChildHeight" 
>>>>>>> 
>>>>>>> 
>>>>>>> class="org.apache.flex.html.beads.layouts.OneFlexibleChildHorizontalL
>>>>>>> ay
>>>>>>> ou
>>>>>>> tLockChildHeight"/>
>>>>>>> +    <component id="OneFlexibleChildVerticalLayoutForOverflow" 
>>>>>>> 
>>>>>>> 
>>>>>>> class="org.apache.flex.html.beads.layouts.OneFlexibleChildVerticalLay
>>>>>>> ou
>>>>>>> tF
>>>>>>> orOverflow"/>
>>>>>>> +    <component id="OneFlexibleChildHorizontalLayoutForOverflow" 
>>>>>>> 
>>>>>>> 
>>>>>>> class="org.apache.flex.html.beads.layouts.OneFlexibleChildHorizontalL
>>>>>>> ay
>>>>>>> ou
>>>>>>> tForOverflow"/>
>>>>>>>  <component id="MXMLBeadView" 
>>>>>>> class="org.apache.flex.html.MXMLBeadView"/>
>>>>>>> 
>>>>>>>  <component id="SubAppLoader" 
>>>>>>> class="org.apache.flex.html.SubAppLoader" />
>>>>>>> 
>>>>>> 
>>>>> 
>>>> 
>>>> 
>>> 
>> 
>> 
> 


Re: [07/13] git commit: [flex-asjs] [refs/heads/release0.8.0] - give up on trying to use FlexBox for full-screen 3-pane views. FlexBox seems more happy stretching to content size instead of clipping at the computed flex-ed size. These custom layouts wi...

Posted by Justin Mclean <ju...@me.com>.
Hi,

> The compiler, the language, and the Flash runtime are all designed to
> prevent you from making silly mistakes, so I think the best practice is t
> define data classes.  I've even considered adding a warning that detects
> use of plain object.
.
Sonar Cube can do that for you - for instance are what it reports on the SDK:

https://builds.apache.org/analysis/component_issues/index?id=org.apache.flex.flexjs.framework%3Aflexjs-framework-parent#resolved=false|rules=flex%3AS1434

thanks,
Justin

Re: [07/13] git commit: [flex-asjs] [refs/heads/release0.8.0] - give up on trying to use FlexBox for full-screen 3-pane views. FlexBox seems more happy stretching to content size instead of clipping at the computed flex-ed size. These custom layouts wi...

Posted by Alex Harui <ah...@adobe.com.INVALID>.
Well, it may be just me, but I have the opposite thought...

IMO, instead of bracket access, we should take the time to create
ValueObjects for each of the data structures used in the ASDoc example.

I'm not even quite sure how to do #2 without blindly preventing renames of
all uses of the property names throughout the entire app.
I also think there are plenty of places where you don't need bracket
notation for plain objects.  I thought the only time minification is a
problem is when the data is externally supplied.

The compiler, the language, and the Flash runtime are all designed to
prevent you from making silly mistakes, so I think the best practice is to
define data classes.  I've even considered adding a warning that detects
use of plain object.

For example, in your example below, the following code

  doSomthing(myObj.foobaz);

could easily be accidentally written as:

  doSomthing(myObj.foobar);

Or 

  doSomthing(myObj.fooBaz);

If I take the time to define a data class




  public class MyObject
  {
     public var foobaz:String
  }

The compiler will catch this long before you will catch this at runtime.
Since we are all about developer productivity, that seems like the right
approach, but maybe generating data classes is too painful?

If anything, what I was going to suggest for ASDoc was to explore
converting JSON to AS data classes similar to how we just got AMF sort of
working.  It might be that only the SWF code needs to actually do the
conversion.  The JS code wouldn't need it unless someone is testing for
the type of the class with "as MyObject".

IOW, my claim is that it will save you time in the end to create data
classes.  You'll even get code hinting in many IDEs.  But of course, I
could be wrong.

Thoughts?
-Alex


On 9/26/17, 2:47 PM, "Harbs" <ha...@gmail.com> wrote:

>That’s probably it.
>
>It really needs bracket access.
>
>Alex, if you are looking for a task in the compiler, here’s a suggestion
>that would drastically reduce bugs in minified apps:
>
>1. For all untyped objects, dot notation should be rewritten to bracket
>notation:
>
>var myObj:Object = myArr[idx];
>doSomthing(myObj.foobaz);
>
>Should probably become:
>
>var myObj:Object = myArr[idx];
>doSomthing(myObj[“foobaz”]);
>
>2. Object literals should not be minified:
>
>var foo:Object = {
>	name:”foo”,
>        age:15,
>	vegetable:true
>}
>
>Should be rewritten to:
>var foo:Object = {
>	“name":”foo”,
>        “age":15,
>	“vegetable":true
>}
>
>I have been doing a LOT of manual fixing of these kinds of errors. It’s
>really tedious and hard to find all of them. Basically, unless you’re
>really good an find/replace, your app is almost guaranteed to blow up on
>some of these and then you need to find the needle in the haystack to fix
>it.
>
>Harbs
>
>> On Sep 27, 2017, at 12:33 AM, Alex Harui <ah...@adobe.com.INVALID>
>>wrote:
>> 
>> You can grab the JSON files from the Jenkins server, but the Ant build
>> should also build them.
>> 
>> My guess is that the code isn't finding properties from the JSON objects
>> because GCC renamed the properties.
>> 
>> -Alex
>> 
>> On 9/26/17, 2:25 PM, "Harbs" <ha...@gmail.com> wrote:
>> 
>>> I can’t test because I’m missing the json files and I’m not sure how to
>>> generate them.
>>> 
>>> Looks like some binding problem probably due to renaming. The json
>>>files
>>> appear to be loading correctly from the web.
>>> 
>>>> On Sep 26, 2017, at 11:41 PM, Alex Harui <ah...@adobe.com.INVALID>
>>>> wrote:
>>>> 
>>>> Feel free to take a investigate.  Peter's old ASDoc page points to the
>>>> js-debug version.  It loads slowly some times, but at least it is
>>>> functional.  I'd rather work on other things right now than chasing
>>>> down a
>>>> js-release problem.
>>>> 
>>>> -Alex
>>>> 
>>>> On 9/26/17, 1:36 PM, "Harbs" <ha...@gmail.com> wrote:
>>>> 
>>>>> FWIW, the debug version is working, but the release version does not
>>>>> appear to work:
>>>>> 
>>>>> 
>>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache
>>>>>fl
>>>>> ex
>>>>> 
>>>>> 
>>>>>build.cloudapp.net%3A8080%2Fjob%2FFlexJS_ASDoc_Example%2FlastSuccessfu
>>>>>lB
>>>>> ui
>>>>> 
>>>>> 
>>>>>ld%2Fartifact%2Fexamples%2Fflexjs%2FASDoc%2Fbin%2Fjs-release%2Findex.h
>>>>>tm
>>>>> l&
>>>>> 
>>>>> 
>>>>>data=02%7C01%7C%7C54179a88620d4b09851a08d5051e4e2b%7Cfa7b1b5a7b3443879
>>>>>4a
>>>>> ed
>>>>> 
>>>>> 
>>>>>2c178decee1%7C0%7C0%7C636420550126149199&sdata=%2BTvYxjGSPD%2FJidjhxaw
>>>>>Ds
>>>>> cN
>>>>> 4YnE1vPWE%2BarU5wgrolk%3D&reserved=0
>>>>> 
>>>>> 
>>>>><https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapach
>>>>>ef
>>>>> le
>>>>> 
>>>>> 
>>>>>xbuild.cloudapp.net%3A8080%2Fjob%2FFlexJS_ASDoc_Example%2FlastSuccessf
>>>>>ul
>>>>> Bu
>>>>> 
>>>>> 
>>>>>ild%2Fartifact%2Fexamples%2Fflexjs%2FASDoc%2Fbin%2Fjs-release%2Findex.
>>>>>ht
>>>>> ml
>>>>> 
>>>>> 
>>>>>&data=02%7C01%7C%7C54179a88620d4b09851a08d5051e4e2b%7Cfa7b1b5a7b344387
>>>>>94
>>>>> ae
>>>>> 
>>>>> 
>>>>>d2c178decee1%7C0%7C0%7C636420550126149199&sdata=%2BTvYxjGSPD%2FJidjhxa
>>>>>wD
>>>>> sc
>>>>> N4YnE1vPWE%2BarU5wgrolk%3D&reserved=0>
>>>>> 
>>>>>> On Sep 26, 2017, at 11:02 PM, Alex Harui <ah...@adobe.com.INVALID>
>>>>>> wrote:
>>>>>> 
>>>>>> Or are you saying ASDoc isn't working for you on some browser?
>>>>> 
>>>> 
>>> 
>> 
>


Re: [07/13] git commit: [flex-asjs] [refs/heads/release0.8.0] - give up on trying to use FlexBox for full-screen 3-pane views. FlexBox seems more happy stretching to content size instead of clipping at the computed flex-ed size. These custom layouts wi...

Posted by Harbs <ha...@gmail.com>.
That’s probably it.

It really needs bracket access.

Alex, if you are looking for a task in the compiler, here’s a suggestion that would drastically reduce bugs in minified apps:

1. For all untyped objects, dot notation should be rewritten to bracket notation:

var myObj:Object = myArr[idx];
doSomthing(myObj.foobaz);

Should probably become:

var myObj:Object = myArr[idx];
doSomthing(myObj[“foobaz”]);

2. Object literals should not be minified:

var foo:Object = {
	name:”foo”,
        age:15,
	vegetable:true
}

Should be rewritten to:
var foo:Object = {
	“name":”foo”,
        “age":15,
	“vegetable":true
}

I have been doing a LOT of manual fixing of these kinds of errors. It’s really tedious and hard to find all of them. Basically, unless you’re really good an find/replace, your app is almost guaranteed to blow up on some of these and then you need to find the needle in the haystack to fix it.

Harbs

> On Sep 27, 2017, at 12:33 AM, Alex Harui <ah...@adobe.com.INVALID> wrote:
> 
> You can grab the JSON files from the Jenkins server, but the Ant build
> should also build them.
> 
> My guess is that the code isn't finding properties from the JSON objects
> because GCC renamed the properties.
> 
> -Alex
> 
> On 9/26/17, 2:25 PM, "Harbs" <ha...@gmail.com> wrote:
> 
>> I can’t test because I’m missing the json files and I’m not sure how to
>> generate them.
>> 
>> Looks like some binding problem probably due to renaming. The json files
>> appear to be loading correctly from the web.
>> 
>>> On Sep 26, 2017, at 11:41 PM, Alex Harui <ah...@adobe.com.INVALID>
>>> wrote:
>>> 
>>> Feel free to take a investigate.  Peter's old ASDoc page points to the
>>> js-debug version.  It loads slowly some times, but at least it is
>>> functional.  I'd rather work on other things right now than chasing
>>> down a
>>> js-release problem.
>>> 
>>> -Alex
>>> 
>>> On 9/26/17, 1:36 PM, "Harbs" <ha...@gmail.com> wrote:
>>> 
>>>> FWIW, the debug version is working, but the release version does not
>>>> appear to work:
>>>> 
>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapachefl
>>>> ex
>>>> 
>>>> build.cloudapp.net%3A8080%2Fjob%2FFlexJS_ASDoc_Example%2FlastSuccessfulB
>>>> ui
>>>> 
>>>> ld%2Fartifact%2Fexamples%2Fflexjs%2FASDoc%2Fbin%2Fjs-release%2Findex.htm
>>>> l&
>>>> 
>>>> data=02%7C01%7C%7C54179a88620d4b09851a08d5051e4e2b%7Cfa7b1b5a7b34438794a
>>>> ed
>>>> 
>>>> 2c178decee1%7C0%7C0%7C636420550126149199&sdata=%2BTvYxjGSPD%2FJidjhxawDs
>>>> cN
>>>> 4YnE1vPWE%2BarU5wgrolk%3D&reserved=0
>>>> 
>>>> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapachef
>>>> le
>>>> 
>>>> xbuild.cloudapp.net%3A8080%2Fjob%2FFlexJS_ASDoc_Example%2FlastSuccessful
>>>> Bu
>>>> 
>>>> ild%2Fartifact%2Fexamples%2Fflexjs%2FASDoc%2Fbin%2Fjs-release%2Findex.ht
>>>> ml
>>>> 
>>>> &data=02%7C01%7C%7C54179a88620d4b09851a08d5051e4e2b%7Cfa7b1b5a7b34438794
>>>> ae
>>>> 
>>>> d2c178decee1%7C0%7C0%7C636420550126149199&sdata=%2BTvYxjGSPD%2FJidjhxawD
>>>> sc
>>>> N4YnE1vPWE%2BarU5wgrolk%3D&reserved=0>
>>>> 
>>>>> On Sep 26, 2017, at 11:02 PM, Alex Harui <ah...@adobe.com.INVALID>
>>>>> wrote:
>>>>> 
>>>>> Or are you saying ASDoc isn't working for you on some browser?
>>>> 
>>> 
>> 
> 


Re: [07/13] git commit: [flex-asjs] [refs/heads/release0.8.0] - give up on trying to use FlexBox for full-screen 3-pane views. FlexBox seems more happy stretching to content size instead of clipping at the computed flex-ed size. These custom layouts wi...

Posted by Alex Harui <ah...@adobe.com.INVALID>.
You can grab the JSON files from the Jenkins server, but the Ant build
should also build them.

My guess is that the code isn't finding properties from the JSON objects
because GCC renamed the properties.

-Alex

On 9/26/17, 2:25 PM, "Harbs" <ha...@gmail.com> wrote:

>I can’t test because I’m missing the json files and I’m not sure how to
>generate them.
>
>Looks like some binding problem probably due to renaming. The json files
>appear to be loading correctly from the web.
>
>> On Sep 26, 2017, at 11:41 PM, Alex Harui <ah...@adobe.com.INVALID>
>>wrote:
>> 
>> Feel free to take a investigate.  Peter's old ASDoc page points to the
>> js-debug version.  It loads slowly some times, but at least it is
>> functional.  I'd rather work on other things right now than chasing
>>down a
>> js-release problem.
>> 
>> -Alex
>> 
>> On 9/26/17, 1:36 PM, "Harbs" <ha...@gmail.com> wrote:
>> 
>>> FWIW, the debug version is working, but the release version does not
>>> appear to work:
>>> 
>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapachefl
>>>ex
>>> 
>>>build.cloudapp.net%3A8080%2Fjob%2FFlexJS_ASDoc_Example%2FlastSuccessfulB
>>>ui
>>> 
>>>ld%2Fartifact%2Fexamples%2Fflexjs%2FASDoc%2Fbin%2Fjs-release%2Findex.htm
>>>l&
>>> 
>>>data=02%7C01%7C%7C54179a88620d4b09851a08d5051e4e2b%7Cfa7b1b5a7b34438794a
>>>ed
>>> 
>>>2c178decee1%7C0%7C0%7C636420550126149199&sdata=%2BTvYxjGSPD%2FJidjhxawDs
>>>cN
>>> 4YnE1vPWE%2BarU5wgrolk%3D&reserved=0
>>> 
>>><https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapachef
>>>le
>>> 
>>>xbuild.cloudapp.net%3A8080%2Fjob%2FFlexJS_ASDoc_Example%2FlastSuccessful
>>>Bu
>>> 
>>>ild%2Fartifact%2Fexamples%2Fflexjs%2FASDoc%2Fbin%2Fjs-release%2Findex.ht
>>>ml
>>> 
>>>&data=02%7C01%7C%7C54179a88620d4b09851a08d5051e4e2b%7Cfa7b1b5a7b34438794
>>>ae
>>> 
>>>d2c178decee1%7C0%7C0%7C636420550126149199&sdata=%2BTvYxjGSPD%2FJidjhxawD
>>>sc
>>> N4YnE1vPWE%2BarU5wgrolk%3D&reserved=0>
>>> 
>>>> On Sep 26, 2017, at 11:02 PM, Alex Harui <ah...@adobe.com.INVALID>
>>>> wrote:
>>>> 
>>>> Or are you saying ASDoc isn't working for you on some browser?
>>> 
>> 
>


Re: [07/13] git commit: [flex-asjs] [refs/heads/release0.8.0] - give up on trying to use FlexBox for full-screen 3-pane views. FlexBox seems more happy stretching to content size instead of clipping at the computed flex-ed size. These custom layouts wi...

Posted by Harbs <ha...@gmail.com>.
I can’t test because I’m missing the json files and I’m not sure how to generate them.

Looks like some binding problem probably due to renaming. The json files appear to be loading correctly from the web.

> On Sep 26, 2017, at 11:41 PM, Alex Harui <ah...@adobe.com.INVALID> wrote:
> 
> Feel free to take a investigate.  Peter's old ASDoc page points to the
> js-debug version.  It loads slowly some times, but at least it is
> functional.  I'd rather work on other things right now than chasing down a
> js-release problem.
> 
> -Alex
> 
> On 9/26/17, 1:36 PM, "Harbs" <ha...@gmail.com> wrote:
> 
>> FWIW, the debug version is working, but the release version does not
>> appear to work:
>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapacheflex
>> build.cloudapp.net%3A8080%2Fjob%2FFlexJS_ASDoc_Example%2FlastSuccessfulBui
>> ld%2Fartifact%2Fexamples%2Fflexjs%2FASDoc%2Fbin%2Fjs-release%2Findex.html&
>> data=02%7C01%7C%7C54179a88620d4b09851a08d5051e4e2b%7Cfa7b1b5a7b34438794aed
>> 2c178decee1%7C0%7C0%7C636420550126149199&sdata=%2BTvYxjGSPD%2FJidjhxawDscN
>> 4YnE1vPWE%2BarU5wgrolk%3D&reserved=0
>> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapachefle
>> xbuild.cloudapp.net%3A8080%2Fjob%2FFlexJS_ASDoc_Example%2FlastSuccessfulBu
>> ild%2Fartifact%2Fexamples%2Fflexjs%2FASDoc%2Fbin%2Fjs-release%2Findex.html
>> &data=02%7C01%7C%7C54179a88620d4b09851a08d5051e4e2b%7Cfa7b1b5a7b34438794ae
>> d2c178decee1%7C0%7C0%7C636420550126149199&sdata=%2BTvYxjGSPD%2FJidjhxawDsc
>> N4YnE1vPWE%2BarU5wgrolk%3D&reserved=0>
>> 
>>> On Sep 26, 2017, at 11:02 PM, Alex Harui <ah...@adobe.com.INVALID>
>>> wrote:
>>> 
>>> Or are you saying ASDoc isn't working for you on some browser?
>> 
> 


Re: [07/13] git commit: [flex-asjs] [refs/heads/release0.8.0] - give up on trying to use FlexBox for full-screen 3-pane views. FlexBox seems more happy stretching to content size instead of clipping at the computed flex-ed size. These custom layouts wi...

Posted by Alex Harui <ah...@adobe.com.INVALID>.
Feel free to take a investigate.  Peter's old ASDoc page points to the
js-debug version.  It loads slowly some times, but at least it is
functional.  I'd rather work on other things right now than chasing down a
js-release problem.

-Alex

On 9/26/17, 1:36 PM, "Harbs" <ha...@gmail.com> wrote:

>FWIW, the debug version is working, but the release version does not
>appear to work:
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapacheflex
>build.cloudapp.net%3A8080%2Fjob%2FFlexJS_ASDoc_Example%2FlastSuccessfulBui
>ld%2Fartifact%2Fexamples%2Fflexjs%2FASDoc%2Fbin%2Fjs-release%2Findex.html&
>data=02%7C01%7C%7C54179a88620d4b09851a08d5051e4e2b%7Cfa7b1b5a7b34438794aed
>2c178decee1%7C0%7C0%7C636420550126149199&sdata=%2BTvYxjGSPD%2FJidjhxawDscN
>4YnE1vPWE%2BarU5wgrolk%3D&reserved=0
><https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapachefle
>xbuild.cloudapp.net%3A8080%2Fjob%2FFlexJS_ASDoc_Example%2FlastSuccessfulBu
>ild%2Fartifact%2Fexamples%2Fflexjs%2FASDoc%2Fbin%2Fjs-release%2Findex.html
>&data=02%7C01%7C%7C54179a88620d4b09851a08d5051e4e2b%7Cfa7b1b5a7b34438794ae
>d2c178decee1%7C0%7C0%7C636420550126149199&sdata=%2BTvYxjGSPD%2FJidjhxawDsc
>N4YnE1vPWE%2BarU5wgrolk%3D&reserved=0>
>
>> On Sep 26, 2017, at 11:02 PM, Alex Harui <ah...@adobe.com.INVALID>
>>wrote:
>> 
>> Or are you saying ASDoc isn't working for you on some browser?
>


Re: [07/13] git commit: [flex-asjs] [refs/heads/release0.8.0] - give up on trying to use FlexBox for full-screen 3-pane views. FlexBox seems more happy stretching to content size instead of clipping at the computed flex-ed size. These custom layouts wi...

Posted by Harbs <ha...@gmail.com>.
FWIW, the debug version is working, but the release version does not appear to work:
http://apacheflexbuild.cloudapp.net:8080/job/FlexJS_ASDoc_Example/lastSuccessfulBuild/artifact/examples/flexjs/ASDoc/bin/js-release/index.html <http://apacheflexbuild.cloudapp.net:8080/job/FlexJS_ASDoc_Example/lastSuccessfulBuild/artifact/examples/flexjs/ASDoc/bin/js-release/index.html>

> On Sep 26, 2017, at 11:02 PM, Alex Harui <ah...@adobe.com.INVALID> wrote:
> 
> Or are you saying ASDoc isn't working for you on some browser?


Re: [07/13] git commit: [flex-asjs] [refs/heads/release0.8.0] - give up on trying to use FlexBox for full-screen 3-pane views. FlexBox seems more happy stretching to content size instead of clipping at the computed flex-ed size. These custom layouts wi...

Posted by Alex Harui <ah...@adobe.com.INVALID>.
I'm not sure if you have the exact same problem as ASDoc, but the ASDoc
example is working fine with the "ForOverflow" layouts and no extra code
in the app.  Or are you saying ASDoc isn't working for you on some browser?

IMO, that's the whole point of having many different flavors of layouts.
Folks can try different ones until they find one that works.  No need to
add custom code 3 places in the app.  Fixes for quirks get encapsulated
into a PAYG variant of a base component.

My 2 cents,
-Alex

On 9/26/17, 12:56 PM, "Harbs" <ha...@gmail.com> wrote:

>I ran into the Safari problem in my app.
>
>I needed to add code like this:
>
>var info:BrowserInfo = BrowserInfo.current();
>if(info.browser != "Safari" && info.formFactor.indexOf("iP") == -1){
>	outerContainer.percentHeight = 100;
>	leftResizeThumb.percentHeight = 100;
>}
>
>The components look something like this:
>
>		<js:Container x="0" y="40" width="100%" id="dockAndOuterContainer"
>height="0%" style="align-items:stretch">
>			<js:beads>
>				<js:OneFlexibleChildHorizontalLayout flexibleChild="outerContainer"/>
>			</js:beads>
>			<components:LeftDock id="leftDock"/>
>			<js:Group visible="false" id="leftResizeThumb">
>			</js:Group>
>			<js:Container id="outerContainer"/>
>		</js:Container
>
>Basically, all browsers except Safari and iOS browsers need to be set to
>100%. Safari and iOS browsers CANNOT be set to 100%.
>
>I’m not sure how to generalize this code…
>
>I have it in three places in my app to make it behave correctly.
>
>I’ve been meaning to bring up this issue on the dev@ list. Sorry I didn’t
>do it sooner… ;-)
>
>Harbs
>
>> On Sep 26, 2017, at 10:44 PM, Alex Harui <ah...@adobe.com.INVALID>
>>wrote:
>> 
>> I just reverted ASDoc back to the "ForOverflow" layouts.  ASDoc was not
>> showing up correctly for me (Safari).  Maybe flex-basis is handled
>> differently on different browsers.  We can look into it more later.
>> 
>> Looking into this did make me glad we are changing over to "Royale" so
>> "Flex" and "FlexJS" will not be confused with FlexBox and the flex-xxx
>> attributes.
>> 
>> -Alex
>> 
>> On 7/31/17, 12:57 AM, "Harbs" <ha...@gmail.com> wrote:
>> 
>>> The only example I found was the ASDoc app.
>>> 
>>> I switched it and it appears to work. (I pushed my changes.)
>>> 
>>>> On Jul 31, 2017, at 7:35 AM, Alex Harui <ah...@adobe.com.INVALID>
>>>> wrote:
>>>> 
>>>> It will either work in the examples that use it or it won't.  Try it
>>>>and
>>>> find out.
>>>> 
>>>> -Alex
>>>> 
>>>> On 7/30/17, 3:04 AM, "Harbs" <ha...@gmail.com> wrote:
>>>> 
>>>>> I think I just ran into the same issue.
>>>>> 
>>>>> This layout seems to more-or-less do the job, but it’s kind of heavy.
>>>>> 
>>>>> I did some research into flexbox and it appear that setting
>>>>>flex-basis
>>>>> to
>>>>> 0 does the job. It needs to be set on ONLY the one flexible child.
>>>>> 
>>>>> Here’s a codepen which shows a use case.
>>>>> 
>>>>> 
>>>>>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcodep
>>>>>en
>>>>> .i
>>>>> 
>>>>> 
>>>>>o%2Fjpdevries%2Fpen%2FoXxPOP&data=02%7C01%7C%7C699bbb170b2c4f0bf3ae08d
>>>>>4d
>>>>> 73
>>>>> 
>>>>> 
>>>>>2638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636370058818766511&
>>>>>sd
>>>>> at
>>>>> a=tSTNYANFFiQ4DMGYbAZaz0dJ9qYDYpcwP2ZoSYRIcG8%3D&reserved=0
>>>>> 
>>>>> 
>>>>><https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcode
>>>>>pe
>>>>> n.
>>>>> 
>>>>> 
>>>>>io%2Fjpdevries%2Fpen%2FoXxPOP&data=02%7C01%7C%7C699bbb170b2c4f0bf3ae08
>>>>>d4
>>>>> d7
>>>>> 
>>>>> 
>>>>>32638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636370058818766511
>>>>>&s
>>>>> da
>>>>> ta=tSTNYANFFiQ4DMGYbAZaz0dJ9qYDYpcwP2ZoSYRIcG8%3D&reserved=0>
>>>>> 
>>>>> I noticed that the OneFlexibleLayouts have code which set the
>>>>> flex-basis
>>>>> of the children if a percentage value is set. When setting the size
>>>>>of
>>>>> the one flexible child to 0% this causes the flex-basis to be set to
>>>>>0
>>>>> and then the one flexible child will fit the remaining space even if
>>>>>it
>>>>> might overflow because of its children.
>>>>> 
>>>>> I have wasted quite a bit of time before I discovered this. I’m not
>>>>> sure
>>>>> whether the OneFlexibleLayout classes should be changed, or maybe we
>>>>> need
>>>>> documentation that to fit content that might overflow, the percentage
>>>>> should be set to 0. It could be there are cases where the entire
>>>>> OnFlexibleLayout should be fit when smaller and expand (and not
>>>>>scroll)
>>>>> when bigger. In that case, the current behavior might be correct.
>>>>> 
>>>>> Thoughts?
>>>>> Harbs
>>>>> 
>>>>>> On May 23, 2017, at 10:16 AM, aharui@apache.org wrote:
>>>>>> 
>>>>>> give up on trying to use FlexBox for full-screen 3-pane views.
>>>>>> FlexBox
>>>>>> seems more happy stretching to content size instead of clipping at
>>>>>>the
>>>>>> computed flex-ed size.  These custom layouts will do the proper
>>>>>>sizing
>>>>>> 
>>>>>> 
>>>>>> Project: 
>>>>>> 
>>>>>> 
>>>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-w
>>>>>>ip
>>>>>> -u
>>>>>> 
>>>>>> 
>>>>>>s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Frepo&data=02%7C01%7C%7C699bb
>>>>>>b1
>>>>>> 70
>>>>>> 
>>>>>> 
>>>>>>b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C
>>>>>>63
>>>>>> 63
>>>>>> 
>>>>>> 
>>>>>>70058818766511&sdata=P%2FMkfZAwCYwpQEoCe5UGx8tW0mZaIZsMdDg6VxlaKWA%3D
>>>>>>&r
>>>>>> es
>>>>>> erved=0
>>>>>> Commit: 
>>>>>> 
>>>>>> 
>>>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-w
>>>>>>ip
>>>>>> -u
>>>>>> 
>>>>>> 
>>>>>>s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fcommit%2Fbdd34d2e&data=02%7C
>>>>>>01
>>>>>> %7
>>>>>> 
>>>>>> 
>>>>>>C%7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178dece
>>>>>>e1
>>>>>> %7
>>>>>> 
>>>>>> 
>>>>>>C0%7C0%7C636370058818766511&sdata=QosBAau8lE4nCS7c%2F8B6GDc%2Bqa%2BpS
>>>>>>ko
>>>>>> P5
>>>>>> 5x3oji5FnI%3D&reserved=0
>>>>>> Tree: 
>>>>>> 
>>>>>> 
>>>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-w
>>>>>>ip
>>>>>> -u
>>>>>> 
>>>>>> 
>>>>>>s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Ftree%2Fbdd34d2e&data=02%7C01
>>>>>>%7
>>>>>> C%
>>>>>> 
>>>>>> 
>>>>>>7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee1
>>>>>>%7
>>>>>> C0
>>>>>> 
>>>>>> 
>>>>>>%7C0%7C636370058818766511&sdata=T4CCqwtn%2FgFTmAnaI%2BuCXqtX0P75ebpKV
>>>>>>ZO
>>>>>> xf
>>>>>> XOTbIE%3D&reserved=0
>>>>>> Diff: 
>>>>>> 
>>>>>> 
>>>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-w
>>>>>>ip
>>>>>> -u
>>>>>> 
>>>>>> 
>>>>>>s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fdiff%2Fbdd34d2e&data=02%7C01
>>>>>>%7
>>>>>> C%
>>>>>> 
>>>>>> 
>>>>>>7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee1
>>>>>>%7
>>>>>> C0
>>>>>> 
>>>>>> 
>>>>>>%7C0%7C636370058818766511&sdata=f8WVJXc81KrLMuUgRckULYCfglNL7d%2BfdjS
>>>>>>bB
>>>>>> BU
>>>>>> 0fRo%3D&reserved=0
>>>>>> 
>>>>>> Branch: refs/heads/release0.8.0
>>>>>> Commit: bdd34d2ef4d8117fa1b222ac470482a42dbea9eb
>>>>>> Parents: c505d67
>>>>>> Author: Alex Harui <ah...@apache.org>
>>>>>> Authored: Mon May 22 10:12:02 2017 -0700
>>>>>> Committer: Alex Harui <ah...@apache.org>
>>>>>> Committed: Tue May 23 00:15:56 2017 -0700
>>>>>> 
>>>>>> 
>>>>>>---------------------------------------------------------------------
>>>>>>-
>>>>>> ...eFlexibleChildHorizontalLayoutForOverflow.as | 290
>>>>>> ++++++++++++++++++
>>>>>> ...xibleChildHorizontalLayoutLockChildHeight.as |  91 ------
>>>>>> ...OneFlexibleChildVerticalLayoutForOverflow.as | 291
>>>>>> +++++++++++++++++++
>>>>>> ...FlexibleChildVerticalLayoutLockChildWidth.as |  93 ------
>>>>>> .../Basic/src/main/resources/basic-manifest.xml |   4 +-
>>>>>> 5 files changed, 583 insertions(+), 186 deletions(-)
>>>>>> 
>>>>>>---------------------------------------------------------------------
>>>>>>-
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-w
>>>>>>ip
>>>>>> -u
>>>>>> 
>>>>>> 
>>>>>>s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2Fbdd34d2e%2Fframeworks
>>>>>>%2
>>>>>> Fp
>>>>>> 
>>>>>> 
>>>>>>rojects%2FBasic%2Fsrc%2Fmain%2Fflex%2Forg%2Fapache%2Fflex%2Fhtml%2Fbe
>>>>>>ad
>>>>>> s%
>>>>>> 
>>>>>> 
>>>>>>2Flayouts%2FOneFlexibleChildHorizontalLayoutForOverflow.as&data=02%7C
>>>>>>01
>>>>>> %7
>>>>>> 
>>>>>> 
>>>>>>C%7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178dece
>>>>>>e1
>>>>>> %7
>>>>>> 
>>>>>> 
>>>>>>C0%7C0%7C636370058818766511&sdata=L7BjG%2BM7nTwguX%2BNaE5Op6BIT7XZrEq
>>>>>>KF
>>>>>> op
>>>>>> 0D%2Frc0Aw%3D&reserved=0
>>>>>> 
>>>>>>---------------------------------------------------------------------
>>>>>>-
>>>>>> diff --git 
>>>>>> 
>>>>>> 
>>>>>>a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/
>>>>>>la
>>>>>> yo
>>>>>> uts/OneFlexibleChildHorizontalLayoutForOverflow.as
>>>>>> 
>>>>>> 
>>>>>>b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/
>>>>>>la
>>>>>> yo
>>>>>> uts/OneFlexibleChildHorizontalLayoutForOverflow.as
>>>>>> new file mode 100644
>>>>>> index 0000000..c6abc22
>>>>>> --- /dev/null
>>>>>> +++ 
>>>>>> 
>>>>>> 
>>>>>>b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/
>>>>>>la
>>>>>> yo
>>>>>> uts/OneFlexibleChildHorizontalLayoutForOverflow.as
>>>>>> @@ -0,0 +1,290 @@
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>>+////////////////////////////////////////////////////////////////////
>>>>>>//
>>>>>> //
>>>>>> ////////
>>>>>> +//
>>>>>> +//  Licensed to the Apache Software Foundation (ASF) under one or
>>>>>> more
>>>>>> +//  contributor license agreements.  See the NOTICE file
>>>>>>distributed
>>>>>> with
>>>>>> +//  this work for additional information regarding copyright
>>>>>> ownership.
>>>>>> +//  The ASF licenses this file to You under the Apache License,
>>>>>> Version 2.0
>>>>>> +//  (the "License"); you may not use this file except in compliance
>>>>>> with
>>>>>> +//  the License.  You may obtain a copy of the License at
>>>>>> +//
>>>>>> +//      
>>>>>> 
>>>>>> 
>>>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.a
>>>>>>pa
>>>>>> ch
>>>>>> 
>>>>>> 
>>>>>>e.org%2Flicenses%2FLICENSE-2.0&data=02%7C01%7C%7C699bbb170b2c4f0bf3ae
>>>>>>08
>>>>>> d4
>>>>>> 
>>>>>> 
>>>>>>d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636370058818766
>>>>>>51
>>>>>> 1&
>>>>>> sdata=bButr5xXaczhl741iZvjXub0l1B72d%2FvImajqD7mvyA%3D&reserved=0
>>>>>> +//
>>>>>> +//  Unless required by applicable law or agreed to in writing,
>>>>>> software
>>>>>> +//  distributed under the License is distributed on an "AS IS"
>>>>>>BASIS,
>>>>>> +//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>>>> implied.
>>>>>> +//  See the License for the specific language governing permissions
>>>>>> and
>>>>>> +//  limitations under the License.
>>>>>> +//
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>>+////////////////////////////////////////////////////////////////////
>>>>>>//
>>>>>> //
>>>>>> ////////
>>>>>> +package org.apache.flex.html.beads.layouts
>>>>>> +{
>>>>>> +	import org.apache.flex.core.LayoutBase;
>>>>>> +	import org.apache.flex.core.IDocument;
>>>>>> +	import org.apache.flex.core.ILayoutChild;
>>>>>> +	import org.apache.flex.core.ILayoutHost;
>>>>>> +	import org.apache.flex.core.ILayoutView;
>>>>>> +	import org.apache.flex.core.ILayoutParent;
>>>>>> +	import org.apache.flex.core.IParentIUIBase;
>>>>>> +	import org.apache.flex.core.IStrand;
>>>>>> +	import org.apache.flex.core.IUIBase;
>>>>>> +	import org.apache.flex.core.ValuesManager;
>>>>>> +	import org.apache.flex.core.UIBase;
>>>>>> +	import org.apache.flex.events.Event;
>>>>>> +	import org.apache.flex.geom.Rectangle;
>>>>>> +	import org.apache.flex.utils.CSSContainerUtils;
>>>>>> +	import org.apache.flex.utils.CSSUtils;
>>>>>> +
>>>>>> +    /**
>>>>>> +     *  The OneFlexibleChildHorizontalLayoutForOverflowis
>>>>>> +	 *  intended for building apps that clip
>>>>>> +	 *  and/or scroll the overflow, especially in a
>>>>>> +	 *  3-pane view like the ASDoc examples.  It does not use
>>>>>> +	 *  FlexBox because FlexBox wants to grow to the size
>>>>>> +	 *  of the content without specifying width/height on
>>>>>> +	 *  the flexible child.  But then the children in
>>>>>> +	 *  the flexible child cannot use % sizing.
>>>>>> +	 *  This layout presumes the parent is a known size.
>>>>>> +	 *
>>>>>> +     *  @langversion 3.0
>>>>>> +     *  @playerversion Flash 10.2
>>>>>> +     *  @playerversion AIR 2.6
>>>>>> +     *  @productversion FlexJS 0.0
>>>>>> +     */
>>>>>> +	public class OneFlexibleChildHorizontalLayoutForOverflow extends
>>>>>> LayoutBase implements IOneFlexibleChildLayout, IDocument
>>>>>> +	{
>>>>>> +        /**
>>>>>> +         *  Constructor.
>>>>>> +         *
>>>>>> +         *  @langversion 3.0
>>>>>> +         *  @playerversion Flash 10.2
>>>>>> +         *  @playerversion AIR 2.6
>>>>>> +         *  @productversion FlexJS 0.0
>>>>>> +         */
>>>>>> +		public function OneFlexibleChildHorizontalLayoutForOverflow()
>>>>>> +		{
>>>>>> +			super();
>>>>>> +		}
>>>>>> +
>>>>>> +        private var _flexibleChild:String;
>>>>>> +
>>>>>> +        protected var actualChild:ILayoutChild;
>>>>>> +
>>>>>> +        /**
>>>>>> +         *  @private
>>>>>> +         *  The document.
>>>>>> +         */
>>>>>> +        private var document:Object;
>>>>>> +
>>>>>> +		/**
>>>>>> +		 *  The id of the flexible child
>>>>>> +		 *
>>>>>> +		 *  @langversion 3.0
>>>>>> +		 *  @playerversion Flash 10.2
>>>>>> +		 *  @playerversion AIR 2.6
>>>>>> +		 *  @productversion FlexJS 0.0
>>>>>> +		 */
>>>>>> +		public function get flexibleChild():String
>>>>>> +		{
>>>>>> +			return _flexibleChild;
>>>>>> +		}
>>>>>> +
>>>>>> +		/**
>>>>>> +		 * @private
>>>>>> +		 */
>>>>>> +		public function set flexibleChild(value:String):void
>>>>>> +		{
>>>>>> +			_flexibleChild = value;
>>>>>> +		}
>>>>>> +
>>>>>> +        /**
>>>>>> +         * @copy org.apache.flex.core.IBeadLayout#layout
>>>>>> +         */
>>>>>> +		COMPILE::JS
>>>>>> +		override public function layout():Boolean
>>>>>> +		{
>>>>>> +			var contentView:ILayoutView = layoutView;
>>>>>> +
>>>>>> +			actualChild = document[flexibleChild];
>>>>>> +
>>>>>> +			var n:int = contentView.numElements;
>>>>>> +			if (n == 0) return false;
>>>>>> +
>>>>>> +			for(var i:int=0; i < n; i++) {
>>>>>> +				var child:UIBase = contentView.getElementAt(i) as UIBase;
>>>>>> +				if (child.element.style["display"] != "inline-flex" &&
>>>>>> child.element.style["display"] != "none")
>>>>>> +					child.element.style["display"] = "inline-block";
>>>>>> +			}
>>>>>> +
>>>>>> +			var w:Number = host.width;
>>>>>> +			for(i=0; i < n; i++) {
>>>>>> +				child = contentView.getElementAt(i) as UIBase;
>>>>>> +				if (child != actualChild)
>>>>>> +					w -= child.width;
>>>>>> +			}
>>>>>> +			actualChild.width = w;
>>>>>> +					
>>>>>> +			return true;
>>>>>> +		}
>>>>>> +
>>>>>> +		COMPILE::SWF
>>>>>> +		override public function layout():Boolean
>>>>>> +		{
>>>>>> +			var contentView:ILayoutView = layoutView;
>>>>>> +			actualChild = document.hasOwnProperty(flexibleChild) ?
>>>>>> document[flexibleChild] : null;
>>>>>> +
>>>>>> +			var n:Number = contentView.numElements;
>>>>>> +			if (n == 0) return false;
>>>>>> +			
>>>>>> +			var maxWidth:Number = 0;
>>>>>> +			var maxHeight:Number = 0;
>>>>>> +			var hostSizedToContent:Boolean = host.isHeightSizedToContent();
>>>>>> +			var hostWidth:Number = host.width;
>>>>>> +			var hostHeight:Number = host.height;
>>>>>> +
>>>>>> +			var ilc:ILayoutChild;
>>>>>> +			var data:Object;
>>>>>> +			var canAdjust:Boolean = false;
>>>>>> +			var margins:Object;
>>>>>> +
>>>>>> +			var paddingMetrics:Rectangle =
>>>>>> CSSContainerUtils.getPaddingMetrics(host);
>>>>>> +			var borderMetrics:Rectangle =
>>>>>> CSSContainerUtils.getBorderMetrics(host);
>>>>>> +			
>>>>>> +			// adjust the host's usable size by the metrics. If
>>>>>> hostSizedToContent, then the
>>>>>> +			// resulting adjusted value may be less than zero.
>>>>>> +			hostWidth -= paddingMetrics.left + paddingMetrics.right +
>>>>>> borderMetrics.left + borderMetrics.right;
>>>>>> +			hostHeight -= paddingMetrics.top + paddingMetrics.bottom +
>>>>>> borderMetrics.top + borderMetrics.bottom;
>>>>>> +
>>>>>> +			var xpos:Number = borderMetrics.left + paddingMetrics.left;
>>>>>> +			var ypos:Number = borderMetrics.top + paddingMetrics.left;
>>>>>> +			var child:IUIBase;
>>>>>> +			var childHeight:Number;
>>>>>> +			var i:int;
>>>>>> +			var childYpos:Number;
>>>>>> +			var adjustLeft:Number = 0;
>>>>>> +			var adjustRight:Number = hostWidth + borderMetrics.left +
>>>>>> paddingMetrics.left;
>>>>>> +
>>>>>> +			// first work from left to right
>>>>>> +			for(i=0; i < n; i++)
>>>>>> +			{
>>>>>> +				child = contentView.getElementAt(i) as IUIBase;
>>>>>> +				if (child == null || !child.visible) continue;
>>>>>> +				if (child == actualChild) break;
>>>>>> +
>>>>>> +				margins = childMargins(child, hostWidth, hostHeight);
>>>>>> +				ilc = child as ILayoutChild;
>>>>>> +
>>>>>> +				xpos += margins.left;
>>>>>> +
>>>>>> +				childYpos = ypos + margins.top; // default y position
>>>>>> +
>>>>>> +				childHeight = child.height;
>>>>>> +				if (ilc != null)
>>>>>> +				{
>>>>>> +					if (!isNaN(ilc.percentHeight)) {
>>>>>> +						childHeight = host.height * ilc.percentHeight/100.0;
>>>>>> +					}
>>>>>> +					else if (isNaN(ilc.explicitHeight)) {
>>>>>> +						childHeight = host.height;
>>>>>> +					}
>>>>>> +					ilc.setHeight(childHeight);
>>>>>> +				}
>>>>>> +
>>>>>> +				if (ilc) {
>>>>>> +					ilc.setX(xpos);
>>>>>> +					ilc.setY(childYpos);
>>>>>> +
>>>>>> +					if (!isNaN(ilc.percentWidth)) {
>>>>>> +						ilc.setWidth(hostWidth * ilc.percentWidth / 100);
>>>>>> +					}
>>>>>> +
>>>>>> +				} else {
>>>>>> +					child.x = xpos;
>>>>>> +					child.y = childYpos;
>>>>>> +				}
>>>>>> +
>>>>>> +				xpos += child.width + margins.right;
>>>>>> +				adjustLeft = xpos;
>>>>>> +			}
>>>>>> +
>>>>>> +			// then work from right to left
>>>>>> +			xpos = hostWidth + borderMetrics.left + paddingMetrics.left;
>>>>>> +
>>>>>> +			for(i=(n-1); actualChild != null && i >= 0; i--)
>>>>>> +			{
>>>>>> +				child = contentView.getElementAt(i) as IUIBase;
>>>>>> +				if (child == null || !child.visible) continue;
>>>>>> +				if (child == actualChild) break;
>>>>>> +
>>>>>> +				margins = childMargins(child, hostWidth, hostHeight);
>>>>>> +				ilc = child as ILayoutChild;
>>>>>> +
>>>>>> +				childYpos = ypos + margins.top; // default y position
>>>>>> +
>>>>>> +				childHeight = child.height;
>>>>>> +				if (ilc != null)
>>>>>> +				{
>>>>>> +					if (!isNaN(ilc.percentHeight)) {
>>>>>> +						childHeight = host.height * ilc.percentHeight/100.0;
>>>>>> +					}
>>>>>> +					else if (isNaN(ilc.explicitHeight)) {
>>>>>> +						childHeight = host.height;
>>>>>> +					}
>>>>>> +					ilc.setHeight(childHeight);
>>>>>> +				}
>>>>>> +
>>>>>> +				if (ilc) {
>>>>>> +					if (!isNaN(ilc.percentWidth)) {
>>>>>> +						ilc.setWidth(hostWidth * ilc.percentWidth / 100);
>>>>>> +					}
>>>>>> +				}
>>>>>> +
>>>>>> +				xpos -= child.width + margins.right;
>>>>>> +
>>>>>> +				if (ilc) {
>>>>>> +					ilc.setX(xpos);
>>>>>> +					ilc.setY(childYpos);
>>>>>> +				} else {
>>>>>> +					child.x = xpos;
>>>>>> +					child.y = childYpos;
>>>>>> +				}
>>>>>> +
>>>>>> +				xpos -= margins.left;
>>>>>> +				adjustRight = xpos;
>>>>>> +			}
>>>>>> +
>>>>>> +			// now adjust the actualChild to fill the space.
>>>>>> +			if (actualChild != null) {
>>>>>> +				margins = childMargins(actualChild, hostWidth, hostHeight);
>>>>>> +				ilc = actualChild as ILayoutChild;
>>>>>> +				childHeight = actualChild.height;
>>>>>> +				if (ilc != null)
>>>>>> +				{
>>>>>> +					if (!isNaN(ilc.percentHeight)) {
>>>>>> +						childHeight = host.height * ilc.percentHeight/100.0;
>>>>>> +					}
>>>>>> +					else if (isNaN(ilc.explicitHeight)) {
>>>>>> +						childHeight = host.height;
>>>>>> +					}
>>>>>> +					ilc.setHeight(childHeight);
>>>>>> +				}
>>>>>> +				childYpos = ypos + margins.top;
>>>>>> +				actualChild.x = adjustLeft + margins.left;
>>>>>> +				actualChild.y = childYpos;
>>>>>> +				if (ilc) {
>>>>>> +					ilc.setWidth((adjustRight-margins.right) -
>>>>>> (adjustLeft+margins.left));
>>>>>> +				} else {
>>>>>> +					actualChild.width = (adjustRight-margins.right) -
>>>>>> (adjustLeft+margins.left);
>>>>>> +				}
>>>>>> +			}
>>>>>> +
>>>>>> +            return true;
>>>>>> +		}
>>>>>> +
>>>>>> +        public function setDocument(document:Object, id:String =
>>>>>> null):void
>>>>>> +        {
>>>>>> +            this.document = document;
>>>>>> +        }
>>>>>> +
>>>>>> +    }
>>>>>> +
>>>>>> +}
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-w
>>>>>>ip
>>>>>> -u
>>>>>> 
>>>>>> 
>>>>>>s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2Fbdd34d2e%2Fframeworks
>>>>>>%2
>>>>>> Fp
>>>>>> 
>>>>>> 
>>>>>>rojects%2FBasic%2Fsrc%2Fmain%2Fflex%2Forg%2Fapache%2Fflex%2Fhtml%2Fbe
>>>>>>ad
>>>>>> s%
>>>>>> 
>>>>>> 
>>>>>>2Flayouts%2FOneFlexibleChildHorizontalLayoutLockChildHeight.as&data=0
>>>>>>2%
>>>>>> 7C
>>>>>> 
>>>>>> 
>>>>>>01%7C%7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178
>>>>>>de
>>>>>> ce
>>>>>> 
>>>>>> 
>>>>>>e1%7C0%7C0%7C636370058818766511&sdata=Ir1Siye21IUzzijpvWA1XmQN0AbHktL
>>>>>>u%
>>>>>> 2F
>>>>>> u3h%2BRtBZT0%3D&reserved=0
>>>>>> 
>>>>>>---------------------------------------------------------------------
>>>>>>-
>>>>>> diff --git 
>>>>>> 
>>>>>> 
>>>>>>a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/
>>>>>>la
>>>>>> yo
>>>>>> uts/OneFlexibleChildHorizontalLayoutLockChildHeight.as
>>>>>> 
>>>>>> 
>>>>>>b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/
>>>>>>la
>>>>>> yo
>>>>>> uts/OneFlexibleChildHorizontalLayoutLockChildHeight.as
>>>>>> deleted file mode 100644
>>>>>> index d170d23..0000000
>>>>>> --- 
>>>>>> 
>>>>>> 
>>>>>>a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/
>>>>>>la
>>>>>> yo
>>>>>> uts/OneFlexibleChildHorizontalLayoutLockChildHeight.as
>>>>>> +++ /dev/null
>>>>>> @@ -1,91 +0,0 @@
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>>-////////////////////////////////////////////////////////////////////
>>>>>>//
>>>>>> //
>>>>>> ////////
>>>>>> -//
>>>>>> -//  Licensed to the Apache Software Foundation (ASF) under one or
>>>>>> more
>>>>>> -//  contributor license agreements.  See the NOTICE file
>>>>>>distributed
>>>>>> with
>>>>>> -//  this work for additional information regarding copyright
>>>>>> ownership.
>>>>>> -//  The ASF licenses this file to You under the Apache License,
>>>>>> Version 2.0
>>>>>> -//  (the "License"); you may not use this file except in compliance
>>>>>> with
>>>>>> -//  the License.  You may obtain a copy of the License at
>>>>>> -//
>>>>>> -//      
>>>>>> 
>>>>>> 
>>>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.a
>>>>>>pa
>>>>>> ch
>>>>>> 
>>>>>> 
>>>>>>e.org%2Flicenses%2FLICENSE-2.0&data=02%7C01%7C%7C699bbb170b2c4f0bf3ae
>>>>>>08
>>>>>> d4
>>>>>> 
>>>>>> 
>>>>>>d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636370058818766
>>>>>>51
>>>>>> 1&
>>>>>> sdata=bButr5xXaczhl741iZvjXub0l1B72d%2FvImajqD7mvyA%3D&reserved=0
>>>>>> -//
>>>>>> -//  Unless required by applicable law or agreed to in writing,
>>>>>> software
>>>>>> -//  distributed under the License is distributed on an "AS IS"
>>>>>>BASIS,
>>>>>> -//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>>>> implied.
>>>>>> -//  See the License for the specific language governing permissions
>>>>>> and
>>>>>> -//  limitations under the License.
>>>>>> -//
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>>-////////////////////////////////////////////////////////////////////
>>>>>>//
>>>>>> //
>>>>>> ////////
>>>>>> -package org.apache.flex.html.beads.layouts
>>>>>> -{
>>>>>> -	import org.apache.flex.core.LayoutBase;
>>>>>> -	import org.apache.flex.core.IDocument;
>>>>>> -	import org.apache.flex.core.ILayoutChild;
>>>>>> -	import org.apache.flex.core.ILayoutHost;
>>>>>> -	import org.apache.flex.core.ILayoutView;
>>>>>> -	import org.apache.flex.core.ILayoutParent;
>>>>>> -	import org.apache.flex.core.IParentIUIBase;
>>>>>> -	import org.apache.flex.core.IStrand;
>>>>>> -	import org.apache.flex.core.IUIBase;
>>>>>> -	import org.apache.flex.core.ValuesManager;
>>>>>> -	import org.apache.flex.core.UIBase;
>>>>>> -	import org.apache.flex.events.Event;
>>>>>> -	import org.apache.flex.geom.Rectangle;
>>>>>> -	import org.apache.flex.utils.CSSContainerUtils;
>>>>>> -	import org.apache.flex.utils.CSSUtils;
>>>>>> -
>>>>>> -    /**
>>>>>> -     *  The OneFlexibleChildHorizontalLayoutLockChildHeight
>>>>>> -	 *  is a subclass of OneFlexibleChildHorizontalLayout
>>>>>> -	 *  that sets the flexible child's height to be the height
>>>>>> -	 *  of the host container.  This is useful when you
>>>>>> -	 *  don't want the actual child's height to dictate the
>>>>>> -	 *  height of the container in order to force
>>>>>> -	 *  scrollbars
>>>>>> -     *
>>>>>> -     *  @langversion 3.0
>>>>>> -     *  @playerversion Flash 10.2
>>>>>> -     *  @playerversion AIR 2.6
>>>>>> -     *  @productversion FlexJS 0.0
>>>>>> -     */
>>>>>> -	public class OneFlexibleChildHorizontalLayoutLockChildHeight
>>>>>>extends
>>>>>> OneFlexibleChildHorizontalLayout
>>>>>> -	{
>>>>>> -        /**
>>>>>> -         *  Constructor.
>>>>>> -         *
>>>>>> -         *  @langversion 3.0
>>>>>> -         *  @playerversion Flash 10.2
>>>>>> -         *  @playerversion AIR 2.6
>>>>>> -         *  @productversion FlexJS 0.0
>>>>>> -         */
>>>>>> -		public function OneFlexibleChildHorizontalLayoutLockChildHeight()
>>>>>> -		{
>>>>>> -			super();
>>>>>> -		}
>>>>>> -
>>>>>> -        /**
>>>>>> -         * @copy org.apache.flex.core.IBeadLayout#layout
>>>>>> -         */
>>>>>> -		override public function layout():Boolean
>>>>>> -		{
>>>>>> -			var ret:Boolean = super.layout();
>>>>>> -			if (ret)
>>>>>> -			{
>>>>>> -				var contentView:ILayoutView = layoutView;
>>>>>> -	
>>>>>> -				var n:int = contentView.numElements;
>>>>>> -
>>>>>> -				var h:Number = host.height;
>>>>>> -				for(var i:int=0; i < n; i++) {
>>>>>> -					var child:UIBase = contentView.getElementAt(i) as UIBase;
>>>>>> -					if (child != actualChild)
>>>>>> -						h = child.height;
>>>>>> -				}
>>>>>> -				actualChild.setHeight(h);
>>>>>> -			}
>>>>>> -			return ret;
>>>>>> -		}
>>>>>> -
>>>>>> -    }
>>>>>> -
>>>>>> -}
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-w
>>>>>>ip
>>>>>> -u
>>>>>> 
>>>>>> 
>>>>>>s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2Fbdd34d2e%2Fframeworks
>>>>>>%2
>>>>>> Fp
>>>>>> 
>>>>>> 
>>>>>>rojects%2FBasic%2Fsrc%2Fmain%2Fflex%2Forg%2Fapache%2Fflex%2Fhtml%2Fbe
>>>>>>ad
>>>>>> s%
>>>>>> 
>>>>>> 
>>>>>>2Flayouts%2FOneFlexibleChildVerticalLayoutForOverflow.as&data=02%7C01
>>>>>>%7
>>>>>> C%
>>>>>> 
>>>>>> 
>>>>>>7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee1
>>>>>>%7
>>>>>> C0
>>>>>> 
>>>>>> 
>>>>>>%7C0%7C636370058818766511&sdata=WdJnx6IGbPwIxUibKB3UqfKTHgHugWIleqBVs
>>>>>>qJ
>>>>>> 5f
>>>>>> eE%3D&reserved=0
>>>>>> 
>>>>>>---------------------------------------------------------------------
>>>>>>-
>>>>>> diff --git 
>>>>>> 
>>>>>> 
>>>>>>a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/
>>>>>>la
>>>>>> yo
>>>>>> uts/OneFlexibleChildVerticalLayoutForOverflow.as
>>>>>> 
>>>>>> 
>>>>>>b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/
>>>>>>la
>>>>>> yo
>>>>>> uts/OneFlexibleChildVerticalLayoutForOverflow.as
>>>>>> new file mode 100644
>>>>>> index 0000000..5679f80
>>>>>> --- /dev/null
>>>>>> +++ 
>>>>>> 
>>>>>> 
>>>>>>b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/
>>>>>>la
>>>>>> yo
>>>>>> uts/OneFlexibleChildVerticalLayoutForOverflow.as
>>>>>> @@ -0,0 +1,291 @@
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>>+////////////////////////////////////////////////////////////////////
>>>>>>//
>>>>>> //
>>>>>> ////////
>>>>>> +//
>>>>>> +//  Licensed to the Apache Software Foundation (ASF) under one or
>>>>>> more
>>>>>> +//  contributor license agreements.  See the NOTICE file
>>>>>>distributed
>>>>>> with
>>>>>> +//  this work for additional information regarding copyright
>>>>>> ownership.
>>>>>> +//  The ASF licenses this file to You under the Apache License,
>>>>>> Version 2.0
>>>>>> +//  (the "License"); you may not use this file except in compliance
>>>>>> with
>>>>>> +//  the License.  You may obtain a copy of the License at
>>>>>> +//
>>>>>> +//      
>>>>>> 
>>>>>> 
>>>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.a
>>>>>>pa
>>>>>> ch
>>>>>> 
>>>>>> 
>>>>>>e.org%2Flicenses%2FLICENSE-2.0&data=02%7C01%7C%7C699bbb170b2c4f0bf3ae
>>>>>>08
>>>>>> d4
>>>>>> 
>>>>>> 
>>>>>>d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636370058818766
>>>>>>51
>>>>>> 1&
>>>>>> sdata=bButr5xXaczhl741iZvjXub0l1B72d%2FvImajqD7mvyA%3D&reserved=0
>>>>>> +//
>>>>>> +//  Unless required by applicable law or agreed to in writing,
>>>>>> software
>>>>>> +//  distributed under the License is distributed on an "AS IS"
>>>>>>BASIS,
>>>>>> +//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>>>> implied.
>>>>>> +//  See the License for the specific language governing permissions
>>>>>> and
>>>>>> +//  limitations under the License.
>>>>>> +//
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>>+////////////////////////////////////////////////////////////////////
>>>>>>//
>>>>>> //
>>>>>> ////////
>>>>>> +package org.apache.flex.html.beads.layouts
>>>>>> +{
>>>>>> +	import org.apache.flex.core.LayoutBase;
>>>>>> +	import org.apache.flex.core.IDocument;
>>>>>> +	import org.apache.flex.core.ILayoutChild;
>>>>>> +	import org.apache.flex.core.ILayoutHost;
>>>>>> +	import org.apache.flex.core.ILayoutView;
>>>>>> +	import org.apache.flex.core.ILayoutParent;
>>>>>> +	import org.apache.flex.core.IParentIUIBase;
>>>>>> +	import org.apache.flex.core.IStrand;
>>>>>> +	import org.apache.flex.core.IStyleableObject;
>>>>>> +	import org.apache.flex.core.IUIBase;
>>>>>> +	import org.apache.flex.core.ValuesManager;
>>>>>> +	import org.apache.flex.core.UIBase;
>>>>>> +	import org.apache.flex.events.Event;
>>>>>> +	import org.apache.flex.geom.Rectangle;
>>>>>> +	import org.apache.flex.utils.CSSContainerUtils;
>>>>>> +	import org.apache.flex.utils.CSSUtils;
>>>>>> +
>>>>>> +    /**
>>>>>> +     *  The OneFlexibleChildVerticalLayoutForOverflow is
>>>>>> +	 *  intended for building apps that clip
>>>>>> +	 *  and/or scroll the overflow, especially in a
>>>>>> +	 *  3-pane view like the ASDoc examples.  It does not use
>>>>>> +	 *  FlexBox because FlexBox wants to grow to the size
>>>>>> +	 *  of the content without specifying width/height on
>>>>>> +	 *  the flexible child.  But then the children in
>>>>>> +	 *  the flexible child cannot use % sizing.
>>>>>> +	 *  This layout presumes the parent is a known size.
>>>>>> +     *
>>>>>> +     *  @langversion 3.0
>>>>>> +     *  @playerversion Flash 10.2
>>>>>> +     *  @playerversion AIR 2.6
>>>>>> +     *  @productversion FlexJS 0.0
>>>>>> +     */
>>>>>> +	public class OneFlexibleChildVerticalLayoutForOverflow extends
>>>>>> LayoutBase implements IOneFlexibleChildLayout, IDocument
>>>>>> +	{
>>>>>> +        /**
>>>>>> +         *  Constructor.
>>>>>> +         *
>>>>>> +         *  @langversion 3.0
>>>>>> +         *  @playerversion Flash 10.2
>>>>>> +         *  @playerversion AIR 2.6
>>>>>> +         *  @productversion FlexJS 0.0
>>>>>> +         */
>>>>>> +		public function OneFlexibleChildVerticalLayoutForOverflow()
>>>>>> +		{
>>>>>> +			super();
>>>>>> +		}
>>>>>> +
>>>>>> +        private var _flexibleChild:String;
>>>>>> +
>>>>>> +        protected var actualChild:ILayoutChild;
>>>>>> +
>>>>>> +        /**
>>>>>> +         *  @private
>>>>>> +         *  The document.
>>>>>> +         */
>>>>>> +        private var document:Object;
>>>>>> +
>>>>>> +		/**
>>>>>> +		 *  The id of the flexible child
>>>>>> +		 *
>>>>>> +		 *  @langversion 3.0
>>>>>> +		 *  @playerversion Flash 10.2
>>>>>> +		 *  @playerversion AIR 2.6
>>>>>> +		 *  @productversion FlexJS 0.0
>>>>>> +		 */
>>>>>> +		public function get flexibleChild():String
>>>>>> +		{
>>>>>> +			return _flexibleChild;
>>>>>> +		}
>>>>>> +
>>>>>> +		/**
>>>>>> +		 * @private
>>>>>> +		 */
>>>>>> +		public function set flexibleChild(value:String):void
>>>>>> +		{
>>>>>> +			_flexibleChild = value;
>>>>>> +		}
>>>>>> +
>>>>>> +        /**
>>>>>> +         * @copy org.apache.flex.core.IBeadLayout#layout
>>>>>> +         */
>>>>>> +		COMPILE::JS
>>>>>> +		override public function layout():Boolean
>>>>>> +		{
>>>>>> +			var contentView:ILayoutView = layoutView;
>>>>>> +
>>>>>> +			actualChild = document[flexibleChild];
>>>>>> +
>>>>>> +			var n:int = contentView.numElements;
>>>>>> +			if (n == 0) return false;
>>>>>> +
>>>>>> +			for(var i:int=0; i < n; i++) {
>>>>>> +				var child:UIBase = contentView.getElementAt(i) as UIBase;
>>>>>> +				if (child.element.style["display"] != "flex" &&
>>>>>> child.element.style["display"] != "none")
>>>>>> +					child.element.style["display"] = "block";
>>>>>> +			}
>>>>>> +
>>>>>> +			var h:Number = host.height;
>>>>>> +			for(i=0; i < n; i++) {
>>>>>> +				child = contentView.getElementAt(i) as UIBase;
>>>>>> +				if (child != actualChild)
>>>>>> +					h -= child.height;
>>>>>> +			}
>>>>>> +			actualChild.height = h;
>>>>>> +					
>>>>>> +			return true;
>>>>>> +		}
>>>>>> +
>>>>>> +		COMPILE::SWF
>>>>>> +		override public function layout():Boolean
>>>>>> +		{
>>>>>> +			var contentView:ILayoutView = layoutView;
>>>>>> +			actualChild = document.hasOwnProperty(flexibleChild) ?
>>>>>> document[flexibleChild] : null;
>>>>>> +
>>>>>> +			var n:Number = contentView.numElements;
>>>>>> +			if (n == 0) return false;
>>>>>> +			
>>>>>> +			var maxWidth:Number = 0;
>>>>>> +			var maxHeight:Number = 0;
>>>>>> +			var hostSizedToContent:Boolean = host.isWidthSizedToContent();
>>>>>> +			var hostWidth:Number = host.width;
>>>>>> +			var hostHeight:Number = host.height;
>>>>>> +
>>>>>> +			var ilc:ILayoutChild;
>>>>>> +			var data:Object;
>>>>>> +			var canAdjust:Boolean = false;
>>>>>> +			var margins:Object;
>>>>>> +
>>>>>> +			var paddingMetrics:Rectangle =
>>>>>> CSSContainerUtils.getPaddingMetrics(host);
>>>>>> +			var borderMetrics:Rectangle =
>>>>>> CSSContainerUtils.getBorderMetrics(host);
>>>>>> +			
>>>>>> +			// adjust the host's usable size by the metrics. If
>>>>>> hostSizedToContent, then the
>>>>>> +			// resulting adjusted value may be less than zero.
>>>>>> +			hostWidth -= paddingMetrics.left + paddingMetrics.right +
>>>>>> borderMetrics.left + borderMetrics.right;
>>>>>> +			hostHeight -= paddingMetrics.top + paddingMetrics.bottom +
>>>>>> borderMetrics.top + borderMetrics.bottom;
>>>>>> +
>>>>>> +			var xpos:Number = borderMetrics.left + paddingMetrics.left;
>>>>>> +			var ypos:Number = borderMetrics.top + paddingMetrics.left;
>>>>>> +			var child:IUIBase;
>>>>>> +			var childWidth:Number;
>>>>>> +			var i:int;
>>>>>> +			var childXpos:Number;
>>>>>> +			var adjustTop:Number = 0;
>>>>>> +			var adjustBottom:Number = hostHeight + borderMetrics.top +
>>>>>> paddingMetrics.top;
>>>>>> +
>>>>>> +			// first work from top to bottom
>>>>>> +			for(i=0; i < n; i++)
>>>>>> +			{
>>>>>> +				child = contentView.getElementAt(i) as IUIBase;
>>>>>> +				if (child == null || !child.visible) continue;
>>>>>> +				if (child == actualChild) break;
>>>>>> +
>>>>>> +				margins = childMargins(child, hostWidth, hostHeight);
>>>>>> +				ilc = child as ILayoutChild;
>>>>>> +
>>>>>> +				ypos += margins.top;
>>>>>> +
>>>>>> +				childXpos = xpos + margins.left; // default x position
>>>>>> +
>>>>>> +				childWidth = child.width;
>>>>>> +				if (ilc != null)
>>>>>> +				{
>>>>>> +					if (!isNaN(ilc.percentWidth)) {
>>>>>> +						childWidth = hostWidth * ilc.percentWidth/100.0;
>>>>>> +					}
>>>>>> +					else if (isNaN(ilc.explicitWidth)) {
>>>>>> +						childWidth = hostWidth;
>>>>>> +					}
>>>>>> +					ilc.setWidth(childWidth);
>>>>>> +				}
>>>>>> +
>>>>>> +				if (ilc) {
>>>>>> +					ilc.setX(childXpos);
>>>>>> +					ilc.setY(ypos);
>>>>>> +
>>>>>> +					if (!isNaN(ilc.percentHeight)) {
>>>>>> +						ilc.setHeight(hostHeight * ilc.percentHeight / 100);
>>>>>> +					}
>>>>>> +
>>>>>> +				} else {
>>>>>> +					child.x = childXpos;
>>>>>> +					child.y = ypos;
>>>>>> +				}
>>>>>> +
>>>>>> +				ypos += child.height + margins.bottom;
>>>>>> +				adjustTop = ypos;
>>>>>> +			}
>>>>>> +
>>>>>> +			// then work from bottom to top
>>>>>> +			ypos = hostHeight + borderMetrics.top + paddingMetrics.top;
>>>>>> +
>>>>>> +			for(i=(n-1); actualChild != null && i >= 0; i--)
>>>>>> +			{
>>>>>> +				child = contentView.getElementAt(i) as IUIBase;
>>>>>> +				if (child == null || !child.visible) continue;
>>>>>> +				if (child == actualChild) break;
>>>>>> +
>>>>>> +				margins = childMargins(child, hostWidth, hostHeight);
>>>>>> +				ilc = child as ILayoutChild;
>>>>>> +
>>>>>> +				childXpos = xpos + margins.left; // default x position
>>>>>> +
>>>>>> +				childWidth = child.width;
>>>>>> +				if (ilc != null)
>>>>>> +				{
>>>>>> +					if (!isNaN(ilc.percentWidth)) {
>>>>>> +						childWidth = hostWidth * ilc.percentWidth/100.0;
>>>>>> +					}
>>>>>> +					else if (isNaN(ilc.explicitWidth)) {
>>>>>> +						childWidth = hostWidth;
>>>>>> +					}
>>>>>> +					ilc.setWidth(childWidth);
>>>>>> +				}
>>>>>> +
>>>>>> +				if (ilc) {
>>>>>> +					if (!isNaN(ilc.percentHeight)) {
>>>>>> +						ilc.setHeight(hostHeight * ilc.percentHeight / 100);
>>>>>> +					}
>>>>>> +				}
>>>>>> +
>>>>>> +				ypos -= child.height + margins.bottom;
>>>>>> +
>>>>>> +				if (ilc) {
>>>>>> +					ilc.setX(childXpos);
>>>>>> +					ilc.setY(ypos);
>>>>>> +				} else {
>>>>>> +					child.x = childXpos;
>>>>>> +					child.y = ypos;
>>>>>> +				}
>>>>>> +
>>>>>> +				ypos -= margins.top;
>>>>>> +				adjustBottom = ypos;
>>>>>> +			}
>>>>>> +
>>>>>> +			// now adjust the actualChild to fill the space.
>>>>>> +			if (actualChild != null) {
>>>>>> +				margins = childMargins(actualChild, hostWidth, hostHeight);
>>>>>> +				ilc = actualChild as ILayoutChild;
>>>>>> +				childWidth = actualChild.width;
>>>>>> +				if (ilc != null)
>>>>>> +				{
>>>>>> +					if (!isNaN(ilc.percentWidth)) {
>>>>>> +						childWidth = hostWidth * ilc.percentWidth/100.0;
>>>>>> +					}
>>>>>> +					else if (isNaN(ilc.explicitWidth)) {
>>>>>> +						childWidth = hostWidth;
>>>>>> +					}
>>>>>> +					ilc.setWidth(childWidth);
>>>>>> +				}
>>>>>> +				childXpos = xpos + margins.left;
>>>>>> +					
>>>>>> +				actualChild.x = childXpos
>>>>>> +				actualChild.y = adjustTop + margins.top;
>>>>>> +				if (ilc) {
>>>>>> +					ilc.setHeight((adjustBottom-margins.bottom) -
>>>>>> (adjustTop+margins.top));
>>>>>> +				} else {
>>>>>> +					actualChild.height = (adjustBottom-margins.bottom) -
>>>>>> (adjustTop+margins.top);
>>>>>> +				}
>>>>>> +			}
>>>>>> +
>>>>>> +			return true;
>>>>>> +		}
>>>>>> +
>>>>>> +        public function setDocument(document:Object, id:String =
>>>>>> null):void
>>>>>> +        {
>>>>>> +            this.document = document;
>>>>>> +        }
>>>>>> +    }
>>>>>> +
>>>>>> +}
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-w
>>>>>>ip
>>>>>> -u
>>>>>> 
>>>>>> 
>>>>>>s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2Fbdd34d2e%2Fframeworks
>>>>>>%2
>>>>>> Fp
>>>>>> 
>>>>>> 
>>>>>>rojects%2FBasic%2Fsrc%2Fmain%2Fflex%2Forg%2Fapache%2Fflex%2Fhtml%2Fbe
>>>>>>ad
>>>>>> s%
>>>>>> 
>>>>>> 
>>>>>>2Flayouts%2FOneFlexibleChildVerticalLayoutLockChildWidth.as&data=02%7
>>>>>>C0
>>>>>> 1%
>>>>>> 
>>>>>> 
>>>>>>7C%7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178dec
>>>>>>ee
>>>>>> 1%
>>>>>> 
>>>>>> 
>>>>>>7C0%7C0%7C636370058818766511&sdata=4Q4bkts0dp4wvvLUtu2yTYNg%2Fr7jS8bR
>>>>>>t4
>>>>>> co
>>>>>> 3nYbPKc%3D&reserved=0
>>>>>> 
>>>>>>---------------------------------------------------------------------
>>>>>>-
>>>>>> diff --git 
>>>>>> 
>>>>>> 
>>>>>>a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/
>>>>>>la
>>>>>> yo
>>>>>> uts/OneFlexibleChildVerticalLayoutLockChildWidth.as
>>>>>> 
>>>>>> 
>>>>>>b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/
>>>>>>la
>>>>>> yo
>>>>>> uts/OneFlexibleChildVerticalLayoutLockChildWidth.as
>>>>>> deleted file mode 100644
>>>>>> index 7415299..0000000
>>>>>> --- 
>>>>>> 
>>>>>> 
>>>>>>a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/
>>>>>>la
>>>>>> yo
>>>>>> uts/OneFlexibleChildVerticalLayoutLockChildWidth.as
>>>>>> +++ /dev/null
>>>>>> @@ -1,93 +0,0 @@
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>>-////////////////////////////////////////////////////////////////////
>>>>>>//
>>>>>> //
>>>>>> ////////
>>>>>> -//
>>>>>> -//  Licensed to the Apache Software Foundation (ASF) under one or 
>>>>>> more
>>>>>> -//  contributor license agreements.  See the NOTICE file 
>>>>>>distributed
>>>>>> with
>>>>>> -//  this work for additional information regarding copyright 
>>>>>> ownership.
>>>>>> -//  The ASF licenses this file to You under the Apache License,
>>>>>> Version 2.0
>>>>>> -//  (the "License"); you may not use this file except in compliance
>>>>>> with
>>>>>> -//  the License.  You may obtain a copy of the License at
>>>>>> -//
>>>>>> -//      
>>>>>> 
>>>>>> 
>>>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.a
>>>>>>pa
>>>>>> ch
>>>>>> 
>>>>>> 
>>>>>>e.org%2Flicenses%2FLICENSE-2.0&data=02%7C01%7C%7C699bbb170b2c4f0bf3ae
>>>>>>08
>>>>>> d4
>>>>>> 
>>>>>> 
>>>>>>d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636370058818766
>>>>>>51
>>>>>> 1&
>>>>>> sdata=bButr5xXaczhl741iZvjXub0l1B72d%2FvImajqD7mvyA%3D&reserved=0
>>>>>> -//
>>>>>> -//  Unless required by applicable law or agreed to in writing, 
>>>>>> software
>>>>>> -//  distributed under the License is distributed on an "AS IS" 
>>>>>>BASIS,
>>>>>> -//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 
>>>>>>or 
>>>>>> implied.
>>>>>> -//  See the License for the specific language governing 
>>>>>>permissions 
>>>>>> and
>>>>>> -//  limitations under the License.
>>>>>> -//
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>>-////////////////////////////////////////////////////////////////////
>>>>>>//
>>>>>> //
>>>>>> ////////
>>>>>> -package org.apache.flex.html.beads.layouts
>>>>>> -{
>>>>>> -	import org.apache.flex.core.LayoutBase;
>>>>>> -	import org.apache.flex.core.IDocument;
>>>>>> -	import org.apache.flex.core.ILayoutChild;
>>>>>> -	import org.apache.flex.core.ILayoutHost;
>>>>>> -	import org.apache.flex.core.ILayoutView;
>>>>>> -	import org.apache.flex.core.ILayoutParent;
>>>>>> -	import org.apache.flex.core.IParentIUIBase;
>>>>>> -	import org.apache.flex.core.IStrand;
>>>>>> -	import org.apache.flex.core.IStyleableObject;
>>>>>> -	import org.apache.flex.core.IUIBase;
>>>>>> -	import org.apache.flex.core.ValuesManager;
>>>>>> -	import org.apache.flex.core.UIBase;
>>>>>> -	import org.apache.flex.events.Event;
>>>>>> -	import org.apache.flex.geom.Rectangle;
>>>>>> -	import org.apache.flex.utils.CSSContainerUtils;
>>>>>> -	import org.apache.flex.utils.CSSUtils;
>>>>>> -
>>>>>> -    /**
>>>>>> -     *  The OneFlexibleChildHorizontalLayoutLockChildHeight 
>>>>>> -	 *  is a subclass of OneFlexibleChildHorizontalLayout
>>>>>> -	 *  that sets the flexible child's height to be the height
>>>>>> -	 *  of the host container.  This is useful when you
>>>>>> -	 *  don't want the actual child's height to dictate the
>>>>>> -	 *  height of the container in order to force
>>>>>> -	 *  scrollbars or line wrapping.
>>>>>> -     *
>>>>>> -     *  @langversion 3.0
>>>>>> -     *  @playerversion Flash 10.2
>>>>>> -     *  @playerversion AIR 2.6
>>>>>> -     *  @productversion FlexJS 0.0
>>>>>> -     */
>>>>>> -	public class OneFlexibleChildVerticalLayoutLockChildWidth extends 
>>>>>> OneFlexibleChildVerticalLayout
>>>>>> -	{
>>>>>> -        /**
>>>>>> -         *  Constructor.
>>>>>> -         *
>>>>>> -         *  @langversion 3.0
>>>>>> -         *  @playerversion Flash 10.2
>>>>>> -         *  @playerversion AIR 2.6
>>>>>> -         *  @productversion FlexJS 0.0
>>>>>> -         */
>>>>>> -		public function OneFlexibleChildVerticalLayoutLockChildWidth()
>>>>>> -		{
>>>>>> -			super();
>>>>>> -		}
>>>>>> -
>>>>>> -        /**
>>>>>> -         * @copy org.apache.flex.core.IBeadLayout#layout
>>>>>> -         */
>>>>>> -		override public function layout():Boolean
>>>>>> -		{
>>>>>> -			var ret:Boolean = super.layout();
>>>>>> -			if (ret)
>>>>>> -			{
>>>>>> -				var contentView:ILayoutView = layoutView;
>>>>>> -	
>>>>>> -				var n:int = contentView.numElements;
>>>>>> -
>>>>>> -				var w:Number = host.width;
>>>>>> -				for(var i:int=0; i < n; i++) {
>>>>>> -					var child:UIBase = contentView.getElementAt(i) as UIBase;
>>>>>> -					if (child != actualChild)
>>>>>> -						w = child.width;
>>>>>> -				}
>>>>>> -				
>>>>>> -				actualChild.setWidth(w); 
>>>>>> -			}
>>>>>> -			return ret;
>>>>>> -		}
>>>>>> -
>>>>>> -    }
>>>>>> -
>>>>>> -}
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-w
>>>>>>ip
>>>>>> -u
>>>>>> 
>>>>>> 
>>>>>>s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2Fbdd34d2e%2Fframeworks
>>>>>>%2
>>>>>> Fp
>>>>>> 
>>>>>> 
>>>>>>rojects%2FBasic%2Fsrc%2Fmain%2Fresources%2Fbasic-manifest.xml&data=02
>>>>>>%7
>>>>>> C0
>>>>>> 
>>>>>> 
>>>>>>1%7C%7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178d
>>>>>>ec
>>>>>> ee
>>>>>> 
>>>>>> 
>>>>>>1%7C0%7C0%7C636370058818766511&sdata=mPldYCuDfp%2BxQ4QROdu4BWSl3Dh7HP
>>>>>>19
>>>>>> VX
>>>>>> BR3B3IXOg%3D&reserved=0
>>>>>> 
>>>>>>---------------------------------------------------------------------
>>>>>>-
>>>>>> diff --git 
>>>>>> a/frameworks/projects/Basic/src/main/resources/basic-manifest.xml 
>>>>>> b/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
>>>>>> index 7cbc05d..09bb1a3 100644
>>>>>> --- 
>>>>>>a/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
>>>>>> +++ 
>>>>>>b/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
>>>>>> @@ -150,8 +150,8 @@
>>>>>>   <component id="FlexibleFirstChildHorizontalLayout" 
>>>>>> 
>>>>>> 
>>>>>>class="org.apache.flex.html.beads.layouts.FlexibleFirstChildHorizonta
>>>>>>lL
>>>>>> ay
>>>>>> out"/>
>>>>>>   <component id="OneFlexibleChildVerticalLayout" 
>>>>>> 
>>>>>> 
>>>>>>class="org.apache.flex.html.beads.layouts.OneFlexibleChildVerticalLay
>>>>>>ou
>>>>>> t"
>>>>>> />
>>>>>>   <component id="OneFlexibleChildHorizontalLayout" 
>>>>>> 
>>>>>> 
>>>>>>class="org.apache.flex.html.beads.layouts.OneFlexibleChildHorizontalL
>>>>>>ay
>>>>>> ou
>>>>>> t"/>
>>>>>> -    <component id="OneFlexibleChildVerticalLayoutLockChildWidth" 
>>>>>> 
>>>>>> 
>>>>>>class="org.apache.flex.html.beads.layouts.OneFlexibleChildVerticalLay
>>>>>>ou
>>>>>> tL
>>>>>> ockChildWidth"/>
>>>>>> -    <component 
>>>>>>id="OneFlexibleChildHorizontalLayoutLockChildHeight" 
>>>>>> 
>>>>>> 
>>>>>>class="org.apache.flex.html.beads.layouts.OneFlexibleChildHorizontalL
>>>>>>ay
>>>>>> ou
>>>>>> tLockChildHeight"/>
>>>>>> +    <component id="OneFlexibleChildVerticalLayoutForOverflow" 
>>>>>> 
>>>>>> 
>>>>>>class="org.apache.flex.html.beads.layouts.OneFlexibleChildVerticalLay
>>>>>>ou
>>>>>> tF
>>>>>> orOverflow"/>
>>>>>> +    <component id="OneFlexibleChildHorizontalLayoutForOverflow" 
>>>>>> 
>>>>>> 
>>>>>>class="org.apache.flex.html.beads.layouts.OneFlexibleChildHorizontalL
>>>>>>ay
>>>>>> ou
>>>>>> tForOverflow"/>
>>>>>>   <component id="MXMLBeadView" 
>>>>>> class="org.apache.flex.html.MXMLBeadView"/>
>>>>>> 
>>>>>>   <component id="SubAppLoader" 
>>>>>> class="org.apache.flex.html.SubAppLoader" />
>>>>>> 
>>>>> 
>>>> 
>>> 
>>> 
>> 
>
>


Re: [07/13] git commit: [flex-asjs] [refs/heads/release0.8.0] - give up on trying to use FlexBox for full-screen 3-pane views. FlexBox seems more happy stretching to content size instead of clipping at the computed flex-ed size. These custom layouts wi...

Posted by Harbs <ha...@gmail.com>.
I ran into the Safari problem in my app.

I needed to add code like this:

var info:BrowserInfo = BrowserInfo.current();
if(info.browser != "Safari" && info.formFactor.indexOf("iP") == -1){
	outerContainer.percentHeight = 100;
	leftResizeThumb.percentHeight = 100;
}

The components look something like this:

		<js:Container x="0" y="40" width="100%" id="dockAndOuterContainer" height="0%" style="align-items:stretch">
			<js:beads>
				<js:OneFlexibleChildHorizontalLayout flexibleChild="outerContainer"/>
			</js:beads>
			<components:LeftDock id="leftDock"/>
			<js:Group visible="false" id="leftResizeThumb">
			</js:Group>
			<js:Container id="outerContainer"/>
		</js:Container

Basically, all browsers except Safari and iOS browsers need to be set to 100%. Safari and iOS browsers CANNOT be set to 100%.

I’m not sure how to generalize this code…

I have it in three places in my app to make it behave correctly.

I’ve been meaning to bring up this issue on the dev@ list. Sorry I didn’t do it sooner… ;-)

Harbs

> On Sep 26, 2017, at 10:44 PM, Alex Harui <ah...@adobe.com.INVALID> wrote:
> 
> I just reverted ASDoc back to the "ForOverflow" layouts.  ASDoc was not
> showing up correctly for me (Safari).  Maybe flex-basis is handled
> differently on different browsers.  We can look into it more later.
> 
> Looking into this did make me glad we are changing over to "Royale" so
> "Flex" and "FlexJS" will not be confused with FlexBox and the flex-xxx
> attributes.
> 
> -Alex
> 
> On 7/31/17, 12:57 AM, "Harbs" <ha...@gmail.com> wrote:
> 
>> The only example I found was the ASDoc app.
>> 
>> I switched it and it appears to work. (I pushed my changes.)
>> 
>>> On Jul 31, 2017, at 7:35 AM, Alex Harui <ah...@adobe.com.INVALID>
>>> wrote:
>>> 
>>> It will either work in the examples that use it or it won't.  Try it and
>>> find out.
>>> 
>>> -Alex
>>> 
>>> On 7/30/17, 3:04 AM, "Harbs" <ha...@gmail.com> wrote:
>>> 
>>>> I think I just ran into the same issue.
>>>> 
>>>> This layout seems to more-or-less do the job, but it’s kind of heavy.
>>>> 
>>>> I did some research into flexbox and it appear that setting flex-basis
>>>> to
>>>> 0 does the job. It needs to be set on ONLY the one flexible child.
>>>> 
>>>> Here’s a codepen which shows a use case.
>>>> 
>>>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcodepen
>>>> .i
>>>> 
>>>> o%2Fjpdevries%2Fpen%2FoXxPOP&data=02%7C01%7C%7C699bbb170b2c4f0bf3ae08d4d
>>>> 73
>>>> 
>>>> 2638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636370058818766511&sd
>>>> at
>>>> a=tSTNYANFFiQ4DMGYbAZaz0dJ9qYDYpcwP2ZoSYRIcG8%3D&reserved=0
>>>> 
>>>> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcodepe
>>>> n.
>>>> 
>>>> io%2Fjpdevries%2Fpen%2FoXxPOP&data=02%7C01%7C%7C699bbb170b2c4f0bf3ae08d4
>>>> d7
>>>> 
>>>> 32638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636370058818766511&s
>>>> da
>>>> ta=tSTNYANFFiQ4DMGYbAZaz0dJ9qYDYpcwP2ZoSYRIcG8%3D&reserved=0>
>>>> 
>>>> I noticed that the OneFlexibleLayouts have code which set the
>>>> flex-basis
>>>> of the children if a percentage value is set. When setting the size of
>>>> the one flexible child to 0% this causes the flex-basis to be set to 0
>>>> and then the one flexible child will fit the remaining space even if it
>>>> might overflow because of its children.
>>>> 
>>>> I have wasted quite a bit of time before I discovered this. I’m not
>>>> sure
>>>> whether the OneFlexibleLayout classes should be changed, or maybe we
>>>> need
>>>> documentation that to fit content that might overflow, the percentage
>>>> should be set to 0. It could be there are cases where the entire
>>>> OnFlexibleLayout should be fit when smaller and expand (and not scroll)
>>>> when bigger. In that case, the current behavior might be correct.
>>>> 
>>>> Thoughts?
>>>> Harbs
>>>> 
>>>>> On May 23, 2017, at 10:16 AM, aharui@apache.org wrote:
>>>>> 
>>>>> give up on trying to use FlexBox for full-screen 3-pane views.
>>>>> FlexBox
>>>>> seems more happy stretching to content size instead of clipping at the
>>>>> computed flex-ed size.  These custom layouts will do the proper sizing
>>>>> 
>>>>> 
>>>>> Project: 
>>>>> 
>>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip
>>>>> -u
>>>>> 
>>>>> s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Frepo&data=02%7C01%7C%7C699bbb1
>>>>> 70
>>>>> 
>>>>> b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C63
>>>>> 63
>>>>> 
>>>>> 70058818766511&sdata=P%2FMkfZAwCYwpQEoCe5UGx8tW0mZaIZsMdDg6VxlaKWA%3D&r
>>>>> es
>>>>> erved=0
>>>>> Commit: 
>>>>> 
>>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip
>>>>> -u
>>>>> 
>>>>> s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fcommit%2Fbdd34d2e&data=02%7C01
>>>>> %7
>>>>> 
>>>>> C%7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee1
>>>>> %7
>>>>> 
>>>>> C0%7C0%7C636370058818766511&sdata=QosBAau8lE4nCS7c%2F8B6GDc%2Bqa%2BpSko
>>>>> P5
>>>>> 5x3oji5FnI%3D&reserved=0
>>>>> Tree: 
>>>>> 
>>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip
>>>>> -u
>>>>> 
>>>>> s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Ftree%2Fbdd34d2e&data=02%7C01%7
>>>>> C%
>>>>> 
>>>>> 7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7
>>>>> C0
>>>>> 
>>>>> %7C0%7C636370058818766511&sdata=T4CCqwtn%2FgFTmAnaI%2BuCXqtX0P75ebpKVZO
>>>>> xf
>>>>> XOTbIE%3D&reserved=0
>>>>> Diff: 
>>>>> 
>>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip
>>>>> -u
>>>>> 
>>>>> s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fdiff%2Fbdd34d2e&data=02%7C01%7
>>>>> C%
>>>>> 
>>>>> 7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7
>>>>> C0
>>>>> 
>>>>> %7C0%7C636370058818766511&sdata=f8WVJXc81KrLMuUgRckULYCfglNL7d%2BfdjSbB
>>>>> BU
>>>>> 0fRo%3D&reserved=0
>>>>> 
>>>>> Branch: refs/heads/release0.8.0
>>>>> Commit: bdd34d2ef4d8117fa1b222ac470482a42dbea9eb
>>>>> Parents: c505d67
>>>>> Author: Alex Harui <ah...@apache.org>
>>>>> Authored: Mon May 22 10:12:02 2017 -0700
>>>>> Committer: Alex Harui <ah...@apache.org>
>>>>> Committed: Tue May 23 00:15:56 2017 -0700
>>>>> 
>>>>> ----------------------------------------------------------------------
>>>>> ...eFlexibleChildHorizontalLayoutForOverflow.as | 290
>>>>> ++++++++++++++++++
>>>>> ...xibleChildHorizontalLayoutLockChildHeight.as |  91 ------
>>>>> ...OneFlexibleChildVerticalLayoutForOverflow.as | 291
>>>>> +++++++++++++++++++
>>>>> ...FlexibleChildVerticalLayoutLockChildWidth.as |  93 ------
>>>>> .../Basic/src/main/resources/basic-manifest.xml |   4 +-
>>>>> 5 files changed, 583 insertions(+), 186 deletions(-)
>>>>> ----------------------------------------------------------------------
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip
>>>>> -u
>>>>> 
>>>>> s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2Fbdd34d2e%2Fframeworks%2
>>>>> Fp
>>>>> 
>>>>> rojects%2FBasic%2Fsrc%2Fmain%2Fflex%2Forg%2Fapache%2Fflex%2Fhtml%2Fbead
>>>>> s%
>>>>> 
>>>>> 2Flayouts%2FOneFlexibleChildHorizontalLayoutForOverflow.as&data=02%7C01
>>>>> %7
>>>>> 
>>>>> C%7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee1
>>>>> %7
>>>>> 
>>>>> C0%7C0%7C636370058818766511&sdata=L7BjG%2BM7nTwguX%2BNaE5Op6BIT7XZrEqKF
>>>>> op
>>>>> 0D%2Frc0Aw%3D&reserved=0
>>>>> ----------------------------------------------------------------------
>>>>> diff --git 
>>>>> 
>>>>> a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/la
>>>>> yo
>>>>> uts/OneFlexibleChildHorizontalLayoutForOverflow.as
>>>>> 
>>>>> b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/la
>>>>> yo
>>>>> uts/OneFlexibleChildHorizontalLayoutForOverflow.as
>>>>> new file mode 100644
>>>>> index 0000000..c6abc22
>>>>> --- /dev/null
>>>>> +++ 
>>>>> 
>>>>> b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/la
>>>>> yo
>>>>> uts/OneFlexibleChildHorizontalLayoutForOverflow.as
>>>>> @@ -0,0 +1,290 @@
>>>>> 
>>>>> 
>>>>> +//////////////////////////////////////////////////////////////////////
>>>>> //
>>>>> ////////
>>>>> +//
>>>>> +//  Licensed to the Apache Software Foundation (ASF) under one or
>>>>> more
>>>>> +//  contributor license agreements.  See the NOTICE file distributed
>>>>> with
>>>>> +//  this work for additional information regarding copyright
>>>>> ownership.
>>>>> +//  The ASF licenses this file to You under the Apache License,
>>>>> Version 2.0
>>>>> +//  (the "License"); you may not use this file except in compliance
>>>>> with
>>>>> +//  the License.  You may obtain a copy of the License at
>>>>> +//
>>>>> +//      
>>>>> 
>>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.apa
>>>>> ch
>>>>> 
>>>>> e.org%2Flicenses%2FLICENSE-2.0&data=02%7C01%7C%7C699bbb170b2c4f0bf3ae08
>>>>> d4
>>>>> 
>>>>> d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C63637005881876651
>>>>> 1&
>>>>> sdata=bButr5xXaczhl741iZvjXub0l1B72d%2FvImajqD7mvyA%3D&reserved=0
>>>>> +//
>>>>> +//  Unless required by applicable law or agreed to in writing,
>>>>> software
>>>>> +//  distributed under the License is distributed on an "AS IS" BASIS,
>>>>> +//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>>> implied.
>>>>> +//  See the License for the specific language governing permissions
>>>>> and
>>>>> +//  limitations under the License.
>>>>> +//
>>>>> 
>>>>> 
>>>>> +//////////////////////////////////////////////////////////////////////
>>>>> //
>>>>> ////////
>>>>> +package org.apache.flex.html.beads.layouts
>>>>> +{
>>>>> +	import org.apache.flex.core.LayoutBase;
>>>>> +	import org.apache.flex.core.IDocument;
>>>>> +	import org.apache.flex.core.ILayoutChild;
>>>>> +	import org.apache.flex.core.ILayoutHost;
>>>>> +	import org.apache.flex.core.ILayoutView;
>>>>> +	import org.apache.flex.core.ILayoutParent;
>>>>> +	import org.apache.flex.core.IParentIUIBase;
>>>>> +	import org.apache.flex.core.IStrand;
>>>>> +	import org.apache.flex.core.IUIBase;
>>>>> +	import org.apache.flex.core.ValuesManager;
>>>>> +	import org.apache.flex.core.UIBase;
>>>>> +	import org.apache.flex.events.Event;
>>>>> +	import org.apache.flex.geom.Rectangle;
>>>>> +	import org.apache.flex.utils.CSSContainerUtils;
>>>>> +	import org.apache.flex.utils.CSSUtils;
>>>>> +
>>>>> +    /**
>>>>> +     *  The OneFlexibleChildHorizontalLayoutForOverflowis
>>>>> +	 *  intended for building apps that clip
>>>>> +	 *  and/or scroll the overflow, especially in a
>>>>> +	 *  3-pane view like the ASDoc examples.  It does not use
>>>>> +	 *  FlexBox because FlexBox wants to grow to the size
>>>>> +	 *  of the content without specifying width/height on
>>>>> +	 *  the flexible child.  But then the children in
>>>>> +	 *  the flexible child cannot use % sizing.
>>>>> +	 *  This layout presumes the parent is a known size.
>>>>> +	 *
>>>>> +     *  @langversion 3.0
>>>>> +     *  @playerversion Flash 10.2
>>>>> +     *  @playerversion AIR 2.6
>>>>> +     *  @productversion FlexJS 0.0
>>>>> +     */
>>>>> +	public class OneFlexibleChildHorizontalLayoutForOverflow extends
>>>>> LayoutBase implements IOneFlexibleChildLayout, IDocument
>>>>> +	{
>>>>> +        /**
>>>>> +         *  Constructor.
>>>>> +         *
>>>>> +         *  @langversion 3.0
>>>>> +         *  @playerversion Flash 10.2
>>>>> +         *  @playerversion AIR 2.6
>>>>> +         *  @productversion FlexJS 0.0
>>>>> +         */
>>>>> +		public function OneFlexibleChildHorizontalLayoutForOverflow()
>>>>> +		{
>>>>> +			super();
>>>>> +		}
>>>>> +
>>>>> +        private var _flexibleChild:String;
>>>>> +
>>>>> +        protected var actualChild:ILayoutChild;
>>>>> +
>>>>> +        /**
>>>>> +         *  @private
>>>>> +         *  The document.
>>>>> +         */
>>>>> +        private var document:Object;
>>>>> +
>>>>> +		/**
>>>>> +		 *  The id of the flexible child
>>>>> +		 *
>>>>> +		 *  @langversion 3.0
>>>>> +		 *  @playerversion Flash 10.2
>>>>> +		 *  @playerversion AIR 2.6
>>>>> +		 *  @productversion FlexJS 0.0
>>>>> +		 */
>>>>> +		public function get flexibleChild():String
>>>>> +		{
>>>>> +			return _flexibleChild;
>>>>> +		}
>>>>> +
>>>>> +		/**
>>>>> +		 * @private
>>>>> +		 */
>>>>> +		public function set flexibleChild(value:String):void
>>>>> +		{
>>>>> +			_flexibleChild = value;
>>>>> +		}
>>>>> +
>>>>> +        /**
>>>>> +         * @copy org.apache.flex.core.IBeadLayout#layout
>>>>> +         */
>>>>> +		COMPILE::JS
>>>>> +		override public function layout():Boolean
>>>>> +		{
>>>>> +			var contentView:ILayoutView = layoutView;
>>>>> +
>>>>> +			actualChild = document[flexibleChild];
>>>>> +
>>>>> +			var n:int = contentView.numElements;
>>>>> +			if (n == 0) return false;
>>>>> +
>>>>> +			for(var i:int=0; i < n; i++) {
>>>>> +				var child:UIBase = contentView.getElementAt(i) as UIBase;
>>>>> +				if (child.element.style["display"] != "inline-flex" &&
>>>>> child.element.style["display"] != "none")
>>>>> +					child.element.style["display"] = "inline-block";
>>>>> +			}
>>>>> +
>>>>> +			var w:Number = host.width;
>>>>> +			for(i=0; i < n; i++) {
>>>>> +				child = contentView.getElementAt(i) as UIBase;
>>>>> +				if (child != actualChild)
>>>>> +					w -= child.width;
>>>>> +			}
>>>>> +			actualChild.width = w;
>>>>> +					
>>>>> +			return true;
>>>>> +		}
>>>>> +
>>>>> +		COMPILE::SWF
>>>>> +		override public function layout():Boolean
>>>>> +		{
>>>>> +			var contentView:ILayoutView = layoutView;
>>>>> +			actualChild = document.hasOwnProperty(flexibleChild) ?
>>>>> document[flexibleChild] : null;
>>>>> +
>>>>> +			var n:Number = contentView.numElements;
>>>>> +			if (n == 0) return false;
>>>>> +			
>>>>> +			var maxWidth:Number = 0;
>>>>> +			var maxHeight:Number = 0;
>>>>> +			var hostSizedToContent:Boolean = host.isHeightSizedToContent();
>>>>> +			var hostWidth:Number = host.width;
>>>>> +			var hostHeight:Number = host.height;
>>>>> +
>>>>> +			var ilc:ILayoutChild;
>>>>> +			var data:Object;
>>>>> +			var canAdjust:Boolean = false;
>>>>> +			var margins:Object;
>>>>> +
>>>>> +			var paddingMetrics:Rectangle =
>>>>> CSSContainerUtils.getPaddingMetrics(host);
>>>>> +			var borderMetrics:Rectangle =
>>>>> CSSContainerUtils.getBorderMetrics(host);
>>>>> +			
>>>>> +			// adjust the host's usable size by the metrics. If
>>>>> hostSizedToContent, then the
>>>>> +			// resulting adjusted value may be less than zero.
>>>>> +			hostWidth -= paddingMetrics.left + paddingMetrics.right +
>>>>> borderMetrics.left + borderMetrics.right;
>>>>> +			hostHeight -= paddingMetrics.top + paddingMetrics.bottom +
>>>>> borderMetrics.top + borderMetrics.bottom;
>>>>> +
>>>>> +			var xpos:Number = borderMetrics.left + paddingMetrics.left;
>>>>> +			var ypos:Number = borderMetrics.top + paddingMetrics.left;
>>>>> +			var child:IUIBase;
>>>>> +			var childHeight:Number;
>>>>> +			var i:int;
>>>>> +			var childYpos:Number;
>>>>> +			var adjustLeft:Number = 0;
>>>>> +			var adjustRight:Number = hostWidth + borderMetrics.left +
>>>>> paddingMetrics.left;
>>>>> +
>>>>> +			// first work from left to right
>>>>> +			for(i=0; i < n; i++)
>>>>> +			{
>>>>> +				child = contentView.getElementAt(i) as IUIBase;
>>>>> +				if (child == null || !child.visible) continue;
>>>>> +				if (child == actualChild) break;
>>>>> +
>>>>> +				margins = childMargins(child, hostWidth, hostHeight);
>>>>> +				ilc = child as ILayoutChild;
>>>>> +
>>>>> +				xpos += margins.left;
>>>>> +
>>>>> +				childYpos = ypos + margins.top; // default y position
>>>>> +
>>>>> +				childHeight = child.height;
>>>>> +				if (ilc != null)
>>>>> +				{
>>>>> +					if (!isNaN(ilc.percentHeight)) {
>>>>> +						childHeight = host.height * ilc.percentHeight/100.0;
>>>>> +					}
>>>>> +					else if (isNaN(ilc.explicitHeight)) {
>>>>> +						childHeight = host.height;
>>>>> +					}
>>>>> +					ilc.setHeight(childHeight);
>>>>> +				}
>>>>> +
>>>>> +				if (ilc) {
>>>>> +					ilc.setX(xpos);
>>>>> +					ilc.setY(childYpos);
>>>>> +
>>>>> +					if (!isNaN(ilc.percentWidth)) {
>>>>> +						ilc.setWidth(hostWidth * ilc.percentWidth / 100);
>>>>> +					}
>>>>> +
>>>>> +				} else {
>>>>> +					child.x = xpos;
>>>>> +					child.y = childYpos;
>>>>> +				}
>>>>> +
>>>>> +				xpos += child.width + margins.right;
>>>>> +				adjustLeft = xpos;
>>>>> +			}
>>>>> +
>>>>> +			// then work from right to left
>>>>> +			xpos = hostWidth + borderMetrics.left + paddingMetrics.left;
>>>>> +
>>>>> +			for(i=(n-1); actualChild != null && i >= 0; i--)
>>>>> +			{
>>>>> +				child = contentView.getElementAt(i) as IUIBase;
>>>>> +				if (child == null || !child.visible) continue;
>>>>> +				if (child == actualChild) break;
>>>>> +
>>>>> +				margins = childMargins(child, hostWidth, hostHeight);
>>>>> +				ilc = child as ILayoutChild;
>>>>> +
>>>>> +				childYpos = ypos + margins.top; // default y position
>>>>> +
>>>>> +				childHeight = child.height;
>>>>> +				if (ilc != null)
>>>>> +				{
>>>>> +					if (!isNaN(ilc.percentHeight)) {
>>>>> +						childHeight = host.height * ilc.percentHeight/100.0;
>>>>> +					}
>>>>> +					else if (isNaN(ilc.explicitHeight)) {
>>>>> +						childHeight = host.height;
>>>>> +					}
>>>>> +					ilc.setHeight(childHeight);
>>>>> +				}
>>>>> +
>>>>> +				if (ilc) {
>>>>> +					if (!isNaN(ilc.percentWidth)) {
>>>>> +						ilc.setWidth(hostWidth * ilc.percentWidth / 100);
>>>>> +					}
>>>>> +				}
>>>>> +
>>>>> +				xpos -= child.width + margins.right;
>>>>> +
>>>>> +				if (ilc) {
>>>>> +					ilc.setX(xpos);
>>>>> +					ilc.setY(childYpos);
>>>>> +				} else {
>>>>> +					child.x = xpos;
>>>>> +					child.y = childYpos;
>>>>> +				}
>>>>> +
>>>>> +				xpos -= margins.left;
>>>>> +				adjustRight = xpos;
>>>>> +			}
>>>>> +
>>>>> +			// now adjust the actualChild to fill the space.
>>>>> +			if (actualChild != null) {
>>>>> +				margins = childMargins(actualChild, hostWidth, hostHeight);
>>>>> +				ilc = actualChild as ILayoutChild;
>>>>> +				childHeight = actualChild.height;
>>>>> +				if (ilc != null)
>>>>> +				{
>>>>> +					if (!isNaN(ilc.percentHeight)) {
>>>>> +						childHeight = host.height * ilc.percentHeight/100.0;
>>>>> +					}
>>>>> +					else if (isNaN(ilc.explicitHeight)) {
>>>>> +						childHeight = host.height;
>>>>> +					}
>>>>> +					ilc.setHeight(childHeight);
>>>>> +				}
>>>>> +				childYpos = ypos + margins.top;
>>>>> +				actualChild.x = adjustLeft + margins.left;
>>>>> +				actualChild.y = childYpos;
>>>>> +				if (ilc) {
>>>>> +					ilc.setWidth((adjustRight-margins.right) -
>>>>> (adjustLeft+margins.left));
>>>>> +				} else {
>>>>> +					actualChild.width = (adjustRight-margins.right) -
>>>>> (adjustLeft+margins.left);
>>>>> +				}
>>>>> +			}
>>>>> +
>>>>> +            return true;
>>>>> +		}
>>>>> +
>>>>> +        public function setDocument(document:Object, id:String =
>>>>> null):void
>>>>> +        {
>>>>> +            this.document = document;
>>>>> +        }
>>>>> +
>>>>> +    }
>>>>> +
>>>>> +}
>>>>> 
>>>>> 
>>>>> 
>>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip
>>>>> -u
>>>>> 
>>>>> s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2Fbdd34d2e%2Fframeworks%2
>>>>> Fp
>>>>> 
>>>>> rojects%2FBasic%2Fsrc%2Fmain%2Fflex%2Forg%2Fapache%2Fflex%2Fhtml%2Fbead
>>>>> s%
>>>>> 
>>>>> 2Flayouts%2FOneFlexibleChildHorizontalLayoutLockChildHeight.as&data=02%
>>>>> 7C
>>>>> 
>>>>> 01%7C%7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178de
>>>>> ce
>>>>> 
>>>>> e1%7C0%7C0%7C636370058818766511&sdata=Ir1Siye21IUzzijpvWA1XmQN0AbHktLu%
>>>>> 2F
>>>>> u3h%2BRtBZT0%3D&reserved=0
>>>>> ----------------------------------------------------------------------
>>>>> diff --git 
>>>>> 
>>>>> a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/la
>>>>> yo
>>>>> uts/OneFlexibleChildHorizontalLayoutLockChildHeight.as
>>>>> 
>>>>> b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/la
>>>>> yo
>>>>> uts/OneFlexibleChildHorizontalLayoutLockChildHeight.as
>>>>> deleted file mode 100644
>>>>> index d170d23..0000000
>>>>> --- 
>>>>> 
>>>>> a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/la
>>>>> yo
>>>>> uts/OneFlexibleChildHorizontalLayoutLockChildHeight.as
>>>>> +++ /dev/null
>>>>> @@ -1,91 +0,0 @@
>>>>> 
>>>>> 
>>>>> -//////////////////////////////////////////////////////////////////////
>>>>> //
>>>>> ////////
>>>>> -//
>>>>> -//  Licensed to the Apache Software Foundation (ASF) under one or
>>>>> more
>>>>> -//  contributor license agreements.  See the NOTICE file distributed
>>>>> with
>>>>> -//  this work for additional information regarding copyright
>>>>> ownership.
>>>>> -//  The ASF licenses this file to You under the Apache License,
>>>>> Version 2.0
>>>>> -//  (the "License"); you may not use this file except in compliance
>>>>> with
>>>>> -//  the License.  You may obtain a copy of the License at
>>>>> -//
>>>>> -//      
>>>>> 
>>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.apa
>>>>> ch
>>>>> 
>>>>> e.org%2Flicenses%2FLICENSE-2.0&data=02%7C01%7C%7C699bbb170b2c4f0bf3ae08
>>>>> d4
>>>>> 
>>>>> d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C63637005881876651
>>>>> 1&
>>>>> sdata=bButr5xXaczhl741iZvjXub0l1B72d%2FvImajqD7mvyA%3D&reserved=0
>>>>> -//
>>>>> -//  Unless required by applicable law or agreed to in writing,
>>>>> software
>>>>> -//  distributed under the License is distributed on an "AS IS" BASIS,
>>>>> -//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>>> implied.
>>>>> -//  See the License for the specific language governing permissions
>>>>> and
>>>>> -//  limitations under the License.
>>>>> -//
>>>>> 
>>>>> 
>>>>> -//////////////////////////////////////////////////////////////////////
>>>>> //
>>>>> ////////
>>>>> -package org.apache.flex.html.beads.layouts
>>>>> -{
>>>>> -	import org.apache.flex.core.LayoutBase;
>>>>> -	import org.apache.flex.core.IDocument;
>>>>> -	import org.apache.flex.core.ILayoutChild;
>>>>> -	import org.apache.flex.core.ILayoutHost;
>>>>> -	import org.apache.flex.core.ILayoutView;
>>>>> -	import org.apache.flex.core.ILayoutParent;
>>>>> -	import org.apache.flex.core.IParentIUIBase;
>>>>> -	import org.apache.flex.core.IStrand;
>>>>> -	import org.apache.flex.core.IUIBase;
>>>>> -	import org.apache.flex.core.ValuesManager;
>>>>> -	import org.apache.flex.core.UIBase;
>>>>> -	import org.apache.flex.events.Event;
>>>>> -	import org.apache.flex.geom.Rectangle;
>>>>> -	import org.apache.flex.utils.CSSContainerUtils;
>>>>> -	import org.apache.flex.utils.CSSUtils;
>>>>> -
>>>>> -    /**
>>>>> -     *  The OneFlexibleChildHorizontalLayoutLockChildHeight
>>>>> -	 *  is a subclass of OneFlexibleChildHorizontalLayout
>>>>> -	 *  that sets the flexible child's height to be the height
>>>>> -	 *  of the host container.  This is useful when you
>>>>> -	 *  don't want the actual child's height to dictate the
>>>>> -	 *  height of the container in order to force
>>>>> -	 *  scrollbars
>>>>> -     *
>>>>> -     *  @langversion 3.0
>>>>> -     *  @playerversion Flash 10.2
>>>>> -     *  @playerversion AIR 2.6
>>>>> -     *  @productversion FlexJS 0.0
>>>>> -     */
>>>>> -	public class OneFlexibleChildHorizontalLayoutLockChildHeight extends
>>>>> OneFlexibleChildHorizontalLayout
>>>>> -	{
>>>>> -        /**
>>>>> -         *  Constructor.
>>>>> -         *
>>>>> -         *  @langversion 3.0
>>>>> -         *  @playerversion Flash 10.2
>>>>> -         *  @playerversion AIR 2.6
>>>>> -         *  @productversion FlexJS 0.0
>>>>> -         */
>>>>> -		public function OneFlexibleChildHorizontalLayoutLockChildHeight()
>>>>> -		{
>>>>> -			super();
>>>>> -		}
>>>>> -
>>>>> -        /**
>>>>> -         * @copy org.apache.flex.core.IBeadLayout#layout
>>>>> -         */
>>>>> -		override public function layout():Boolean
>>>>> -		{
>>>>> -			var ret:Boolean = super.layout();
>>>>> -			if (ret)
>>>>> -			{
>>>>> -				var contentView:ILayoutView = layoutView;
>>>>> -	
>>>>> -				var n:int = contentView.numElements;
>>>>> -
>>>>> -				var h:Number = host.height;
>>>>> -				for(var i:int=0; i < n; i++) {
>>>>> -					var child:UIBase = contentView.getElementAt(i) as UIBase;
>>>>> -					if (child != actualChild)
>>>>> -						h = child.height;
>>>>> -				}
>>>>> -				actualChild.setHeight(h);
>>>>> -			}
>>>>> -			return ret;
>>>>> -		}
>>>>> -
>>>>> -    }
>>>>> -
>>>>> -}
>>>>> 
>>>>> 
>>>>> 
>>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip
>>>>> -u
>>>>> 
>>>>> s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2Fbdd34d2e%2Fframeworks%2
>>>>> Fp
>>>>> 
>>>>> rojects%2FBasic%2Fsrc%2Fmain%2Fflex%2Forg%2Fapache%2Fflex%2Fhtml%2Fbead
>>>>> s%
>>>>> 
>>>>> 2Flayouts%2FOneFlexibleChildVerticalLayoutForOverflow.as&data=02%7C01%7
>>>>> C%
>>>>> 
>>>>> 7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7
>>>>> C0
>>>>> 
>>>>> %7C0%7C636370058818766511&sdata=WdJnx6IGbPwIxUibKB3UqfKTHgHugWIleqBVsqJ
>>>>> 5f
>>>>> eE%3D&reserved=0
>>>>> ----------------------------------------------------------------------
>>>>> diff --git 
>>>>> 
>>>>> a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/la
>>>>> yo
>>>>> uts/OneFlexibleChildVerticalLayoutForOverflow.as
>>>>> 
>>>>> b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/la
>>>>> yo
>>>>> uts/OneFlexibleChildVerticalLayoutForOverflow.as
>>>>> new file mode 100644
>>>>> index 0000000..5679f80
>>>>> --- /dev/null
>>>>> +++ 
>>>>> 
>>>>> b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/la
>>>>> yo
>>>>> uts/OneFlexibleChildVerticalLayoutForOverflow.as
>>>>> @@ -0,0 +1,291 @@
>>>>> 
>>>>> 
>>>>> +//////////////////////////////////////////////////////////////////////
>>>>> //
>>>>> ////////
>>>>> +//
>>>>> +//  Licensed to the Apache Software Foundation (ASF) under one or
>>>>> more
>>>>> +//  contributor license agreements.  See the NOTICE file distributed
>>>>> with
>>>>> +//  this work for additional information regarding copyright
>>>>> ownership.
>>>>> +//  The ASF licenses this file to You under the Apache License,
>>>>> Version 2.0
>>>>> +//  (the "License"); you may not use this file except in compliance
>>>>> with
>>>>> +//  the License.  You may obtain a copy of the License at
>>>>> +//
>>>>> +//      
>>>>> 
>>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.apa
>>>>> ch
>>>>> 
>>>>> e.org%2Flicenses%2FLICENSE-2.0&data=02%7C01%7C%7C699bbb170b2c4f0bf3ae08
>>>>> d4
>>>>> 
>>>>> d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C63637005881876651
>>>>> 1&
>>>>> sdata=bButr5xXaczhl741iZvjXub0l1B72d%2FvImajqD7mvyA%3D&reserved=0
>>>>> +//
>>>>> +//  Unless required by applicable law or agreed to in writing,
>>>>> software
>>>>> +//  distributed under the License is distributed on an "AS IS" BASIS,
>>>>> +//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>>> implied.
>>>>> +//  See the License for the specific language governing permissions
>>>>> and
>>>>> +//  limitations under the License.
>>>>> +//
>>>>> 
>>>>> 
>>>>> +//////////////////////////////////////////////////////////////////////
>>>>> //
>>>>> ////////
>>>>> +package org.apache.flex.html.beads.layouts
>>>>> +{
>>>>> +	import org.apache.flex.core.LayoutBase;
>>>>> +	import org.apache.flex.core.IDocument;
>>>>> +	import org.apache.flex.core.ILayoutChild;
>>>>> +	import org.apache.flex.core.ILayoutHost;
>>>>> +	import org.apache.flex.core.ILayoutView;
>>>>> +	import org.apache.flex.core.ILayoutParent;
>>>>> +	import org.apache.flex.core.IParentIUIBase;
>>>>> +	import org.apache.flex.core.IStrand;
>>>>> +	import org.apache.flex.core.IStyleableObject;
>>>>> +	import org.apache.flex.core.IUIBase;
>>>>> +	import org.apache.flex.core.ValuesManager;
>>>>> +	import org.apache.flex.core.UIBase;
>>>>> +	import org.apache.flex.events.Event;
>>>>> +	import org.apache.flex.geom.Rectangle;
>>>>> +	import org.apache.flex.utils.CSSContainerUtils;
>>>>> +	import org.apache.flex.utils.CSSUtils;
>>>>> +
>>>>> +    /**
>>>>> +     *  The OneFlexibleChildVerticalLayoutForOverflow is
>>>>> +	 *  intended for building apps that clip
>>>>> +	 *  and/or scroll the overflow, especially in a
>>>>> +	 *  3-pane view like the ASDoc examples.  It does not use
>>>>> +	 *  FlexBox because FlexBox wants to grow to the size
>>>>> +	 *  of the content without specifying width/height on
>>>>> +	 *  the flexible child.  But then the children in
>>>>> +	 *  the flexible child cannot use % sizing.
>>>>> +	 *  This layout presumes the parent is a known size.
>>>>> +     *
>>>>> +     *  @langversion 3.0
>>>>> +     *  @playerversion Flash 10.2
>>>>> +     *  @playerversion AIR 2.6
>>>>> +     *  @productversion FlexJS 0.0
>>>>> +     */
>>>>> +	public class OneFlexibleChildVerticalLayoutForOverflow extends
>>>>> LayoutBase implements IOneFlexibleChildLayout, IDocument
>>>>> +	{
>>>>> +        /**
>>>>> +         *  Constructor.
>>>>> +         *
>>>>> +         *  @langversion 3.0
>>>>> +         *  @playerversion Flash 10.2
>>>>> +         *  @playerversion AIR 2.6
>>>>> +         *  @productversion FlexJS 0.0
>>>>> +         */
>>>>> +		public function OneFlexibleChildVerticalLayoutForOverflow()
>>>>> +		{
>>>>> +			super();
>>>>> +		}
>>>>> +
>>>>> +        private var _flexibleChild:String;
>>>>> +
>>>>> +        protected var actualChild:ILayoutChild;
>>>>> +
>>>>> +        /**
>>>>> +         *  @private
>>>>> +         *  The document.
>>>>> +         */
>>>>> +        private var document:Object;
>>>>> +
>>>>> +		/**
>>>>> +		 *  The id of the flexible child
>>>>> +		 *
>>>>> +		 *  @langversion 3.0
>>>>> +		 *  @playerversion Flash 10.2
>>>>> +		 *  @playerversion AIR 2.6
>>>>> +		 *  @productversion FlexJS 0.0
>>>>> +		 */
>>>>> +		public function get flexibleChild():String
>>>>> +		{
>>>>> +			return _flexibleChild;
>>>>> +		}
>>>>> +
>>>>> +		/**
>>>>> +		 * @private
>>>>> +		 */
>>>>> +		public function set flexibleChild(value:String):void
>>>>> +		{
>>>>> +			_flexibleChild = value;
>>>>> +		}
>>>>> +
>>>>> +        /**
>>>>> +         * @copy org.apache.flex.core.IBeadLayout#layout
>>>>> +         */
>>>>> +		COMPILE::JS
>>>>> +		override public function layout():Boolean
>>>>> +		{
>>>>> +			var contentView:ILayoutView = layoutView;
>>>>> +
>>>>> +			actualChild = document[flexibleChild];
>>>>> +
>>>>> +			var n:int = contentView.numElements;
>>>>> +			if (n == 0) return false;
>>>>> +
>>>>> +			for(var i:int=0; i < n; i++) {
>>>>> +				var child:UIBase = contentView.getElementAt(i) as UIBase;
>>>>> +				if (child.element.style["display"] != "flex" &&
>>>>> child.element.style["display"] != "none")
>>>>> +					child.element.style["display"] = "block";
>>>>> +			}
>>>>> +
>>>>> +			var h:Number = host.height;
>>>>> +			for(i=0; i < n; i++) {
>>>>> +				child = contentView.getElementAt(i) as UIBase;
>>>>> +				if (child != actualChild)
>>>>> +					h -= child.height;
>>>>> +			}
>>>>> +			actualChild.height = h;
>>>>> +					
>>>>> +			return true;
>>>>> +		}
>>>>> +
>>>>> +		COMPILE::SWF
>>>>> +		override public function layout():Boolean
>>>>> +		{
>>>>> +			var contentView:ILayoutView = layoutView;
>>>>> +			actualChild = document.hasOwnProperty(flexibleChild) ?
>>>>> document[flexibleChild] : null;
>>>>> +
>>>>> +			var n:Number = contentView.numElements;
>>>>> +			if (n == 0) return false;
>>>>> +			
>>>>> +			var maxWidth:Number = 0;
>>>>> +			var maxHeight:Number = 0;
>>>>> +			var hostSizedToContent:Boolean = host.isWidthSizedToContent();
>>>>> +			var hostWidth:Number = host.width;
>>>>> +			var hostHeight:Number = host.height;
>>>>> +
>>>>> +			var ilc:ILayoutChild;
>>>>> +			var data:Object;
>>>>> +			var canAdjust:Boolean = false;
>>>>> +			var margins:Object;
>>>>> +
>>>>> +			var paddingMetrics:Rectangle =
>>>>> CSSContainerUtils.getPaddingMetrics(host);
>>>>> +			var borderMetrics:Rectangle =
>>>>> CSSContainerUtils.getBorderMetrics(host);
>>>>> +			
>>>>> +			// adjust the host's usable size by the metrics. If
>>>>> hostSizedToContent, then the
>>>>> +			// resulting adjusted value may be less than zero.
>>>>> +			hostWidth -= paddingMetrics.left + paddingMetrics.right +
>>>>> borderMetrics.left + borderMetrics.right;
>>>>> +			hostHeight -= paddingMetrics.top + paddingMetrics.bottom +
>>>>> borderMetrics.top + borderMetrics.bottom;
>>>>> +
>>>>> +			var xpos:Number = borderMetrics.left + paddingMetrics.left;
>>>>> +			var ypos:Number = borderMetrics.top + paddingMetrics.left;
>>>>> +			var child:IUIBase;
>>>>> +			var childWidth:Number;
>>>>> +			var i:int;
>>>>> +			var childXpos:Number;
>>>>> +			var adjustTop:Number = 0;
>>>>> +			var adjustBottom:Number = hostHeight + borderMetrics.top +
>>>>> paddingMetrics.top;
>>>>> +
>>>>> +			// first work from top to bottom
>>>>> +			for(i=0; i < n; i++)
>>>>> +			{
>>>>> +				child = contentView.getElementAt(i) as IUIBase;
>>>>> +				if (child == null || !child.visible) continue;
>>>>> +				if (child == actualChild) break;
>>>>> +
>>>>> +				margins = childMargins(child, hostWidth, hostHeight);
>>>>> +				ilc = child as ILayoutChild;
>>>>> +
>>>>> +				ypos += margins.top;
>>>>> +
>>>>> +				childXpos = xpos + margins.left; // default x position
>>>>> +
>>>>> +				childWidth = child.width;
>>>>> +				if (ilc != null)
>>>>> +				{
>>>>> +					if (!isNaN(ilc.percentWidth)) {
>>>>> +						childWidth = hostWidth * ilc.percentWidth/100.0;
>>>>> +					}
>>>>> +					else if (isNaN(ilc.explicitWidth)) {
>>>>> +						childWidth = hostWidth;
>>>>> +					}
>>>>> +					ilc.setWidth(childWidth);
>>>>> +				}
>>>>> +
>>>>> +				if (ilc) {
>>>>> +					ilc.setX(childXpos);
>>>>> +					ilc.setY(ypos);
>>>>> +
>>>>> +					if (!isNaN(ilc.percentHeight)) {
>>>>> +						ilc.setHeight(hostHeight * ilc.percentHeight / 100);
>>>>> +					}
>>>>> +
>>>>> +				} else {
>>>>> +					child.x = childXpos;
>>>>> +					child.y = ypos;
>>>>> +				}
>>>>> +
>>>>> +				ypos += child.height + margins.bottom;
>>>>> +				adjustTop = ypos;
>>>>> +			}
>>>>> +
>>>>> +			// then work from bottom to top
>>>>> +			ypos = hostHeight + borderMetrics.top + paddingMetrics.top;
>>>>> +
>>>>> +			for(i=(n-1); actualChild != null && i >= 0; i--)
>>>>> +			{
>>>>> +				child = contentView.getElementAt(i) as IUIBase;
>>>>> +				if (child == null || !child.visible) continue;
>>>>> +				if (child == actualChild) break;
>>>>> +
>>>>> +				margins = childMargins(child, hostWidth, hostHeight);
>>>>> +				ilc = child as ILayoutChild;
>>>>> +
>>>>> +				childXpos = xpos + margins.left; // default x position
>>>>> +
>>>>> +				childWidth = child.width;
>>>>> +				if (ilc != null)
>>>>> +				{
>>>>> +					if (!isNaN(ilc.percentWidth)) {
>>>>> +						childWidth = hostWidth * ilc.percentWidth/100.0;
>>>>> +					}
>>>>> +					else if (isNaN(ilc.explicitWidth)) {
>>>>> +						childWidth = hostWidth;
>>>>> +					}
>>>>> +					ilc.setWidth(childWidth);
>>>>> +				}
>>>>> +
>>>>> +				if (ilc) {
>>>>> +					if (!isNaN(ilc.percentHeight)) {
>>>>> +						ilc.setHeight(hostHeight * ilc.percentHeight / 100);
>>>>> +					}
>>>>> +				}
>>>>> +
>>>>> +				ypos -= child.height + margins.bottom;
>>>>> +
>>>>> +				if (ilc) {
>>>>> +					ilc.setX(childXpos);
>>>>> +					ilc.setY(ypos);
>>>>> +				} else {
>>>>> +					child.x = childXpos;
>>>>> +					child.y = ypos;
>>>>> +				}
>>>>> +
>>>>> +				ypos -= margins.top;
>>>>> +				adjustBottom = ypos;
>>>>> +			}
>>>>> +
>>>>> +			// now adjust the actualChild to fill the space.
>>>>> +			if (actualChild != null) {
>>>>> +				margins = childMargins(actualChild, hostWidth, hostHeight);
>>>>> +				ilc = actualChild as ILayoutChild;
>>>>> +				childWidth = actualChild.width;
>>>>> +				if (ilc != null)
>>>>> +				{
>>>>> +					if (!isNaN(ilc.percentWidth)) {
>>>>> +						childWidth = hostWidth * ilc.percentWidth/100.0;
>>>>> +					}
>>>>> +					else if (isNaN(ilc.explicitWidth)) {
>>>>> +						childWidth = hostWidth;
>>>>> +					}
>>>>> +					ilc.setWidth(childWidth);
>>>>> +				}
>>>>> +				childXpos = xpos + margins.left;
>>>>> +					
>>>>> +				actualChild.x = childXpos
>>>>> +				actualChild.y = adjustTop + margins.top;
>>>>> +				if (ilc) {
>>>>> +					ilc.setHeight((adjustBottom-margins.bottom) -
>>>>> (adjustTop+margins.top));
>>>>> +				} else {
>>>>> +					actualChild.height = (adjustBottom-margins.bottom) -
>>>>> (adjustTop+margins.top);
>>>>> +				}
>>>>> +			}
>>>>> +
>>>>> +			return true;
>>>>> +		}
>>>>> +
>>>>> +        public function setDocument(document:Object, id:String =
>>>>> null):void
>>>>> +        {
>>>>> +            this.document = document;
>>>>> +        }
>>>>> +    }
>>>>> +
>>>>> +}
>>>>> 
>>>>> 
>>>>> 
>>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip
>>>>> -u
>>>>> 
>>>>> s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2Fbdd34d2e%2Fframeworks%2
>>>>> Fp
>>>>> 
>>>>> rojects%2FBasic%2Fsrc%2Fmain%2Fflex%2Forg%2Fapache%2Fflex%2Fhtml%2Fbead
>>>>> s%
>>>>> 
>>>>> 2Flayouts%2FOneFlexibleChildVerticalLayoutLockChildWidth.as&data=02%7C0
>>>>> 1%
>>>>> 
>>>>> 7C%7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee
>>>>> 1%
>>>>> 
>>>>> 7C0%7C0%7C636370058818766511&sdata=4Q4bkts0dp4wvvLUtu2yTYNg%2Fr7jS8bRt4
>>>>> co
>>>>> 3nYbPKc%3D&reserved=0
>>>>> ----------------------------------------------------------------------
>>>>> diff --git 
>>>>> 
>>>>> a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/la
>>>>> yo
>>>>> uts/OneFlexibleChildVerticalLayoutLockChildWidth.as
>>>>> 
>>>>> b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/la
>>>>> yo
>>>>> uts/OneFlexibleChildVerticalLayoutLockChildWidth.as
>>>>> deleted file mode 100644
>>>>> index 7415299..0000000
>>>>> --- 
>>>>> 
>>>>> a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/la
>>>>> yo
>>>>> uts/OneFlexibleChildVerticalLayoutLockChildWidth.as
>>>>> +++ /dev/null
>>>>> @@ -1,93 +0,0 @@
>>>>> 
>>>>> 
>>>>> -//////////////////////////////////////////////////////////////////////
>>>>> //
>>>>> ////////
>>>>> -//
>>>>> -//  Licensed to the Apache Software Foundation (ASF) under one or 
>>>>> more
>>>>> -//  contributor license agreements.  See the NOTICE file distributed
>>>>> with
>>>>> -//  this work for additional information regarding copyright 
>>>>> ownership.
>>>>> -//  The ASF licenses this file to You under the Apache License,
>>>>> Version 2.0
>>>>> -//  (the "License"); you may not use this file except in compliance
>>>>> with
>>>>> -//  the License.  You may obtain a copy of the License at
>>>>> -//
>>>>> -//      
>>>>> 
>>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.apa
>>>>> ch
>>>>> 
>>>>> e.org%2Flicenses%2FLICENSE-2.0&data=02%7C01%7C%7C699bbb170b2c4f0bf3ae08
>>>>> d4
>>>>> 
>>>>> d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C63637005881876651
>>>>> 1&
>>>>> sdata=bButr5xXaczhl741iZvjXub0l1B72d%2FvImajqD7mvyA%3D&reserved=0
>>>>> -//
>>>>> -//  Unless required by applicable law or agreed to in writing, 
>>>>> software
>>>>> -//  distributed under the License is distributed on an "AS IS" BASIS,
>>>>> -//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
>>>>> implied.
>>>>> -//  See the License for the specific language governing permissions 
>>>>> and
>>>>> -//  limitations under the License.
>>>>> -//
>>>>> 
>>>>> 
>>>>> -//////////////////////////////////////////////////////////////////////
>>>>> //
>>>>> ////////
>>>>> -package org.apache.flex.html.beads.layouts
>>>>> -{
>>>>> -	import org.apache.flex.core.LayoutBase;
>>>>> -	import org.apache.flex.core.IDocument;
>>>>> -	import org.apache.flex.core.ILayoutChild;
>>>>> -	import org.apache.flex.core.ILayoutHost;
>>>>> -	import org.apache.flex.core.ILayoutView;
>>>>> -	import org.apache.flex.core.ILayoutParent;
>>>>> -	import org.apache.flex.core.IParentIUIBase;
>>>>> -	import org.apache.flex.core.IStrand;
>>>>> -	import org.apache.flex.core.IStyleableObject;
>>>>> -	import org.apache.flex.core.IUIBase;
>>>>> -	import org.apache.flex.core.ValuesManager;
>>>>> -	import org.apache.flex.core.UIBase;
>>>>> -	import org.apache.flex.events.Event;
>>>>> -	import org.apache.flex.geom.Rectangle;
>>>>> -	import org.apache.flex.utils.CSSContainerUtils;
>>>>> -	import org.apache.flex.utils.CSSUtils;
>>>>> -
>>>>> -    /**
>>>>> -     *  The OneFlexibleChildHorizontalLayoutLockChildHeight 
>>>>> -	 *  is a subclass of OneFlexibleChildHorizontalLayout
>>>>> -	 *  that sets the flexible child's height to be the height
>>>>> -	 *  of the host container.  This is useful when you
>>>>> -	 *  don't want the actual child's height to dictate the
>>>>> -	 *  height of the container in order to force
>>>>> -	 *  scrollbars or line wrapping.
>>>>> -     *
>>>>> -     *  @langversion 3.0
>>>>> -     *  @playerversion Flash 10.2
>>>>> -     *  @playerversion AIR 2.6
>>>>> -     *  @productversion FlexJS 0.0
>>>>> -     */
>>>>> -	public class OneFlexibleChildVerticalLayoutLockChildWidth extends 
>>>>> OneFlexibleChildVerticalLayout
>>>>> -	{
>>>>> -        /**
>>>>> -         *  Constructor.
>>>>> -         *
>>>>> -         *  @langversion 3.0
>>>>> -         *  @playerversion Flash 10.2
>>>>> -         *  @playerversion AIR 2.6
>>>>> -         *  @productversion FlexJS 0.0
>>>>> -         */
>>>>> -		public function OneFlexibleChildVerticalLayoutLockChildWidth()
>>>>> -		{
>>>>> -			super();
>>>>> -		}
>>>>> -
>>>>> -        /**
>>>>> -         * @copy org.apache.flex.core.IBeadLayout#layout
>>>>> -         */
>>>>> -		override public function layout():Boolean
>>>>> -		{
>>>>> -			var ret:Boolean = super.layout();
>>>>> -			if (ret)
>>>>> -			{
>>>>> -				var contentView:ILayoutView = layoutView;
>>>>> -	
>>>>> -				var n:int = contentView.numElements;
>>>>> -
>>>>> -				var w:Number = host.width;
>>>>> -				for(var i:int=0; i < n; i++) {
>>>>> -					var child:UIBase = contentView.getElementAt(i) as UIBase;
>>>>> -					if (child != actualChild)
>>>>> -						w = child.width;
>>>>> -				}
>>>>> -				
>>>>> -				actualChild.setWidth(w); 
>>>>> -			}
>>>>> -			return ret;
>>>>> -		}
>>>>> -
>>>>> -    }
>>>>> -
>>>>> -}
>>>>> 
>>>>> 
>>>>> 
>>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip
>>>>> -u
>>>>> 
>>>>> s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2Fbdd34d2e%2Fframeworks%2
>>>>> Fp
>>>>> 
>>>>> rojects%2FBasic%2Fsrc%2Fmain%2Fresources%2Fbasic-manifest.xml&data=02%7
>>>>> C0
>>>>> 
>>>>> 1%7C%7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178dec
>>>>> ee
>>>>> 
>>>>> 1%7C0%7C0%7C636370058818766511&sdata=mPldYCuDfp%2BxQ4QROdu4BWSl3Dh7HP19
>>>>> VX
>>>>> BR3B3IXOg%3D&reserved=0
>>>>> ----------------------------------------------------------------------
>>>>> diff --git 
>>>>> a/frameworks/projects/Basic/src/main/resources/basic-manifest.xml 
>>>>> b/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
>>>>> index 7cbc05d..09bb1a3 100644
>>>>> --- a/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
>>>>> +++ b/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
>>>>> @@ -150,8 +150,8 @@
>>>>>   <component id="FlexibleFirstChildHorizontalLayout" 
>>>>> 
>>>>> class="org.apache.flex.html.beads.layouts.FlexibleFirstChildHorizontalL
>>>>> ay
>>>>> out"/>
>>>>>   <component id="OneFlexibleChildVerticalLayout" 
>>>>> 
>>>>> class="org.apache.flex.html.beads.layouts.OneFlexibleChildVerticalLayou
>>>>> t"
>>>>> />
>>>>>   <component id="OneFlexibleChildHorizontalLayout" 
>>>>> 
>>>>> class="org.apache.flex.html.beads.layouts.OneFlexibleChildHorizontalLay
>>>>> ou
>>>>> t"/>
>>>>> -    <component id="OneFlexibleChildVerticalLayoutLockChildWidth" 
>>>>> 
>>>>> class="org.apache.flex.html.beads.layouts.OneFlexibleChildVerticalLayou
>>>>> tL
>>>>> ockChildWidth"/>
>>>>> -    <component id="OneFlexibleChildHorizontalLayoutLockChildHeight" 
>>>>> 
>>>>> class="org.apache.flex.html.beads.layouts.OneFlexibleChildHorizontalLay
>>>>> ou
>>>>> tLockChildHeight"/>
>>>>> +    <component id="OneFlexibleChildVerticalLayoutForOverflow" 
>>>>> 
>>>>> class="org.apache.flex.html.beads.layouts.OneFlexibleChildVerticalLayou
>>>>> tF
>>>>> orOverflow"/>
>>>>> +    <component id="OneFlexibleChildHorizontalLayoutForOverflow" 
>>>>> 
>>>>> class="org.apache.flex.html.beads.layouts.OneFlexibleChildHorizontalLay
>>>>> ou
>>>>> tForOverflow"/>
>>>>>   <component id="MXMLBeadView" 
>>>>> class="org.apache.flex.html.MXMLBeadView"/>
>>>>> 
>>>>>   <component id="SubAppLoader" 
>>>>> class="org.apache.flex.html.SubAppLoader" />
>>>>> 
>>>> 
>>> 
>> 
>> 
> 



Re: [07/13] git commit: [flex-asjs] [refs/heads/release0.8.0] - give up on trying to use FlexBox for full-screen 3-pane views. FlexBox seems more happy stretching to content size instead of clipping at the computed flex-ed size. These custom layouts wi...

Posted by Alex Harui <ah...@adobe.com.INVALID>.
I just reverted ASDoc back to the "ForOverflow" layouts.  ASDoc was not
showing up correctly for me (Safari).  Maybe flex-basis is handled
differently on different browsers.  We can look into it more later.

Looking into this did make me glad we are changing over to "Royale" so
"Flex" and "FlexJS" will not be confused with FlexBox and the flex-xxx
attributes.

-Alex

On 7/31/17, 12:57 AM, "Harbs" <ha...@gmail.com> wrote:

>The only example I found was the ASDoc app.
>
>I switched it and it appears to work. (I pushed my changes.)
>
>> On Jul 31, 2017, at 7:35 AM, Alex Harui <ah...@adobe.com.INVALID>
>>wrote:
>> 
>> It will either work in the examples that use it or it won't.  Try it and
>> find out.
>> 
>> -Alex
>> 
>> On 7/30/17, 3:04 AM, "Harbs" <ha...@gmail.com> wrote:
>> 
>>> I think I just ran into the same issue.
>>> 
>>> This layout seems to more-or-less do the job, but it’s kind of heavy.
>>> 
>>> I did some research into flexbox and it appear that setting flex-basis
>>>to
>>> 0 does the job. It needs to be set on ONLY the one flexible child.
>>> 
>>> Here’s a codepen which shows a use case.
>>> 
>>>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcodepen
>>>.i
>>> 
>>>o%2Fjpdevries%2Fpen%2FoXxPOP&data=02%7C01%7C%7C699bbb170b2c4f0bf3ae08d4d
>>>73
>>> 
>>>2638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636370058818766511&sd
>>>at
>>> a=tSTNYANFFiQ4DMGYbAZaz0dJ9qYDYpcwP2ZoSYRIcG8%3D&reserved=0
>>> 
>>><https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcodepe
>>>n.
>>> 
>>>io%2Fjpdevries%2Fpen%2FoXxPOP&data=02%7C01%7C%7C699bbb170b2c4f0bf3ae08d4
>>>d7
>>> 
>>>32638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636370058818766511&s
>>>da
>>> ta=tSTNYANFFiQ4DMGYbAZaz0dJ9qYDYpcwP2ZoSYRIcG8%3D&reserved=0>
>>> 
>>> I noticed that the OneFlexibleLayouts have code which set the
>>>flex-basis
>>> of the children if a percentage value is set. When setting the size of
>>> the one flexible child to 0% this causes the flex-basis to be set to 0
>>> and then the one flexible child will fit the remaining space even if it
>>> might overflow because of its children.
>>> 
>>> I have wasted quite a bit of time before I discovered this. I’m not
>>>sure
>>> whether the OneFlexibleLayout classes should be changed, or maybe we
>>>need
>>> documentation that to fit content that might overflow, the percentage
>>> should be set to 0. It could be there are cases where the entire
>>> OnFlexibleLayout should be fit when smaller and expand (and not scroll)
>>> when bigger. In that case, the current behavior might be correct.
>>> 
>>> Thoughts?
>>> Harbs
>>> 
>>>> On May 23, 2017, at 10:16 AM, aharui@apache.org wrote:
>>>> 
>>>> give up on trying to use FlexBox for full-screen 3-pane views.
>>>>FlexBox
>>>> seems more happy stretching to content size instead of clipping at the
>>>> computed flex-ed size.  These custom layouts will do the proper sizing
>>>> 
>>>> 
>>>> Project: 
>>>> 
>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip
>>>>-u
>>>> 
>>>>s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Frepo&data=02%7C01%7C%7C699bbb1
>>>>70
>>>> 
>>>>b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C63
>>>>63
>>>> 
>>>>70058818766511&sdata=P%2FMkfZAwCYwpQEoCe5UGx8tW0mZaIZsMdDg6VxlaKWA%3D&r
>>>>es
>>>> erved=0
>>>> Commit: 
>>>> 
>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip
>>>>-u
>>>> 
>>>>s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fcommit%2Fbdd34d2e&data=02%7C01
>>>>%7
>>>> 
>>>>C%7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee1
>>>>%7
>>>> 
>>>>C0%7C0%7C636370058818766511&sdata=QosBAau8lE4nCS7c%2F8B6GDc%2Bqa%2BpSko
>>>>P5
>>>> 5x3oji5FnI%3D&reserved=0
>>>> Tree: 
>>>> 
>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip
>>>>-u
>>>> 
>>>>s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Ftree%2Fbdd34d2e&data=02%7C01%7
>>>>C%
>>>> 
>>>>7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7
>>>>C0
>>>> 
>>>>%7C0%7C636370058818766511&sdata=T4CCqwtn%2FgFTmAnaI%2BuCXqtX0P75ebpKVZO
>>>>xf
>>>> XOTbIE%3D&reserved=0
>>>> Diff: 
>>>> 
>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip
>>>>-u
>>>> 
>>>>s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fdiff%2Fbdd34d2e&data=02%7C01%7
>>>>C%
>>>> 
>>>>7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7
>>>>C0
>>>> 
>>>>%7C0%7C636370058818766511&sdata=f8WVJXc81KrLMuUgRckULYCfglNL7d%2BfdjSbB
>>>>BU
>>>> 0fRo%3D&reserved=0
>>>> 
>>>> Branch: refs/heads/release0.8.0
>>>> Commit: bdd34d2ef4d8117fa1b222ac470482a42dbea9eb
>>>> Parents: c505d67
>>>> Author: Alex Harui <ah...@apache.org>
>>>> Authored: Mon May 22 10:12:02 2017 -0700
>>>> Committer: Alex Harui <ah...@apache.org>
>>>> Committed: Tue May 23 00:15:56 2017 -0700
>>>> 
>>>> ----------------------------------------------------------------------
>>>> ...eFlexibleChildHorizontalLayoutForOverflow.as | 290
>>>>++++++++++++++++++
>>>> ...xibleChildHorizontalLayoutLockChildHeight.as |  91 ------
>>>> ...OneFlexibleChildVerticalLayoutForOverflow.as | 291
>>>> +++++++++++++++++++
>>>> ...FlexibleChildVerticalLayoutLockChildWidth.as |  93 ------
>>>> .../Basic/src/main/resources/basic-manifest.xml |   4 +-
>>>> 5 files changed, 583 insertions(+), 186 deletions(-)
>>>> ----------------------------------------------------------------------
>>>> 
>>>> 
>>>> 
>>>> 
>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip
>>>>-u
>>>> 
>>>>s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2Fbdd34d2e%2Fframeworks%2
>>>>Fp
>>>> 
>>>>rojects%2FBasic%2Fsrc%2Fmain%2Fflex%2Forg%2Fapache%2Fflex%2Fhtml%2Fbead
>>>>s%
>>>> 
>>>>2Flayouts%2FOneFlexibleChildHorizontalLayoutForOverflow.as&data=02%7C01
>>>>%7
>>>> 
>>>>C%7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee1
>>>>%7
>>>> 
>>>>C0%7C0%7C636370058818766511&sdata=L7BjG%2BM7nTwguX%2BNaE5Op6BIT7XZrEqKF
>>>>op
>>>> 0D%2Frc0Aw%3D&reserved=0
>>>> ----------------------------------------------------------------------
>>>> diff --git 
>>>> 
>>>>a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/la
>>>>yo
>>>> uts/OneFlexibleChildHorizontalLayoutForOverflow.as
>>>> 
>>>>b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/la
>>>>yo
>>>> uts/OneFlexibleChildHorizontalLayoutForOverflow.as
>>>> new file mode 100644
>>>> index 0000000..c6abc22
>>>> --- /dev/null
>>>> +++ 
>>>> 
>>>>b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/la
>>>>yo
>>>> uts/OneFlexibleChildHorizontalLayoutForOverflow.as
>>>> @@ -0,0 +1,290 @@
>>>> 
>>>> 
>>>>+//////////////////////////////////////////////////////////////////////
>>>>//
>>>> ////////
>>>> +//
>>>> +//  Licensed to the Apache Software Foundation (ASF) under one or
>>>>more
>>>> +//  contributor license agreements.  See the NOTICE file distributed
>>>> with
>>>> +//  this work for additional information regarding copyright
>>>>ownership.
>>>> +//  The ASF licenses this file to You under the Apache License,
>>>> Version 2.0
>>>> +//  (the "License"); you may not use this file except in compliance
>>>> with
>>>> +//  the License.  You may obtain a copy of the License at
>>>> +//
>>>> +//      
>>>> 
>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.apa
>>>>ch
>>>> 
>>>>e.org%2Flicenses%2FLICENSE-2.0&data=02%7C01%7C%7C699bbb170b2c4f0bf3ae08
>>>>d4
>>>> 
>>>>d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C63637005881876651
>>>>1&
>>>> sdata=bButr5xXaczhl741iZvjXub0l1B72d%2FvImajqD7mvyA%3D&reserved=0
>>>> +//
>>>> +//  Unless required by applicable law or agreed to in writing,
>>>>software
>>>> +//  distributed under the License is distributed on an "AS IS" BASIS,
>>>> +//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>> +//  See the License for the specific language governing permissions
>>>>and
>>>> +//  limitations under the License.
>>>> +//
>>>> 
>>>> 
>>>>+//////////////////////////////////////////////////////////////////////
>>>>//
>>>> ////////
>>>> +package org.apache.flex.html.beads.layouts
>>>> +{
>>>> +	import org.apache.flex.core.LayoutBase;
>>>> +	import org.apache.flex.core.IDocument;
>>>> +	import org.apache.flex.core.ILayoutChild;
>>>> +	import org.apache.flex.core.ILayoutHost;
>>>> +	import org.apache.flex.core.ILayoutView;
>>>> +	import org.apache.flex.core.ILayoutParent;
>>>> +	import org.apache.flex.core.IParentIUIBase;
>>>> +	import org.apache.flex.core.IStrand;
>>>> +	import org.apache.flex.core.IUIBase;
>>>> +	import org.apache.flex.core.ValuesManager;
>>>> +	import org.apache.flex.core.UIBase;
>>>> +	import org.apache.flex.events.Event;
>>>> +	import org.apache.flex.geom.Rectangle;
>>>> +	import org.apache.flex.utils.CSSContainerUtils;
>>>> +	import org.apache.flex.utils.CSSUtils;
>>>> +
>>>> +    /**
>>>> +     *  The OneFlexibleChildHorizontalLayoutForOverflowis
>>>> +	 *  intended for building apps that clip
>>>> +	 *  and/or scroll the overflow, especially in a
>>>> +	 *  3-pane view like the ASDoc examples.  It does not use
>>>> +	 *  FlexBox because FlexBox wants to grow to the size
>>>> +	 *  of the content without specifying width/height on
>>>> +	 *  the flexible child.  But then the children in
>>>> +	 *  the flexible child cannot use % sizing.
>>>> +	 *  This layout presumes the parent is a known size.
>>>> +	 *
>>>> +     *  @langversion 3.0
>>>> +     *  @playerversion Flash 10.2
>>>> +     *  @playerversion AIR 2.6
>>>> +     *  @productversion FlexJS 0.0
>>>> +     */
>>>> +	public class OneFlexibleChildHorizontalLayoutForOverflow extends
>>>> LayoutBase implements IOneFlexibleChildLayout, IDocument
>>>> +	{
>>>> +        /**
>>>> +         *  Constructor.
>>>> +         *
>>>> +         *  @langversion 3.0
>>>> +         *  @playerversion Flash 10.2
>>>> +         *  @playerversion AIR 2.6
>>>> +         *  @productversion FlexJS 0.0
>>>> +         */
>>>> +		public function OneFlexibleChildHorizontalLayoutForOverflow()
>>>> +		{
>>>> +			super();
>>>> +		}
>>>> +
>>>> +        private var _flexibleChild:String;
>>>> +
>>>> +        protected var actualChild:ILayoutChild;
>>>> +
>>>> +        /**
>>>> +         *  @private
>>>> +         *  The document.
>>>> +         */
>>>> +        private var document:Object;
>>>> +
>>>> +		/**
>>>> +		 *  The id of the flexible child
>>>> +		 *
>>>> +		 *  @langversion 3.0
>>>> +		 *  @playerversion Flash 10.2
>>>> +		 *  @playerversion AIR 2.6
>>>> +		 *  @productversion FlexJS 0.0
>>>> +		 */
>>>> +		public function get flexibleChild():String
>>>> +		{
>>>> +			return _flexibleChild;
>>>> +		}
>>>> +
>>>> +		/**
>>>> +		 * @private
>>>> +		 */
>>>> +		public function set flexibleChild(value:String):void
>>>> +		{
>>>> +			_flexibleChild = value;
>>>> +		}
>>>> +
>>>> +        /**
>>>> +         * @copy org.apache.flex.core.IBeadLayout#layout
>>>> +         */
>>>> +		COMPILE::JS
>>>> +		override public function layout():Boolean
>>>> +		{
>>>> +			var contentView:ILayoutView = layoutView;
>>>> +
>>>> +			actualChild = document[flexibleChild];
>>>> +
>>>> +			var n:int = contentView.numElements;
>>>> +			if (n == 0) return false;
>>>> +
>>>> +			for(var i:int=0; i < n; i++) {
>>>> +				var child:UIBase = contentView.getElementAt(i) as UIBase;
>>>> +				if (child.element.style["display"] != "inline-flex" &&
>>>> child.element.style["display"] != "none")
>>>> +					child.element.style["display"] = "inline-block";
>>>> +			}
>>>> +
>>>> +			var w:Number = host.width;
>>>> +			for(i=0; i < n; i++) {
>>>> +				child = contentView.getElementAt(i) as UIBase;
>>>> +				if (child != actualChild)
>>>> +					w -= child.width;
>>>> +			}
>>>> +			actualChild.width = w;
>>>> +					
>>>> +			return true;
>>>> +		}
>>>> +
>>>> +		COMPILE::SWF
>>>> +		override public function layout():Boolean
>>>> +		{
>>>> +			var contentView:ILayoutView = layoutView;
>>>> +			actualChild = document.hasOwnProperty(flexibleChild) ?
>>>> document[flexibleChild] : null;
>>>> +
>>>> +			var n:Number = contentView.numElements;
>>>> +			if (n == 0) return false;
>>>> +			
>>>> +			var maxWidth:Number = 0;
>>>> +			var maxHeight:Number = 0;
>>>> +			var hostSizedToContent:Boolean = host.isHeightSizedToContent();
>>>> +			var hostWidth:Number = host.width;
>>>> +			var hostHeight:Number = host.height;
>>>> +
>>>> +			var ilc:ILayoutChild;
>>>> +			var data:Object;
>>>> +			var canAdjust:Boolean = false;
>>>> +			var margins:Object;
>>>> +
>>>> +			var paddingMetrics:Rectangle =
>>>> CSSContainerUtils.getPaddingMetrics(host);
>>>> +			var borderMetrics:Rectangle =
>>>> CSSContainerUtils.getBorderMetrics(host);
>>>> +			
>>>> +			// adjust the host's usable size by the metrics. If
>>>> hostSizedToContent, then the
>>>> +			// resulting adjusted value may be less than zero.
>>>> +			hostWidth -= paddingMetrics.left + paddingMetrics.right +
>>>> borderMetrics.left + borderMetrics.right;
>>>> +			hostHeight -= paddingMetrics.top + paddingMetrics.bottom +
>>>> borderMetrics.top + borderMetrics.bottom;
>>>> +
>>>> +			var xpos:Number = borderMetrics.left + paddingMetrics.left;
>>>> +			var ypos:Number = borderMetrics.top + paddingMetrics.left;
>>>> +			var child:IUIBase;
>>>> +			var childHeight:Number;
>>>> +			var i:int;
>>>> +			var childYpos:Number;
>>>> +			var adjustLeft:Number = 0;
>>>> +			var adjustRight:Number = hostWidth + borderMetrics.left +
>>>> paddingMetrics.left;
>>>> +
>>>> +			// first work from left to right
>>>> +			for(i=0; i < n; i++)
>>>> +			{
>>>> +				child = contentView.getElementAt(i) as IUIBase;
>>>> +				if (child == null || !child.visible) continue;
>>>> +				if (child == actualChild) break;
>>>> +
>>>> +				margins = childMargins(child, hostWidth, hostHeight);
>>>> +				ilc = child as ILayoutChild;
>>>> +
>>>> +				xpos += margins.left;
>>>> +
>>>> +				childYpos = ypos + margins.top; // default y position
>>>> +
>>>> +				childHeight = child.height;
>>>> +				if (ilc != null)
>>>> +				{
>>>> +					if (!isNaN(ilc.percentHeight)) {
>>>> +						childHeight = host.height * ilc.percentHeight/100.0;
>>>> +					}
>>>> +					else if (isNaN(ilc.explicitHeight)) {
>>>> +						childHeight = host.height;
>>>> +					}
>>>> +					ilc.setHeight(childHeight);
>>>> +				}
>>>> +
>>>> +				if (ilc) {
>>>> +					ilc.setX(xpos);
>>>> +					ilc.setY(childYpos);
>>>> +
>>>> +					if (!isNaN(ilc.percentWidth)) {
>>>> +						ilc.setWidth(hostWidth * ilc.percentWidth / 100);
>>>> +					}
>>>> +
>>>> +				} else {
>>>> +					child.x = xpos;
>>>> +					child.y = childYpos;
>>>> +				}
>>>> +
>>>> +				xpos += child.width + margins.right;
>>>> +				adjustLeft = xpos;
>>>> +			}
>>>> +
>>>> +			// then work from right to left
>>>> +			xpos = hostWidth + borderMetrics.left + paddingMetrics.left;
>>>> +
>>>> +			for(i=(n-1); actualChild != null && i >= 0; i--)
>>>> +			{
>>>> +				child = contentView.getElementAt(i) as IUIBase;
>>>> +				if (child == null || !child.visible) continue;
>>>> +				if (child == actualChild) break;
>>>> +
>>>> +				margins = childMargins(child, hostWidth, hostHeight);
>>>> +				ilc = child as ILayoutChild;
>>>> +
>>>> +				childYpos = ypos + margins.top; // default y position
>>>> +
>>>> +				childHeight = child.height;
>>>> +				if (ilc != null)
>>>> +				{
>>>> +					if (!isNaN(ilc.percentHeight)) {
>>>> +						childHeight = host.height * ilc.percentHeight/100.0;
>>>> +					}
>>>> +					else if (isNaN(ilc.explicitHeight)) {
>>>> +						childHeight = host.height;
>>>> +					}
>>>> +					ilc.setHeight(childHeight);
>>>> +				}
>>>> +
>>>> +				if (ilc) {
>>>> +					if (!isNaN(ilc.percentWidth)) {
>>>> +						ilc.setWidth(hostWidth * ilc.percentWidth / 100);
>>>> +					}
>>>> +				}
>>>> +
>>>> +				xpos -= child.width + margins.right;
>>>> +
>>>> +				if (ilc) {
>>>> +					ilc.setX(xpos);
>>>> +					ilc.setY(childYpos);
>>>> +				} else {
>>>> +					child.x = xpos;
>>>> +					child.y = childYpos;
>>>> +				}
>>>> +
>>>> +				xpos -= margins.left;
>>>> +				adjustRight = xpos;
>>>> +			}
>>>> +
>>>> +			// now adjust the actualChild to fill the space.
>>>> +			if (actualChild != null) {
>>>> +				margins = childMargins(actualChild, hostWidth, hostHeight);
>>>> +				ilc = actualChild as ILayoutChild;
>>>> +				childHeight = actualChild.height;
>>>> +				if (ilc != null)
>>>> +				{
>>>> +					if (!isNaN(ilc.percentHeight)) {
>>>> +						childHeight = host.height * ilc.percentHeight/100.0;
>>>> +					}
>>>> +					else if (isNaN(ilc.explicitHeight)) {
>>>> +						childHeight = host.height;
>>>> +					}
>>>> +					ilc.setHeight(childHeight);
>>>> +				}
>>>> +				childYpos = ypos + margins.top;
>>>> +				actualChild.x = adjustLeft + margins.left;
>>>> +				actualChild.y = childYpos;
>>>> +				if (ilc) {
>>>> +					ilc.setWidth((adjustRight-margins.right) -
>>>> (adjustLeft+margins.left));
>>>> +				} else {
>>>> +					actualChild.width = (adjustRight-margins.right) -
>>>> (adjustLeft+margins.left);
>>>> +				}
>>>> +			}
>>>> +
>>>> +            return true;
>>>> +		}
>>>> +
>>>> +        public function setDocument(document:Object, id:String =
>>>> null):void
>>>> +        {
>>>> +            this.document = document;
>>>> +        }
>>>> +
>>>> +    }
>>>> +
>>>> +}
>>>> 
>>>> 
>>>> 
>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip
>>>>-u
>>>> 
>>>>s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2Fbdd34d2e%2Fframeworks%2
>>>>Fp
>>>> 
>>>>rojects%2FBasic%2Fsrc%2Fmain%2Fflex%2Forg%2Fapache%2Fflex%2Fhtml%2Fbead
>>>>s%
>>>> 
>>>>2Flayouts%2FOneFlexibleChildHorizontalLayoutLockChildHeight.as&data=02%
>>>>7C
>>>> 
>>>>01%7C%7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178de
>>>>ce
>>>> 
>>>>e1%7C0%7C0%7C636370058818766511&sdata=Ir1Siye21IUzzijpvWA1XmQN0AbHktLu%
>>>>2F
>>>> u3h%2BRtBZT0%3D&reserved=0
>>>> ----------------------------------------------------------------------
>>>> diff --git 
>>>> 
>>>>a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/la
>>>>yo
>>>> uts/OneFlexibleChildHorizontalLayoutLockChildHeight.as
>>>> 
>>>>b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/la
>>>>yo
>>>> uts/OneFlexibleChildHorizontalLayoutLockChildHeight.as
>>>> deleted file mode 100644
>>>> index d170d23..0000000
>>>> --- 
>>>> 
>>>>a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/la
>>>>yo
>>>> uts/OneFlexibleChildHorizontalLayoutLockChildHeight.as
>>>> +++ /dev/null
>>>> @@ -1,91 +0,0 @@
>>>> 
>>>> 
>>>>-//////////////////////////////////////////////////////////////////////
>>>>//
>>>> ////////
>>>> -//
>>>> -//  Licensed to the Apache Software Foundation (ASF) under one or
>>>>more
>>>> -//  contributor license agreements.  See the NOTICE file distributed
>>>> with
>>>> -//  this work for additional information regarding copyright
>>>>ownership.
>>>> -//  The ASF licenses this file to You under the Apache License,
>>>> Version 2.0
>>>> -//  (the "License"); you may not use this file except in compliance
>>>> with
>>>> -//  the License.  You may obtain a copy of the License at
>>>> -//
>>>> -//      
>>>> 
>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.apa
>>>>ch
>>>> 
>>>>e.org%2Flicenses%2FLICENSE-2.0&data=02%7C01%7C%7C699bbb170b2c4f0bf3ae08
>>>>d4
>>>> 
>>>>d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C63637005881876651
>>>>1&
>>>> sdata=bButr5xXaczhl741iZvjXub0l1B72d%2FvImajqD7mvyA%3D&reserved=0
>>>> -//
>>>> -//  Unless required by applicable law or agreed to in writing,
>>>>software
>>>> -//  distributed under the License is distributed on an "AS IS" BASIS,
>>>> -//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>> -//  See the License for the specific language governing permissions
>>>>and
>>>> -//  limitations under the License.
>>>> -//
>>>> 
>>>> 
>>>>-//////////////////////////////////////////////////////////////////////
>>>>//
>>>> ////////
>>>> -package org.apache.flex.html.beads.layouts
>>>> -{
>>>> -	import org.apache.flex.core.LayoutBase;
>>>> -	import org.apache.flex.core.IDocument;
>>>> -	import org.apache.flex.core.ILayoutChild;
>>>> -	import org.apache.flex.core.ILayoutHost;
>>>> -	import org.apache.flex.core.ILayoutView;
>>>> -	import org.apache.flex.core.ILayoutParent;
>>>> -	import org.apache.flex.core.IParentIUIBase;
>>>> -	import org.apache.flex.core.IStrand;
>>>> -	import org.apache.flex.core.IUIBase;
>>>> -	import org.apache.flex.core.ValuesManager;
>>>> -	import org.apache.flex.core.UIBase;
>>>> -	import org.apache.flex.events.Event;
>>>> -	import org.apache.flex.geom.Rectangle;
>>>> -	import org.apache.flex.utils.CSSContainerUtils;
>>>> -	import org.apache.flex.utils.CSSUtils;
>>>> -
>>>> -    /**
>>>> -     *  The OneFlexibleChildHorizontalLayoutLockChildHeight
>>>> -	 *  is a subclass of OneFlexibleChildHorizontalLayout
>>>> -	 *  that sets the flexible child's height to be the height
>>>> -	 *  of the host container.  This is useful when you
>>>> -	 *  don't want the actual child's height to dictate the
>>>> -	 *  height of the container in order to force
>>>> -	 *  scrollbars
>>>> -     *
>>>> -     *  @langversion 3.0
>>>> -     *  @playerversion Flash 10.2
>>>> -     *  @playerversion AIR 2.6
>>>> -     *  @productversion FlexJS 0.0
>>>> -     */
>>>> -	public class OneFlexibleChildHorizontalLayoutLockChildHeight extends
>>>> OneFlexibleChildHorizontalLayout
>>>> -	{
>>>> -        /**
>>>> -         *  Constructor.
>>>> -         *
>>>> -         *  @langversion 3.0
>>>> -         *  @playerversion Flash 10.2
>>>> -         *  @playerversion AIR 2.6
>>>> -         *  @productversion FlexJS 0.0
>>>> -         */
>>>> -		public function OneFlexibleChildHorizontalLayoutLockChildHeight()
>>>> -		{
>>>> -			super();
>>>> -		}
>>>> -
>>>> -        /**
>>>> -         * @copy org.apache.flex.core.IBeadLayout#layout
>>>> -         */
>>>> -		override public function layout():Boolean
>>>> -		{
>>>> -			var ret:Boolean = super.layout();
>>>> -			if (ret)
>>>> -			{
>>>> -				var contentView:ILayoutView = layoutView;
>>>> -	
>>>> -				var n:int = contentView.numElements;
>>>> -
>>>> -				var h:Number = host.height;
>>>> -				for(var i:int=0; i < n; i++) {
>>>> -					var child:UIBase = contentView.getElementAt(i) as UIBase;
>>>> -					if (child != actualChild)
>>>> -						h = child.height;
>>>> -				}
>>>> -				actualChild.setHeight(h);
>>>> -			}
>>>> -			return ret;
>>>> -		}
>>>> -
>>>> -    }
>>>> -
>>>> -}
>>>> 
>>>> 
>>>> 
>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip
>>>>-u
>>>> 
>>>>s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2Fbdd34d2e%2Fframeworks%2
>>>>Fp
>>>> 
>>>>rojects%2FBasic%2Fsrc%2Fmain%2Fflex%2Forg%2Fapache%2Fflex%2Fhtml%2Fbead
>>>>s%
>>>> 
>>>>2Flayouts%2FOneFlexibleChildVerticalLayoutForOverflow.as&data=02%7C01%7
>>>>C%
>>>> 
>>>>7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7
>>>>C0
>>>> 
>>>>%7C0%7C636370058818766511&sdata=WdJnx6IGbPwIxUibKB3UqfKTHgHugWIleqBVsqJ
>>>>5f
>>>> eE%3D&reserved=0
>>>> ----------------------------------------------------------------------
>>>> diff --git 
>>>> 
>>>>a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/la
>>>>yo
>>>> uts/OneFlexibleChildVerticalLayoutForOverflow.as
>>>> 
>>>>b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/la
>>>>yo
>>>> uts/OneFlexibleChildVerticalLayoutForOverflow.as
>>>> new file mode 100644
>>>> index 0000000..5679f80
>>>> --- /dev/null
>>>> +++ 
>>>> 
>>>>b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/la
>>>>yo
>>>> uts/OneFlexibleChildVerticalLayoutForOverflow.as
>>>> @@ -0,0 +1,291 @@
>>>> 
>>>> 
>>>>+//////////////////////////////////////////////////////////////////////
>>>>//
>>>> ////////
>>>> +//
>>>> +//  Licensed to the Apache Software Foundation (ASF) under one or
>>>>more
>>>> +//  contributor license agreements.  See the NOTICE file distributed
>>>> with
>>>> +//  this work for additional information regarding copyright
>>>>ownership.
>>>> +//  The ASF licenses this file to You under the Apache License,
>>>> Version 2.0
>>>> +//  (the "License"); you may not use this file except in compliance
>>>> with
>>>> +//  the License.  You may obtain a copy of the License at
>>>> +//
>>>> +//      
>>>> 
>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.apa
>>>>ch
>>>> 
>>>>e.org%2Flicenses%2FLICENSE-2.0&data=02%7C01%7C%7C699bbb170b2c4f0bf3ae08
>>>>d4
>>>> 
>>>>d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C63637005881876651
>>>>1&
>>>> sdata=bButr5xXaczhl741iZvjXub0l1B72d%2FvImajqD7mvyA%3D&reserved=0
>>>> +//
>>>> +//  Unless required by applicable law or agreed to in writing,
>>>>software
>>>> +//  distributed under the License is distributed on an "AS IS" BASIS,
>>>> +//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>> +//  See the License for the specific language governing permissions
>>>>and
>>>> +//  limitations under the License.
>>>> +//
>>>> 
>>>> 
>>>>+//////////////////////////////////////////////////////////////////////
>>>>//
>>>> ////////
>>>> +package org.apache.flex.html.beads.layouts
>>>> +{
>>>> +	import org.apache.flex.core.LayoutBase;
>>>> +	import org.apache.flex.core.IDocument;
>>>> +	import org.apache.flex.core.ILayoutChild;
>>>> +	import org.apache.flex.core.ILayoutHost;
>>>> +	import org.apache.flex.core.ILayoutView;
>>>> +	import org.apache.flex.core.ILayoutParent;
>>>> +	import org.apache.flex.core.IParentIUIBase;
>>>> +	import org.apache.flex.core.IStrand;
>>>> +	import org.apache.flex.core.IStyleableObject;
>>>> +	import org.apache.flex.core.IUIBase;
>>>> +	import org.apache.flex.core.ValuesManager;
>>>> +	import org.apache.flex.core.UIBase;
>>>> +	import org.apache.flex.events.Event;
>>>> +	import org.apache.flex.geom.Rectangle;
>>>> +	import org.apache.flex.utils.CSSContainerUtils;
>>>> +	import org.apache.flex.utils.CSSUtils;
>>>> +
>>>> +    /**
>>>> +     *  The OneFlexibleChildVerticalLayoutForOverflow is
>>>> +	 *  intended for building apps that clip
>>>> +	 *  and/or scroll the overflow, especially in a
>>>> +	 *  3-pane view like the ASDoc examples.  It does not use
>>>> +	 *  FlexBox because FlexBox wants to grow to the size
>>>> +	 *  of the content without specifying width/height on
>>>> +	 *  the flexible child.  But then the children in
>>>> +	 *  the flexible child cannot use % sizing.
>>>> +	 *  This layout presumes the parent is a known size.
>>>> +     *
>>>> +     *  @langversion 3.0
>>>> +     *  @playerversion Flash 10.2
>>>> +     *  @playerversion AIR 2.6
>>>> +     *  @productversion FlexJS 0.0
>>>> +     */
>>>> +	public class OneFlexibleChildVerticalLayoutForOverflow extends
>>>> LayoutBase implements IOneFlexibleChildLayout, IDocument
>>>> +	{
>>>> +        /**
>>>> +         *  Constructor.
>>>> +         *
>>>> +         *  @langversion 3.0
>>>> +         *  @playerversion Flash 10.2
>>>> +         *  @playerversion AIR 2.6
>>>> +         *  @productversion FlexJS 0.0
>>>> +         */
>>>> +		public function OneFlexibleChildVerticalLayoutForOverflow()
>>>> +		{
>>>> +			super();
>>>> +		}
>>>> +
>>>> +        private var _flexibleChild:String;
>>>> +
>>>> +        protected var actualChild:ILayoutChild;
>>>> +
>>>> +        /**
>>>> +         *  @private
>>>> +         *  The document.
>>>> +         */
>>>> +        private var document:Object;
>>>> +
>>>> +		/**
>>>> +		 *  The id of the flexible child
>>>> +		 *
>>>> +		 *  @langversion 3.0
>>>> +		 *  @playerversion Flash 10.2
>>>> +		 *  @playerversion AIR 2.6
>>>> +		 *  @productversion FlexJS 0.0
>>>> +		 */
>>>> +		public function get flexibleChild():String
>>>> +		{
>>>> +			return _flexibleChild;
>>>> +		}
>>>> +
>>>> +		/**
>>>> +		 * @private
>>>> +		 */
>>>> +		public function set flexibleChild(value:String):void
>>>> +		{
>>>> +			_flexibleChild = value;
>>>> +		}
>>>> +
>>>> +        /**
>>>> +         * @copy org.apache.flex.core.IBeadLayout#layout
>>>> +         */
>>>> +		COMPILE::JS
>>>> +		override public function layout():Boolean
>>>> +		{
>>>> +			var contentView:ILayoutView = layoutView;
>>>> +
>>>> +			actualChild = document[flexibleChild];
>>>> +
>>>> +			var n:int = contentView.numElements;
>>>> +			if (n == 0) return false;
>>>> +
>>>> +			for(var i:int=0; i < n; i++) {
>>>> +				var child:UIBase = contentView.getElementAt(i) as UIBase;
>>>> +				if (child.element.style["display"] != "flex" &&
>>>> child.element.style["display"] != "none")
>>>> +					child.element.style["display"] = "block";
>>>> +			}
>>>> +
>>>> +			var h:Number = host.height;
>>>> +			for(i=0; i < n; i++) {
>>>> +				child = contentView.getElementAt(i) as UIBase;
>>>> +				if (child != actualChild)
>>>> +					h -= child.height;
>>>> +			}
>>>> +			actualChild.height = h;
>>>> +					
>>>> +			return true;
>>>> +		}
>>>> +
>>>> +		COMPILE::SWF
>>>> +		override public function layout():Boolean
>>>> +		{
>>>> +			var contentView:ILayoutView = layoutView;
>>>> +			actualChild = document.hasOwnProperty(flexibleChild) ?
>>>> document[flexibleChild] : null;
>>>> +
>>>> +			var n:Number = contentView.numElements;
>>>> +			if (n == 0) return false;
>>>> +			
>>>> +			var maxWidth:Number = 0;
>>>> +			var maxHeight:Number = 0;
>>>> +			var hostSizedToContent:Boolean = host.isWidthSizedToContent();
>>>> +			var hostWidth:Number = host.width;
>>>> +			var hostHeight:Number = host.height;
>>>> +
>>>> +			var ilc:ILayoutChild;
>>>> +			var data:Object;
>>>> +			var canAdjust:Boolean = false;
>>>> +			var margins:Object;
>>>> +
>>>> +			var paddingMetrics:Rectangle =
>>>> CSSContainerUtils.getPaddingMetrics(host);
>>>> +			var borderMetrics:Rectangle =
>>>> CSSContainerUtils.getBorderMetrics(host);
>>>> +			
>>>> +			// adjust the host's usable size by the metrics. If
>>>> hostSizedToContent, then the
>>>> +			// resulting adjusted value may be less than zero.
>>>> +			hostWidth -= paddingMetrics.left + paddingMetrics.right +
>>>> borderMetrics.left + borderMetrics.right;
>>>> +			hostHeight -= paddingMetrics.top + paddingMetrics.bottom +
>>>> borderMetrics.top + borderMetrics.bottom;
>>>> +
>>>> +			var xpos:Number = borderMetrics.left + paddingMetrics.left;
>>>> +			var ypos:Number = borderMetrics.top + paddingMetrics.left;
>>>> +			var child:IUIBase;
>>>> +			var childWidth:Number;
>>>> +			var i:int;
>>>> +			var childXpos:Number;
>>>> +			var adjustTop:Number = 0;
>>>> +			var adjustBottom:Number = hostHeight + borderMetrics.top +
>>>> paddingMetrics.top;
>>>> +
>>>> +			// first work from top to bottom
>>>> +			for(i=0; i < n; i++)
>>>> +			{
>>>> +				child = contentView.getElementAt(i) as IUIBase;
>>>> +				if (child == null || !child.visible) continue;
>>>> +				if (child == actualChild) break;
>>>> +
>>>> +				margins = childMargins(child, hostWidth, hostHeight);
>>>> +				ilc = child as ILayoutChild;
>>>> +
>>>> +				ypos += margins.top;
>>>> +
>>>> +				childXpos = xpos + margins.left; // default x position
>>>> +
>>>> +				childWidth = child.width;
>>>> +				if (ilc != null)
>>>> +				{
>>>> +					if (!isNaN(ilc.percentWidth)) {
>>>> +						childWidth = hostWidth * ilc.percentWidth/100.0;
>>>> +					}
>>>> +					else if (isNaN(ilc.explicitWidth)) {
>>>> +						childWidth = hostWidth;
>>>> +					}
>>>> +					ilc.setWidth(childWidth);
>>>> +				}
>>>> +
>>>> +				if (ilc) {
>>>> +					ilc.setX(childXpos);
>>>> +					ilc.setY(ypos);
>>>> +
>>>> +					if (!isNaN(ilc.percentHeight)) {
>>>> +						ilc.setHeight(hostHeight * ilc.percentHeight / 100);
>>>> +					}
>>>> +
>>>> +				} else {
>>>> +					child.x = childXpos;
>>>> +					child.y = ypos;
>>>> +				}
>>>> +
>>>> +				ypos += child.height + margins.bottom;
>>>> +				adjustTop = ypos;
>>>> +			}
>>>> +
>>>> +			// then work from bottom to top
>>>> +			ypos = hostHeight + borderMetrics.top + paddingMetrics.top;
>>>> +
>>>> +			for(i=(n-1); actualChild != null && i >= 0; i--)
>>>> +			{
>>>> +				child = contentView.getElementAt(i) as IUIBase;
>>>> +				if (child == null || !child.visible) continue;
>>>> +				if (child == actualChild) break;
>>>> +
>>>> +				margins = childMargins(child, hostWidth, hostHeight);
>>>> +				ilc = child as ILayoutChild;
>>>> +
>>>> +				childXpos = xpos + margins.left; // default x position
>>>> +
>>>> +				childWidth = child.width;
>>>> +				if (ilc != null)
>>>> +				{
>>>> +					if (!isNaN(ilc.percentWidth)) {
>>>> +						childWidth = hostWidth * ilc.percentWidth/100.0;
>>>> +					}
>>>> +					else if (isNaN(ilc.explicitWidth)) {
>>>> +						childWidth = hostWidth;
>>>> +					}
>>>> +					ilc.setWidth(childWidth);
>>>> +				}
>>>> +
>>>> +				if (ilc) {
>>>> +					if (!isNaN(ilc.percentHeight)) {
>>>> +						ilc.setHeight(hostHeight * ilc.percentHeight / 100);
>>>> +					}
>>>> +				}
>>>> +
>>>> +				ypos -= child.height + margins.bottom;
>>>> +
>>>> +				if (ilc) {
>>>> +					ilc.setX(childXpos);
>>>> +					ilc.setY(ypos);
>>>> +				} else {
>>>> +					child.x = childXpos;
>>>> +					child.y = ypos;
>>>> +				}
>>>> +
>>>> +				ypos -= margins.top;
>>>> +				adjustBottom = ypos;
>>>> +			}
>>>> +
>>>> +			// now adjust the actualChild to fill the space.
>>>> +			if (actualChild != null) {
>>>> +				margins = childMargins(actualChild, hostWidth, hostHeight);
>>>> +				ilc = actualChild as ILayoutChild;
>>>> +				childWidth = actualChild.width;
>>>> +				if (ilc != null)
>>>> +				{
>>>> +					if (!isNaN(ilc.percentWidth)) {
>>>> +						childWidth = hostWidth * ilc.percentWidth/100.0;
>>>> +					}
>>>> +					else if (isNaN(ilc.explicitWidth)) {
>>>> +						childWidth = hostWidth;
>>>> +					}
>>>> +					ilc.setWidth(childWidth);
>>>> +				}
>>>> +				childXpos = xpos + margins.left;
>>>> +					
>>>> +				actualChild.x = childXpos
>>>> +				actualChild.y = adjustTop + margins.top;
>>>> +				if (ilc) {
>>>> +					ilc.setHeight((adjustBottom-margins.bottom) -
>>>> (adjustTop+margins.top));
>>>> +				} else {
>>>> +					actualChild.height = (adjustBottom-margins.bottom) -
>>>> (adjustTop+margins.top);
>>>> +				}
>>>> +			}
>>>> +
>>>> +			return true;
>>>> +		}
>>>> +
>>>> +        public function setDocument(document:Object, id:String =
>>>> null):void
>>>> +        {
>>>> +            this.document = document;
>>>> +        }
>>>> +    }
>>>> +
>>>> +}
>>>> 
>>>> 
>>>> 
>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip
>>>>-u
>>>> 
>>>>s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2Fbdd34d2e%2Fframeworks%2
>>>>Fp
>>>> 
>>>>rojects%2FBasic%2Fsrc%2Fmain%2Fflex%2Forg%2Fapache%2Fflex%2Fhtml%2Fbead
>>>>s%
>>>> 
>>>>2Flayouts%2FOneFlexibleChildVerticalLayoutLockChildWidth.as&data=02%7C0
>>>>1%
>>>> 
>>>>7C%7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee
>>>>1%
>>>> 
>>>>7C0%7C0%7C636370058818766511&sdata=4Q4bkts0dp4wvvLUtu2yTYNg%2Fr7jS8bRt4
>>>>co
>>>> 3nYbPKc%3D&reserved=0
>>>> ----------------------------------------------------------------------
>>>> diff --git 
>>>> 
>>>>a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/la
>>>>yo
>>>> uts/OneFlexibleChildVerticalLayoutLockChildWidth.as
>>>> 
>>>>b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/la
>>>>yo
>>>> uts/OneFlexibleChildVerticalLayoutLockChildWidth.as
>>>> deleted file mode 100644
>>>> index 7415299..0000000
>>>> --- 
>>>> 
>>>>a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/la
>>>>yo
>>>> uts/OneFlexibleChildVerticalLayoutLockChildWidth.as
>>>> +++ /dev/null
>>>> @@ -1,93 +0,0 @@
>>>> 
>>>> 
>>>>-//////////////////////////////////////////////////////////////////////
>>>>//
>>>> ////////
>>>> -//
>>>> -//  Licensed to the Apache Software Foundation (ASF) under one or 
>>>>more
>>>> -//  contributor license agreements.  See the NOTICE file distributed
>>>> with
>>>> -//  this work for additional information regarding copyright 
>>>>ownership.
>>>> -//  The ASF licenses this file to You under the Apache License,
>>>> Version 2.0
>>>> -//  (the "License"); you may not use this file except in compliance
>>>> with
>>>> -//  the License.  You may obtain a copy of the License at
>>>> -//
>>>> -//      
>>>> 
>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.apa
>>>>ch
>>>> 
>>>>e.org%2Flicenses%2FLICENSE-2.0&data=02%7C01%7C%7C699bbb170b2c4f0bf3ae08
>>>>d4
>>>> 
>>>>d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C63637005881876651
>>>>1&
>>>> sdata=bButr5xXaczhl741iZvjXub0l1B72d%2FvImajqD7mvyA%3D&reserved=0
>>>> -//
>>>> -//  Unless required by applicable law or agreed to in writing, 
>>>>software
>>>> -//  distributed under the License is distributed on an "AS IS" BASIS,
>>>> -//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
>>>> implied.
>>>> -//  See the License for the specific language governing permissions 
>>>>and
>>>> -//  limitations under the License.
>>>> -//
>>>> 
>>>> 
>>>>-//////////////////////////////////////////////////////////////////////
>>>>//
>>>> ////////
>>>> -package org.apache.flex.html.beads.layouts
>>>> -{
>>>> -	import org.apache.flex.core.LayoutBase;
>>>> -	import org.apache.flex.core.IDocument;
>>>> -	import org.apache.flex.core.ILayoutChild;
>>>> -	import org.apache.flex.core.ILayoutHost;
>>>> -	import org.apache.flex.core.ILayoutView;
>>>> -	import org.apache.flex.core.ILayoutParent;
>>>> -	import org.apache.flex.core.IParentIUIBase;
>>>> -	import org.apache.flex.core.IStrand;
>>>> -	import org.apache.flex.core.IStyleableObject;
>>>> -	import org.apache.flex.core.IUIBase;
>>>> -	import org.apache.flex.core.ValuesManager;
>>>> -	import org.apache.flex.core.UIBase;
>>>> -	import org.apache.flex.events.Event;
>>>> -	import org.apache.flex.geom.Rectangle;
>>>> -	import org.apache.flex.utils.CSSContainerUtils;
>>>> -	import org.apache.flex.utils.CSSUtils;
>>>> -
>>>> -    /**
>>>> -     *  The OneFlexibleChildHorizontalLayoutLockChildHeight 
>>>> -	 *  is a subclass of OneFlexibleChildHorizontalLayout
>>>> -	 *  that sets the flexible child's height to be the height
>>>> -	 *  of the host container.  This is useful when you
>>>> -	 *  don't want the actual child's height to dictate the
>>>> -	 *  height of the container in order to force
>>>> -	 *  scrollbars or line wrapping.
>>>> -     *
>>>> -     *  @langversion 3.0
>>>> -     *  @playerversion Flash 10.2
>>>> -     *  @playerversion AIR 2.6
>>>> -     *  @productversion FlexJS 0.0
>>>> -     */
>>>> -	public class OneFlexibleChildVerticalLayoutLockChildWidth extends 
>>>> OneFlexibleChildVerticalLayout
>>>> -	{
>>>> -        /**
>>>> -         *  Constructor.
>>>> -         *
>>>> -         *  @langversion 3.0
>>>> -         *  @playerversion Flash 10.2
>>>> -         *  @playerversion AIR 2.6
>>>> -         *  @productversion FlexJS 0.0
>>>> -         */
>>>> -		public function OneFlexibleChildVerticalLayoutLockChildWidth()
>>>> -		{
>>>> -			super();
>>>> -		}
>>>> -
>>>> -        /**
>>>> -         * @copy org.apache.flex.core.IBeadLayout#layout
>>>> -         */
>>>> -		override public function layout():Boolean
>>>> -		{
>>>> -			var ret:Boolean = super.layout();
>>>> -			if (ret)
>>>> -			{
>>>> -				var contentView:ILayoutView = layoutView;
>>>> -	
>>>> -				var n:int = contentView.numElements;
>>>> -
>>>> -				var w:Number = host.width;
>>>> -				for(var i:int=0; i < n; i++) {
>>>> -					var child:UIBase = contentView.getElementAt(i) as UIBase;
>>>> -					if (child != actualChild)
>>>> -						w = child.width;
>>>> -				}
>>>> -				
>>>> -				actualChild.setWidth(w); 
>>>> -			}
>>>> -			return ret;
>>>> -		}
>>>> -
>>>> -    }
>>>> -
>>>> -}
>>>> 
>>>> 
>>>> 
>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip
>>>>-u
>>>> 
>>>>s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2Fbdd34d2e%2Fframeworks%2
>>>>Fp
>>>> 
>>>>rojects%2FBasic%2Fsrc%2Fmain%2Fresources%2Fbasic-manifest.xml&data=02%7
>>>>C0
>>>> 
>>>>1%7C%7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178dec
>>>>ee
>>>> 
>>>>1%7C0%7C0%7C636370058818766511&sdata=mPldYCuDfp%2BxQ4QROdu4BWSl3Dh7HP19
>>>>VX
>>>> BR3B3IXOg%3D&reserved=0
>>>> ----------------------------------------------------------------------
>>>> diff --git 
>>>> a/frameworks/projects/Basic/src/main/resources/basic-manifest.xml 
>>>> b/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
>>>> index 7cbc05d..09bb1a3 100644
>>>> --- a/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
>>>> +++ b/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
>>>> @@ -150,8 +150,8 @@
>>>>    <component id="FlexibleFirstChildHorizontalLayout" 
>>>> 
>>>>class="org.apache.flex.html.beads.layouts.FlexibleFirstChildHorizontalL
>>>>ay
>>>> out"/>
>>>>    <component id="OneFlexibleChildVerticalLayout" 
>>>> 
>>>>class="org.apache.flex.html.beads.layouts.OneFlexibleChildVerticalLayou
>>>>t"
>>>> />
>>>>    <component id="OneFlexibleChildHorizontalLayout" 
>>>> 
>>>>class="org.apache.flex.html.beads.layouts.OneFlexibleChildHorizontalLay
>>>>ou
>>>> t"/>
>>>> -    <component id="OneFlexibleChildVerticalLayoutLockChildWidth" 
>>>> 
>>>>class="org.apache.flex.html.beads.layouts.OneFlexibleChildVerticalLayou
>>>>tL
>>>> ockChildWidth"/>
>>>> -    <component id="OneFlexibleChildHorizontalLayoutLockChildHeight" 
>>>> 
>>>>class="org.apache.flex.html.beads.layouts.OneFlexibleChildHorizontalLay
>>>>ou
>>>> tLockChildHeight"/>
>>>> +    <component id="OneFlexibleChildVerticalLayoutForOverflow" 
>>>> 
>>>>class="org.apache.flex.html.beads.layouts.OneFlexibleChildVerticalLayou
>>>>tF
>>>> orOverflow"/>
>>>> +    <component id="OneFlexibleChildHorizontalLayoutForOverflow" 
>>>> 
>>>>class="org.apache.flex.html.beads.layouts.OneFlexibleChildHorizontalLay
>>>>ou
>>>> tForOverflow"/>
>>>>    <component id="MXMLBeadView" 
>>>> class="org.apache.flex.html.MXMLBeadView"/>
>>>> 
>>>>    <component id="SubAppLoader" 
>>>> class="org.apache.flex.html.SubAppLoader" />
>>>> 
>>> 
>> 
>
>


Re: [07/13] git commit: [flex-asjs] [refs/heads/release0.8.0] - give up on trying to use FlexBox for full-screen 3-pane views. FlexBox seems more happy stretching to content size instead of clipping at the computed flex-ed size. These custom layouts wi...

Posted by Harbs <ha...@gmail.com>.
The only example I found was the ASDoc app.

I switched it and it appears to work. (I pushed my changes.)

> On Jul 31, 2017, at 7:35 AM, Alex Harui <ah...@adobe.com.INVALID> wrote:
> 
> It will either work in the examples that use it or it won't.  Try it and
> find out.
> 
> -Alex
> 
> On 7/30/17, 3:04 AM, "Harbs" <ha...@gmail.com> wrote:
> 
>> I think I just ran into the same issue.
>> 
>> This layout seems to more-or-less do the job, but it’s kind of heavy.
>> 
>> I did some research into flexbox and it appear that setting flex-basis to
>> 0 does the job. It needs to be set on ONLY the one flexible child.
>> 
>> Here’s a codepen which shows a use case.
>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcodepen.i
>> o%2Fjpdevries%2Fpen%2FoXxPOP&data=02%7C01%7C%7C699bbb170b2c4f0bf3ae08d4d73
>> 2638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636370058818766511&sdat
>> a=tSTNYANFFiQ4DMGYbAZaz0dJ9qYDYpcwP2ZoSYRIcG8%3D&reserved=0
>> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcodepen.
>> io%2Fjpdevries%2Fpen%2FoXxPOP&data=02%7C01%7C%7C699bbb170b2c4f0bf3ae08d4d7
>> 32638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636370058818766511&sda
>> ta=tSTNYANFFiQ4DMGYbAZaz0dJ9qYDYpcwP2ZoSYRIcG8%3D&reserved=0>
>> 
>> I noticed that the OneFlexibleLayouts have code which set the flex-basis
>> of the children if a percentage value is set. When setting the size of
>> the one flexible child to 0% this causes the flex-basis to be set to 0
>> and then the one flexible child will fit the remaining space even if it
>> might overflow because of its children.
>> 
>> I have wasted quite a bit of time before I discovered this. I’m not sure
>> whether the OneFlexibleLayout classes should be changed, or maybe we need
>> documentation that to fit content that might overflow, the percentage
>> should be set to 0. It could be there are cases where the entire
>> OnFlexibleLayout should be fit when smaller and expand (and not scroll)
>> when bigger. In that case, the current behavior might be correct.
>> 
>> Thoughts?
>> Harbs
>> 
>>> On May 23, 2017, at 10:16 AM, aharui@apache.org wrote:
>>> 
>>> give up on trying to use FlexBox for full-screen 3-pane views.  FlexBox
>>> seems more happy stretching to content size instead of clipping at the
>>> computed flex-ed size.  These custom layouts will do the proper sizing
>>> 
>>> 
>>> Project: 
>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-u
>>> s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Frepo&data=02%7C01%7C%7C699bbb170
>>> b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6363
>>> 70058818766511&sdata=P%2FMkfZAwCYwpQEoCe5UGx8tW0mZaIZsMdDg6VxlaKWA%3D&res
>>> erved=0
>>> Commit: 
>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-u
>>> s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fcommit%2Fbdd34d2e&data=02%7C01%7
>>> C%7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7
>>> C0%7C0%7C636370058818766511&sdata=QosBAau8lE4nCS7c%2F8B6GDc%2Bqa%2BpSkoP5
>>> 5x3oji5FnI%3D&reserved=0
>>> Tree: 
>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-u
>>> s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Ftree%2Fbdd34d2e&data=02%7C01%7C%
>>> 7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0
>>> %7C0%7C636370058818766511&sdata=T4CCqwtn%2FgFTmAnaI%2BuCXqtX0P75ebpKVZOxf
>>> XOTbIE%3D&reserved=0
>>> Diff: 
>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-u
>>> s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fdiff%2Fbdd34d2e&data=02%7C01%7C%
>>> 7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0
>>> %7C0%7C636370058818766511&sdata=f8WVJXc81KrLMuUgRckULYCfglNL7d%2BfdjSbBBU
>>> 0fRo%3D&reserved=0
>>> 
>>> Branch: refs/heads/release0.8.0
>>> Commit: bdd34d2ef4d8117fa1b222ac470482a42dbea9eb
>>> Parents: c505d67
>>> Author: Alex Harui <ah...@apache.org>
>>> Authored: Mon May 22 10:12:02 2017 -0700
>>> Committer: Alex Harui <ah...@apache.org>
>>> Committed: Tue May 23 00:15:56 2017 -0700
>>> 
>>> ----------------------------------------------------------------------
>>> ...eFlexibleChildHorizontalLayoutForOverflow.as | 290 ++++++++++++++++++
>>> ...xibleChildHorizontalLayoutLockChildHeight.as |  91 ------
>>> ...OneFlexibleChildVerticalLayoutForOverflow.as | 291
>>> +++++++++++++++++++
>>> ...FlexibleChildVerticalLayoutLockChildWidth.as |  93 ------
>>> .../Basic/src/main/resources/basic-manifest.xml |   4 +-
>>> 5 files changed, 583 insertions(+), 186 deletions(-)
>>> ----------------------------------------------------------------------
>>> 
>>> 
>>> 
>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-u
>>> s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2Fbdd34d2e%2Fframeworks%2Fp
>>> rojects%2FBasic%2Fsrc%2Fmain%2Fflex%2Forg%2Fapache%2Fflex%2Fhtml%2Fbeads%
>>> 2Flayouts%2FOneFlexibleChildHorizontalLayoutForOverflow.as&data=02%7C01%7
>>> C%7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7
>>> C0%7C0%7C636370058818766511&sdata=L7BjG%2BM7nTwguX%2BNaE5Op6BIT7XZrEqKFop
>>> 0D%2Frc0Aw%3D&reserved=0
>>> ----------------------------------------------------------------------
>>> diff --git 
>>> a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layo
>>> uts/OneFlexibleChildHorizontalLayoutForOverflow.as
>>> b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layo
>>> uts/OneFlexibleChildHorizontalLayoutForOverflow.as
>>> new file mode 100644
>>> index 0000000..c6abc22
>>> --- /dev/null
>>> +++ 
>>> b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layo
>>> uts/OneFlexibleChildHorizontalLayoutForOverflow.as
>>> @@ -0,0 +1,290 @@
>>> 
>>> +////////////////////////////////////////////////////////////////////////
>>> ////////
>>> +//
>>> +//  Licensed to the Apache Software Foundation (ASF) under one or more
>>> +//  contributor license agreements.  See the NOTICE file distributed
>>> with
>>> +//  this work for additional information regarding copyright ownership.
>>> +//  The ASF licenses this file to You under the Apache License,
>>> Version 2.0
>>> +//  (the "License"); you may not use this file except in compliance
>>> with
>>> +//  the License.  You may obtain a copy of the License at
>>> +//
>>> +//      
>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.apach
>>> e.org%2Flicenses%2FLICENSE-2.0&data=02%7C01%7C%7C699bbb170b2c4f0bf3ae08d4
>>> d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636370058818766511&
>>> sdata=bButr5xXaczhl741iZvjXub0l1B72d%2FvImajqD7mvyA%3D&reserved=0
>>> +//
>>> +//  Unless required by applicable law or agreed to in writing, software
>>> +//  distributed under the License is distributed on an "AS IS" BASIS,
>>> +//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>> implied.
>>> +//  See the License for the specific language governing permissions and
>>> +//  limitations under the License.
>>> +//
>>> 
>>> +////////////////////////////////////////////////////////////////////////
>>> ////////
>>> +package org.apache.flex.html.beads.layouts
>>> +{
>>> +	import org.apache.flex.core.LayoutBase;
>>> +	import org.apache.flex.core.IDocument;
>>> +	import org.apache.flex.core.ILayoutChild;
>>> +	import org.apache.flex.core.ILayoutHost;
>>> +	import org.apache.flex.core.ILayoutView;
>>> +	import org.apache.flex.core.ILayoutParent;
>>> +	import org.apache.flex.core.IParentIUIBase;
>>> +	import org.apache.flex.core.IStrand;
>>> +	import org.apache.flex.core.IUIBase;
>>> +	import org.apache.flex.core.ValuesManager;
>>> +	import org.apache.flex.core.UIBase;
>>> +	import org.apache.flex.events.Event;
>>> +	import org.apache.flex.geom.Rectangle;
>>> +	import org.apache.flex.utils.CSSContainerUtils;
>>> +	import org.apache.flex.utils.CSSUtils;
>>> +
>>> +    /**
>>> +     *  The OneFlexibleChildHorizontalLayoutForOverflowis
>>> +	 *  intended for building apps that clip
>>> +	 *  and/or scroll the overflow, especially in a
>>> +	 *  3-pane view like the ASDoc examples.  It does not use
>>> +	 *  FlexBox because FlexBox wants to grow to the size
>>> +	 *  of the content without specifying width/height on
>>> +	 *  the flexible child.  But then the children in
>>> +	 *  the flexible child cannot use % sizing.
>>> +	 *  This layout presumes the parent is a known size.
>>> +	 *
>>> +     *  @langversion 3.0
>>> +     *  @playerversion Flash 10.2
>>> +     *  @playerversion AIR 2.6
>>> +     *  @productversion FlexJS 0.0
>>> +     */
>>> +	public class OneFlexibleChildHorizontalLayoutForOverflow extends
>>> LayoutBase implements IOneFlexibleChildLayout, IDocument
>>> +	{
>>> +        /**
>>> +         *  Constructor.
>>> +         *
>>> +         *  @langversion 3.0
>>> +         *  @playerversion Flash 10.2
>>> +         *  @playerversion AIR 2.6
>>> +         *  @productversion FlexJS 0.0
>>> +         */
>>> +		public function OneFlexibleChildHorizontalLayoutForOverflow()
>>> +		{
>>> +			super();
>>> +		}
>>> +
>>> +        private var _flexibleChild:String;
>>> +
>>> +        protected var actualChild:ILayoutChild;
>>> +
>>> +        /**
>>> +         *  @private
>>> +         *  The document.
>>> +         */
>>> +        private var document:Object;
>>> +
>>> +		/**
>>> +		 *  The id of the flexible child
>>> +		 *
>>> +		 *  @langversion 3.0
>>> +		 *  @playerversion Flash 10.2
>>> +		 *  @playerversion AIR 2.6
>>> +		 *  @productversion FlexJS 0.0
>>> +		 */
>>> +		public function get flexibleChild():String
>>> +		{
>>> +			return _flexibleChild;
>>> +		}
>>> +
>>> +		/**
>>> +		 * @private
>>> +		 */
>>> +		public function set flexibleChild(value:String):void
>>> +		{
>>> +			_flexibleChild = value;
>>> +		}
>>> +
>>> +        /**
>>> +         * @copy org.apache.flex.core.IBeadLayout#layout
>>> +         */
>>> +		COMPILE::JS
>>> +		override public function layout():Boolean
>>> +		{
>>> +			var contentView:ILayoutView = layoutView;
>>> +
>>> +			actualChild = document[flexibleChild];
>>> +
>>> +			var n:int = contentView.numElements;
>>> +			if (n == 0) return false;
>>> +
>>> +			for(var i:int=0; i < n; i++) {
>>> +				var child:UIBase = contentView.getElementAt(i) as UIBase;
>>> +				if (child.element.style["display"] != "inline-flex" &&
>>> child.element.style["display"] != "none")
>>> +					child.element.style["display"] = "inline-block";
>>> +			}
>>> +
>>> +			var w:Number = host.width;
>>> +			for(i=0; i < n; i++) {
>>> +				child = contentView.getElementAt(i) as UIBase;
>>> +				if (child != actualChild)
>>> +					w -= child.width;
>>> +			}
>>> +			actualChild.width = w;
>>> +					
>>> +			return true;
>>> +		}
>>> +
>>> +		COMPILE::SWF
>>> +		override public function layout():Boolean
>>> +		{
>>> +			var contentView:ILayoutView = layoutView;
>>> +			actualChild = document.hasOwnProperty(flexibleChild) ?
>>> document[flexibleChild] : null;
>>> +
>>> +			var n:Number = contentView.numElements;
>>> +			if (n == 0) return false;
>>> +			
>>> +			var maxWidth:Number = 0;
>>> +			var maxHeight:Number = 0;
>>> +			var hostSizedToContent:Boolean = host.isHeightSizedToContent();
>>> +			var hostWidth:Number = host.width;
>>> +			var hostHeight:Number = host.height;
>>> +
>>> +			var ilc:ILayoutChild;
>>> +			var data:Object;
>>> +			var canAdjust:Boolean = false;
>>> +			var margins:Object;
>>> +
>>> +			var paddingMetrics:Rectangle =
>>> CSSContainerUtils.getPaddingMetrics(host);
>>> +			var borderMetrics:Rectangle =
>>> CSSContainerUtils.getBorderMetrics(host);
>>> +			
>>> +			// adjust the host's usable size by the metrics. If
>>> hostSizedToContent, then the
>>> +			// resulting adjusted value may be less than zero.
>>> +			hostWidth -= paddingMetrics.left + paddingMetrics.right +
>>> borderMetrics.left + borderMetrics.right;
>>> +			hostHeight -= paddingMetrics.top + paddingMetrics.bottom +
>>> borderMetrics.top + borderMetrics.bottom;
>>> +
>>> +			var xpos:Number = borderMetrics.left + paddingMetrics.left;
>>> +			var ypos:Number = borderMetrics.top + paddingMetrics.left;
>>> +			var child:IUIBase;
>>> +			var childHeight:Number;
>>> +			var i:int;
>>> +			var childYpos:Number;
>>> +			var adjustLeft:Number = 0;
>>> +			var adjustRight:Number = hostWidth + borderMetrics.left +
>>> paddingMetrics.left;
>>> +
>>> +			// first work from left to right
>>> +			for(i=0; i < n; i++)
>>> +			{
>>> +				child = contentView.getElementAt(i) as IUIBase;
>>> +				if (child == null || !child.visible) continue;
>>> +				if (child == actualChild) break;
>>> +
>>> +				margins = childMargins(child, hostWidth, hostHeight);
>>> +				ilc = child as ILayoutChild;
>>> +
>>> +				xpos += margins.left;
>>> +
>>> +				childYpos = ypos + margins.top; // default y position
>>> +
>>> +				childHeight = child.height;
>>> +				if (ilc != null)
>>> +				{
>>> +					if (!isNaN(ilc.percentHeight)) {
>>> +						childHeight = host.height * ilc.percentHeight/100.0;
>>> +					}
>>> +					else if (isNaN(ilc.explicitHeight)) {
>>> +						childHeight = host.height;
>>> +					}
>>> +					ilc.setHeight(childHeight);
>>> +				}
>>> +
>>> +				if (ilc) {
>>> +					ilc.setX(xpos);
>>> +					ilc.setY(childYpos);
>>> +
>>> +					if (!isNaN(ilc.percentWidth)) {
>>> +						ilc.setWidth(hostWidth * ilc.percentWidth / 100);
>>> +					}
>>> +
>>> +				} else {
>>> +					child.x = xpos;
>>> +					child.y = childYpos;
>>> +				}
>>> +
>>> +				xpos += child.width + margins.right;
>>> +				adjustLeft = xpos;
>>> +			}
>>> +
>>> +			// then work from right to left
>>> +			xpos = hostWidth + borderMetrics.left + paddingMetrics.left;
>>> +
>>> +			for(i=(n-1); actualChild != null && i >= 0; i--)
>>> +			{
>>> +				child = contentView.getElementAt(i) as IUIBase;
>>> +				if (child == null || !child.visible) continue;
>>> +				if (child == actualChild) break;
>>> +
>>> +				margins = childMargins(child, hostWidth, hostHeight);
>>> +				ilc = child as ILayoutChild;
>>> +
>>> +				childYpos = ypos + margins.top; // default y position
>>> +
>>> +				childHeight = child.height;
>>> +				if (ilc != null)
>>> +				{
>>> +					if (!isNaN(ilc.percentHeight)) {
>>> +						childHeight = host.height * ilc.percentHeight/100.0;
>>> +					}
>>> +					else if (isNaN(ilc.explicitHeight)) {
>>> +						childHeight = host.height;
>>> +					}
>>> +					ilc.setHeight(childHeight);
>>> +				}
>>> +
>>> +				if (ilc) {
>>> +					if (!isNaN(ilc.percentWidth)) {
>>> +						ilc.setWidth(hostWidth * ilc.percentWidth / 100);
>>> +					}
>>> +				}
>>> +
>>> +				xpos -= child.width + margins.right;
>>> +
>>> +				if (ilc) {
>>> +					ilc.setX(xpos);
>>> +					ilc.setY(childYpos);
>>> +				} else {
>>> +					child.x = xpos;
>>> +					child.y = childYpos;
>>> +				}
>>> +
>>> +				xpos -= margins.left;
>>> +				adjustRight = xpos;
>>> +			}
>>> +
>>> +			// now adjust the actualChild to fill the space.
>>> +			if (actualChild != null) {
>>> +				margins = childMargins(actualChild, hostWidth, hostHeight);
>>> +				ilc = actualChild as ILayoutChild;
>>> +				childHeight = actualChild.height;
>>> +				if (ilc != null)
>>> +				{
>>> +					if (!isNaN(ilc.percentHeight)) {
>>> +						childHeight = host.height * ilc.percentHeight/100.0;
>>> +					}
>>> +					else if (isNaN(ilc.explicitHeight)) {
>>> +						childHeight = host.height;
>>> +					}
>>> +					ilc.setHeight(childHeight);
>>> +				}
>>> +				childYpos = ypos + margins.top;
>>> +				actualChild.x = adjustLeft + margins.left;
>>> +				actualChild.y = childYpos;
>>> +				if (ilc) {
>>> +					ilc.setWidth((adjustRight-margins.right) -
>>> (adjustLeft+margins.left));
>>> +				} else {
>>> +					actualChild.width = (adjustRight-margins.right) -
>>> (adjustLeft+margins.left);
>>> +				}
>>> +			}
>>> +
>>> +            return true;
>>> +		}
>>> +
>>> +        public function setDocument(document:Object, id:String =
>>> null):void
>>> +        {
>>> +            this.document = document;
>>> +        }
>>> +
>>> +    }
>>> +
>>> +}
>>> 
>>> 
>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-u
>>> s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2Fbdd34d2e%2Fframeworks%2Fp
>>> rojects%2FBasic%2Fsrc%2Fmain%2Fflex%2Forg%2Fapache%2Fflex%2Fhtml%2Fbeads%
>>> 2Flayouts%2FOneFlexibleChildHorizontalLayoutLockChildHeight.as&data=02%7C
>>> 01%7C%7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178dece
>>> e1%7C0%7C0%7C636370058818766511&sdata=Ir1Siye21IUzzijpvWA1XmQN0AbHktLu%2F
>>> u3h%2BRtBZT0%3D&reserved=0
>>> ----------------------------------------------------------------------
>>> diff --git 
>>> a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layo
>>> uts/OneFlexibleChildHorizontalLayoutLockChildHeight.as
>>> b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layo
>>> uts/OneFlexibleChildHorizontalLayoutLockChildHeight.as
>>> deleted file mode 100644
>>> index d170d23..0000000
>>> --- 
>>> a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layo
>>> uts/OneFlexibleChildHorizontalLayoutLockChildHeight.as
>>> +++ /dev/null
>>> @@ -1,91 +0,0 @@
>>> 
>>> -////////////////////////////////////////////////////////////////////////
>>> ////////
>>> -//
>>> -//  Licensed to the Apache Software Foundation (ASF) under one or more
>>> -//  contributor license agreements.  See the NOTICE file distributed
>>> with
>>> -//  this work for additional information regarding copyright ownership.
>>> -//  The ASF licenses this file to You under the Apache License,
>>> Version 2.0
>>> -//  (the "License"); you may not use this file except in compliance
>>> with
>>> -//  the License.  You may obtain a copy of the License at
>>> -//
>>> -//      
>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.apach
>>> e.org%2Flicenses%2FLICENSE-2.0&data=02%7C01%7C%7C699bbb170b2c4f0bf3ae08d4
>>> d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636370058818766511&
>>> sdata=bButr5xXaczhl741iZvjXub0l1B72d%2FvImajqD7mvyA%3D&reserved=0
>>> -//
>>> -//  Unless required by applicable law or agreed to in writing, software
>>> -//  distributed under the License is distributed on an "AS IS" BASIS,
>>> -//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>> implied.
>>> -//  See the License for the specific language governing permissions and
>>> -//  limitations under the License.
>>> -//
>>> 
>>> -////////////////////////////////////////////////////////////////////////
>>> ////////
>>> -package org.apache.flex.html.beads.layouts
>>> -{
>>> -	import org.apache.flex.core.LayoutBase;
>>> -	import org.apache.flex.core.IDocument;
>>> -	import org.apache.flex.core.ILayoutChild;
>>> -	import org.apache.flex.core.ILayoutHost;
>>> -	import org.apache.flex.core.ILayoutView;
>>> -	import org.apache.flex.core.ILayoutParent;
>>> -	import org.apache.flex.core.IParentIUIBase;
>>> -	import org.apache.flex.core.IStrand;
>>> -	import org.apache.flex.core.IUIBase;
>>> -	import org.apache.flex.core.ValuesManager;
>>> -	import org.apache.flex.core.UIBase;
>>> -	import org.apache.flex.events.Event;
>>> -	import org.apache.flex.geom.Rectangle;
>>> -	import org.apache.flex.utils.CSSContainerUtils;
>>> -	import org.apache.flex.utils.CSSUtils;
>>> -
>>> -    /**
>>> -     *  The OneFlexibleChildHorizontalLayoutLockChildHeight
>>> -	 *  is a subclass of OneFlexibleChildHorizontalLayout
>>> -	 *  that sets the flexible child's height to be the height
>>> -	 *  of the host container.  This is useful when you
>>> -	 *  don't want the actual child's height to dictate the
>>> -	 *  height of the container in order to force
>>> -	 *  scrollbars
>>> -     *
>>> -     *  @langversion 3.0
>>> -     *  @playerversion Flash 10.2
>>> -     *  @playerversion AIR 2.6
>>> -     *  @productversion FlexJS 0.0
>>> -     */
>>> -	public class OneFlexibleChildHorizontalLayoutLockChildHeight extends
>>> OneFlexibleChildHorizontalLayout
>>> -	{
>>> -        /**
>>> -         *  Constructor.
>>> -         *
>>> -         *  @langversion 3.0
>>> -         *  @playerversion Flash 10.2
>>> -         *  @playerversion AIR 2.6
>>> -         *  @productversion FlexJS 0.0
>>> -         */
>>> -		public function OneFlexibleChildHorizontalLayoutLockChildHeight()
>>> -		{
>>> -			super();
>>> -		}
>>> -
>>> -        /**
>>> -         * @copy org.apache.flex.core.IBeadLayout#layout
>>> -         */
>>> -		override public function layout():Boolean
>>> -		{
>>> -			var ret:Boolean = super.layout();
>>> -			if (ret)
>>> -			{
>>> -				var contentView:ILayoutView = layoutView;
>>> -	
>>> -				var n:int = contentView.numElements;
>>> -
>>> -				var h:Number = host.height;
>>> -				for(var i:int=0; i < n; i++) {
>>> -					var child:UIBase = contentView.getElementAt(i) as UIBase;
>>> -					if (child != actualChild)
>>> -						h = child.height;
>>> -				}
>>> -				actualChild.setHeight(h);
>>> -			}
>>> -			return ret;
>>> -		}
>>> -
>>> -    }
>>> -
>>> -}
>>> 
>>> 
>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-u
>>> s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2Fbdd34d2e%2Fframeworks%2Fp
>>> rojects%2FBasic%2Fsrc%2Fmain%2Fflex%2Forg%2Fapache%2Fflex%2Fhtml%2Fbeads%
>>> 2Flayouts%2FOneFlexibleChildVerticalLayoutForOverflow.as&data=02%7C01%7C%
>>> 7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0
>>> %7C0%7C636370058818766511&sdata=WdJnx6IGbPwIxUibKB3UqfKTHgHugWIleqBVsqJ5f
>>> eE%3D&reserved=0
>>> ----------------------------------------------------------------------
>>> diff --git 
>>> a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layo
>>> uts/OneFlexibleChildVerticalLayoutForOverflow.as
>>> b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layo
>>> uts/OneFlexibleChildVerticalLayoutForOverflow.as
>>> new file mode 100644
>>> index 0000000..5679f80
>>> --- /dev/null
>>> +++ 
>>> b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layo
>>> uts/OneFlexibleChildVerticalLayoutForOverflow.as
>>> @@ -0,0 +1,291 @@
>>> 
>>> +////////////////////////////////////////////////////////////////////////
>>> ////////
>>> +//
>>> +//  Licensed to the Apache Software Foundation (ASF) under one or more
>>> +//  contributor license agreements.  See the NOTICE file distributed
>>> with
>>> +//  this work for additional information regarding copyright ownership.
>>> +//  The ASF licenses this file to You under the Apache License,
>>> Version 2.0
>>> +//  (the "License"); you may not use this file except in compliance
>>> with
>>> +//  the License.  You may obtain a copy of the License at
>>> +//
>>> +//      
>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.apach
>>> e.org%2Flicenses%2FLICENSE-2.0&data=02%7C01%7C%7C699bbb170b2c4f0bf3ae08d4
>>> d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636370058818766511&
>>> sdata=bButr5xXaczhl741iZvjXub0l1B72d%2FvImajqD7mvyA%3D&reserved=0
>>> +//
>>> +//  Unless required by applicable law or agreed to in writing, software
>>> +//  distributed under the License is distributed on an "AS IS" BASIS,
>>> +//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>> implied.
>>> +//  See the License for the specific language governing permissions and
>>> +//  limitations under the License.
>>> +//
>>> 
>>> +////////////////////////////////////////////////////////////////////////
>>> ////////
>>> +package org.apache.flex.html.beads.layouts
>>> +{
>>> +	import org.apache.flex.core.LayoutBase;
>>> +	import org.apache.flex.core.IDocument;
>>> +	import org.apache.flex.core.ILayoutChild;
>>> +	import org.apache.flex.core.ILayoutHost;
>>> +	import org.apache.flex.core.ILayoutView;
>>> +	import org.apache.flex.core.ILayoutParent;
>>> +	import org.apache.flex.core.IParentIUIBase;
>>> +	import org.apache.flex.core.IStrand;
>>> +	import org.apache.flex.core.IStyleableObject;
>>> +	import org.apache.flex.core.IUIBase;
>>> +	import org.apache.flex.core.ValuesManager;
>>> +	import org.apache.flex.core.UIBase;
>>> +	import org.apache.flex.events.Event;
>>> +	import org.apache.flex.geom.Rectangle;
>>> +	import org.apache.flex.utils.CSSContainerUtils;
>>> +	import org.apache.flex.utils.CSSUtils;
>>> +
>>> +    /**
>>> +     *  The OneFlexibleChildVerticalLayoutForOverflow is
>>> +	 *  intended for building apps that clip
>>> +	 *  and/or scroll the overflow, especially in a
>>> +	 *  3-pane view like the ASDoc examples.  It does not use
>>> +	 *  FlexBox because FlexBox wants to grow to the size
>>> +	 *  of the content without specifying width/height on
>>> +	 *  the flexible child.  But then the children in
>>> +	 *  the flexible child cannot use % sizing.
>>> +	 *  This layout presumes the parent is a known size.
>>> +     *
>>> +     *  @langversion 3.0
>>> +     *  @playerversion Flash 10.2
>>> +     *  @playerversion AIR 2.6
>>> +     *  @productversion FlexJS 0.0
>>> +     */
>>> +	public class OneFlexibleChildVerticalLayoutForOverflow extends
>>> LayoutBase implements IOneFlexibleChildLayout, IDocument
>>> +	{
>>> +        /**
>>> +         *  Constructor.
>>> +         *
>>> +         *  @langversion 3.0
>>> +         *  @playerversion Flash 10.2
>>> +         *  @playerversion AIR 2.6
>>> +         *  @productversion FlexJS 0.0
>>> +         */
>>> +		public function OneFlexibleChildVerticalLayoutForOverflow()
>>> +		{
>>> +			super();
>>> +		}
>>> +
>>> +        private var _flexibleChild:String;
>>> +
>>> +        protected var actualChild:ILayoutChild;
>>> +
>>> +        /**
>>> +         *  @private
>>> +         *  The document.
>>> +         */
>>> +        private var document:Object;
>>> +
>>> +		/**
>>> +		 *  The id of the flexible child
>>> +		 *
>>> +		 *  @langversion 3.0
>>> +		 *  @playerversion Flash 10.2
>>> +		 *  @playerversion AIR 2.6
>>> +		 *  @productversion FlexJS 0.0
>>> +		 */
>>> +		public function get flexibleChild():String
>>> +		{
>>> +			return _flexibleChild;
>>> +		}
>>> +
>>> +		/**
>>> +		 * @private
>>> +		 */
>>> +		public function set flexibleChild(value:String):void
>>> +		{
>>> +			_flexibleChild = value;
>>> +		}
>>> +
>>> +        /**
>>> +         * @copy org.apache.flex.core.IBeadLayout#layout
>>> +         */
>>> +		COMPILE::JS
>>> +		override public function layout():Boolean
>>> +		{
>>> +			var contentView:ILayoutView = layoutView;
>>> +
>>> +			actualChild = document[flexibleChild];
>>> +
>>> +			var n:int = contentView.numElements;
>>> +			if (n == 0) return false;
>>> +
>>> +			for(var i:int=0; i < n; i++) {
>>> +				var child:UIBase = contentView.getElementAt(i) as UIBase;
>>> +				if (child.element.style["display"] != "flex" &&
>>> child.element.style["display"] != "none")
>>> +					child.element.style["display"] = "block";
>>> +			}
>>> +
>>> +			var h:Number = host.height;
>>> +			for(i=0; i < n; i++) {
>>> +				child = contentView.getElementAt(i) as UIBase;
>>> +				if (child != actualChild)
>>> +					h -= child.height;
>>> +			}
>>> +			actualChild.height = h;
>>> +					
>>> +			return true;
>>> +		}
>>> +
>>> +		COMPILE::SWF
>>> +		override public function layout():Boolean
>>> +		{
>>> +			var contentView:ILayoutView = layoutView;
>>> +			actualChild = document.hasOwnProperty(flexibleChild) ?
>>> document[flexibleChild] : null;
>>> +
>>> +			var n:Number = contentView.numElements;
>>> +			if (n == 0) return false;
>>> +			
>>> +			var maxWidth:Number = 0;
>>> +			var maxHeight:Number = 0;
>>> +			var hostSizedToContent:Boolean = host.isWidthSizedToContent();
>>> +			var hostWidth:Number = host.width;
>>> +			var hostHeight:Number = host.height;
>>> +
>>> +			var ilc:ILayoutChild;
>>> +			var data:Object;
>>> +			var canAdjust:Boolean = false;
>>> +			var margins:Object;
>>> +
>>> +			var paddingMetrics:Rectangle =
>>> CSSContainerUtils.getPaddingMetrics(host);
>>> +			var borderMetrics:Rectangle =
>>> CSSContainerUtils.getBorderMetrics(host);
>>> +			
>>> +			// adjust the host's usable size by the metrics. If
>>> hostSizedToContent, then the
>>> +			// resulting adjusted value may be less than zero.
>>> +			hostWidth -= paddingMetrics.left + paddingMetrics.right +
>>> borderMetrics.left + borderMetrics.right;
>>> +			hostHeight -= paddingMetrics.top + paddingMetrics.bottom +
>>> borderMetrics.top + borderMetrics.bottom;
>>> +
>>> +			var xpos:Number = borderMetrics.left + paddingMetrics.left;
>>> +			var ypos:Number = borderMetrics.top + paddingMetrics.left;
>>> +			var child:IUIBase;
>>> +			var childWidth:Number;
>>> +			var i:int;
>>> +			var childXpos:Number;
>>> +			var adjustTop:Number = 0;
>>> +			var adjustBottom:Number = hostHeight + borderMetrics.top +
>>> paddingMetrics.top;
>>> +
>>> +			// first work from top to bottom
>>> +			for(i=0; i < n; i++)
>>> +			{
>>> +				child = contentView.getElementAt(i) as IUIBase;
>>> +				if (child == null || !child.visible) continue;
>>> +				if (child == actualChild) break;
>>> +
>>> +				margins = childMargins(child, hostWidth, hostHeight);
>>> +				ilc = child as ILayoutChild;
>>> +
>>> +				ypos += margins.top;
>>> +
>>> +				childXpos = xpos + margins.left; // default x position
>>> +
>>> +				childWidth = child.width;
>>> +				if (ilc != null)
>>> +				{
>>> +					if (!isNaN(ilc.percentWidth)) {
>>> +						childWidth = hostWidth * ilc.percentWidth/100.0;
>>> +					}
>>> +					else if (isNaN(ilc.explicitWidth)) {
>>> +						childWidth = hostWidth;
>>> +					}
>>> +					ilc.setWidth(childWidth);
>>> +				}
>>> +
>>> +				if (ilc) {
>>> +					ilc.setX(childXpos);
>>> +					ilc.setY(ypos);
>>> +
>>> +					if (!isNaN(ilc.percentHeight)) {
>>> +						ilc.setHeight(hostHeight * ilc.percentHeight / 100);
>>> +					}
>>> +
>>> +				} else {
>>> +					child.x = childXpos;
>>> +					child.y = ypos;
>>> +				}
>>> +
>>> +				ypos += child.height + margins.bottom;
>>> +				adjustTop = ypos;
>>> +			}
>>> +
>>> +			// then work from bottom to top
>>> +			ypos = hostHeight + borderMetrics.top + paddingMetrics.top;
>>> +
>>> +			for(i=(n-1); actualChild != null && i >= 0; i--)
>>> +			{
>>> +				child = contentView.getElementAt(i) as IUIBase;
>>> +				if (child == null || !child.visible) continue;
>>> +				if (child == actualChild) break;
>>> +
>>> +				margins = childMargins(child, hostWidth, hostHeight);
>>> +				ilc = child as ILayoutChild;
>>> +
>>> +				childXpos = xpos + margins.left; // default x position
>>> +
>>> +				childWidth = child.width;
>>> +				if (ilc != null)
>>> +				{
>>> +					if (!isNaN(ilc.percentWidth)) {
>>> +						childWidth = hostWidth * ilc.percentWidth/100.0;
>>> +					}
>>> +					else if (isNaN(ilc.explicitWidth)) {
>>> +						childWidth = hostWidth;
>>> +					}
>>> +					ilc.setWidth(childWidth);
>>> +				}
>>> +
>>> +				if (ilc) {
>>> +					if (!isNaN(ilc.percentHeight)) {
>>> +						ilc.setHeight(hostHeight * ilc.percentHeight / 100);
>>> +					}
>>> +				}
>>> +
>>> +				ypos -= child.height + margins.bottom;
>>> +
>>> +				if (ilc) {
>>> +					ilc.setX(childXpos);
>>> +					ilc.setY(ypos);
>>> +				} else {
>>> +					child.x = childXpos;
>>> +					child.y = ypos;
>>> +				}
>>> +
>>> +				ypos -= margins.top;
>>> +				adjustBottom = ypos;
>>> +			}
>>> +
>>> +			// now adjust the actualChild to fill the space.
>>> +			if (actualChild != null) {
>>> +				margins = childMargins(actualChild, hostWidth, hostHeight);
>>> +				ilc = actualChild as ILayoutChild;
>>> +				childWidth = actualChild.width;
>>> +				if (ilc != null)
>>> +				{
>>> +					if (!isNaN(ilc.percentWidth)) {
>>> +						childWidth = hostWidth * ilc.percentWidth/100.0;
>>> +					}
>>> +					else if (isNaN(ilc.explicitWidth)) {
>>> +						childWidth = hostWidth;
>>> +					}
>>> +					ilc.setWidth(childWidth);
>>> +				}
>>> +				childXpos = xpos + margins.left;
>>> +					
>>> +				actualChild.x = childXpos
>>> +				actualChild.y = adjustTop + margins.top;
>>> +				if (ilc) {
>>> +					ilc.setHeight((adjustBottom-margins.bottom) -
>>> (adjustTop+margins.top));
>>> +				} else {
>>> +					actualChild.height = (adjustBottom-margins.bottom) -
>>> (adjustTop+margins.top);
>>> +				}
>>> +			}
>>> +
>>> +			return true;
>>> +		}
>>> +
>>> +        public function setDocument(document:Object, id:String =
>>> null):void
>>> +        {
>>> +            this.document = document;
>>> +        }
>>> +    }
>>> +
>>> +}
>>> 
>>> 
>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-u
>>> s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2Fbdd34d2e%2Fframeworks%2Fp
>>> rojects%2FBasic%2Fsrc%2Fmain%2Fflex%2Forg%2Fapache%2Fflex%2Fhtml%2Fbeads%
>>> 2Flayouts%2FOneFlexibleChildVerticalLayoutLockChildWidth.as&data=02%7C01%
>>> 7C%7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%
>>> 7C0%7C0%7C636370058818766511&sdata=4Q4bkts0dp4wvvLUtu2yTYNg%2Fr7jS8bRt4co
>>> 3nYbPKc%3D&reserved=0
>>> ----------------------------------------------------------------------
>>> diff --git 
>>> a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layo
>>> uts/OneFlexibleChildVerticalLayoutLockChildWidth.as
>>> b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layo
>>> uts/OneFlexibleChildVerticalLayoutLockChildWidth.as
>>> deleted file mode 100644
>>> index 7415299..0000000
>>> --- 
>>> a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layo
>>> uts/OneFlexibleChildVerticalLayoutLockChildWidth.as
>>> +++ /dev/null
>>> @@ -1,93 +0,0 @@
>>> 
>>> -////////////////////////////////////////////////////////////////////////
>>> ////////
>>> -//
>>> -//  Licensed to the Apache Software Foundation (ASF) under one or more
>>> -//  contributor license agreements.  See the NOTICE file distributed
>>> with
>>> -//  this work for additional information regarding copyright ownership.
>>> -//  The ASF licenses this file to You under the Apache License,
>>> Version 2.0
>>> -//  (the "License"); you may not use this file except in compliance
>>> with
>>> -//  the License.  You may obtain a copy of the License at
>>> -//
>>> -//      
>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.apach
>>> e.org%2Flicenses%2FLICENSE-2.0&data=02%7C01%7C%7C699bbb170b2c4f0bf3ae08d4
>>> d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636370058818766511&
>>> sdata=bButr5xXaczhl741iZvjXub0l1B72d%2FvImajqD7mvyA%3D&reserved=0
>>> -//
>>> -//  Unless required by applicable law or agreed to in writing, software
>>> -//  distributed under the License is distributed on an "AS IS" BASIS,
>>> -//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
>>> implied.
>>> -//  See the License for the specific language governing permissions and
>>> -//  limitations under the License.
>>> -//
>>> 
>>> -////////////////////////////////////////////////////////////////////////
>>> ////////
>>> -package org.apache.flex.html.beads.layouts
>>> -{
>>> -	import org.apache.flex.core.LayoutBase;
>>> -	import org.apache.flex.core.IDocument;
>>> -	import org.apache.flex.core.ILayoutChild;
>>> -	import org.apache.flex.core.ILayoutHost;
>>> -	import org.apache.flex.core.ILayoutView;
>>> -	import org.apache.flex.core.ILayoutParent;
>>> -	import org.apache.flex.core.IParentIUIBase;
>>> -	import org.apache.flex.core.IStrand;
>>> -	import org.apache.flex.core.IStyleableObject;
>>> -	import org.apache.flex.core.IUIBase;
>>> -	import org.apache.flex.core.ValuesManager;
>>> -	import org.apache.flex.core.UIBase;
>>> -	import org.apache.flex.events.Event;
>>> -	import org.apache.flex.geom.Rectangle;
>>> -	import org.apache.flex.utils.CSSContainerUtils;
>>> -	import org.apache.flex.utils.CSSUtils;
>>> -
>>> -    /**
>>> -     *  The OneFlexibleChildHorizontalLayoutLockChildHeight 
>>> -	 *  is a subclass of OneFlexibleChildHorizontalLayout
>>> -	 *  that sets the flexible child's height to be the height
>>> -	 *  of the host container.  This is useful when you
>>> -	 *  don't want the actual child's height to dictate the
>>> -	 *  height of the container in order to force
>>> -	 *  scrollbars or line wrapping.
>>> -     *
>>> -     *  @langversion 3.0
>>> -     *  @playerversion Flash 10.2
>>> -     *  @playerversion AIR 2.6
>>> -     *  @productversion FlexJS 0.0
>>> -     */
>>> -	public class OneFlexibleChildVerticalLayoutLockChildWidth extends 
>>> OneFlexibleChildVerticalLayout
>>> -	{
>>> -        /**
>>> -         *  Constructor.
>>> -         *
>>> -         *  @langversion 3.0
>>> -         *  @playerversion Flash 10.2
>>> -         *  @playerversion AIR 2.6
>>> -         *  @productversion FlexJS 0.0
>>> -         */
>>> -		public function OneFlexibleChildVerticalLayoutLockChildWidth()
>>> -		{
>>> -			super();
>>> -		}
>>> -
>>> -        /**
>>> -         * @copy org.apache.flex.core.IBeadLayout#layout
>>> -         */
>>> -		override public function layout():Boolean
>>> -		{
>>> -			var ret:Boolean = super.layout();
>>> -			if (ret)
>>> -			{
>>> -				var contentView:ILayoutView = layoutView;
>>> -	
>>> -				var n:int = contentView.numElements;
>>> -
>>> -				var w:Number = host.width;
>>> -				for(var i:int=0; i < n; i++) {
>>> -					var child:UIBase = contentView.getElementAt(i) as UIBase;
>>> -					if (child != actualChild)
>>> -						w = child.width;
>>> -				}
>>> -				
>>> -				actualChild.setWidth(w); 
>>> -			}
>>> -			return ret;
>>> -		}
>>> -
>>> -    }
>>> -
>>> -}
>>> 
>>> 
>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-u
>>> s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2Fbdd34d2e%2Fframeworks%2Fp
>>> rojects%2FBasic%2Fsrc%2Fmain%2Fresources%2Fbasic-manifest.xml&data=02%7C0
>>> 1%7C%7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee
>>> 1%7C0%7C0%7C636370058818766511&sdata=mPldYCuDfp%2BxQ4QROdu4BWSl3Dh7HP19VX
>>> BR3B3IXOg%3D&reserved=0
>>> ----------------------------------------------------------------------
>>> diff --git 
>>> a/frameworks/projects/Basic/src/main/resources/basic-manifest.xml 
>>> b/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
>>> index 7cbc05d..09bb1a3 100644
>>> --- a/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
>>> +++ b/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
>>> @@ -150,8 +150,8 @@
>>>    <component id="FlexibleFirstChildHorizontalLayout" 
>>> class="org.apache.flex.html.beads.layouts.FlexibleFirstChildHorizontalLay
>>> out"/>
>>>    <component id="OneFlexibleChildVerticalLayout" 
>>> class="org.apache.flex.html.beads.layouts.OneFlexibleChildVerticalLayout"
>>> />
>>>    <component id="OneFlexibleChildHorizontalLayout" 
>>> class="org.apache.flex.html.beads.layouts.OneFlexibleChildHorizontalLayou
>>> t"/>
>>> -    <component id="OneFlexibleChildVerticalLayoutLockChildWidth" 
>>> class="org.apache.flex.html.beads.layouts.OneFlexibleChildVerticalLayoutL
>>> ockChildWidth"/>
>>> -    <component id="OneFlexibleChildHorizontalLayoutLockChildHeight" 
>>> class="org.apache.flex.html.beads.layouts.OneFlexibleChildHorizontalLayou
>>> tLockChildHeight"/>
>>> +    <component id="OneFlexibleChildVerticalLayoutForOverflow" 
>>> class="org.apache.flex.html.beads.layouts.OneFlexibleChildVerticalLayoutF
>>> orOverflow"/>
>>> +    <component id="OneFlexibleChildHorizontalLayoutForOverflow" 
>>> class="org.apache.flex.html.beads.layouts.OneFlexibleChildHorizontalLayou
>>> tForOverflow"/>
>>>    <component id="MXMLBeadView" 
>>> class="org.apache.flex.html.MXMLBeadView"/>
>>> 
>>>    <component id="SubAppLoader" 
>>> class="org.apache.flex.html.SubAppLoader" />
>>> 
>> 
> 



Re: [07/13] git commit: [flex-asjs] [refs/heads/release0.8.0] - give up on trying to use FlexBox for full-screen 3-pane views. FlexBox seems more happy stretching to content size instead of clipping at the computed flex-ed size. These custom layouts wi...

Posted by Alex Harui <ah...@adobe.com.INVALID>.
It will either work in the examples that use it or it won't.  Try it and
find out.

-Alex

On 7/30/17, 3:04 AM, "Harbs" <ha...@gmail.com> wrote:

>I think I just ran into the same issue.
>
>This layout seems to more-or-less do the job, but it’s kind of heavy.
>
>I did some research into flexbox and it appear that setting flex-basis to
>0 does the job. It needs to be set on ONLY the one flexible child.
>
>Here’s a codepen which shows a use case.
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcodepen.i
>o%2Fjpdevries%2Fpen%2FoXxPOP&data=02%7C01%7C%7C699bbb170b2c4f0bf3ae08d4d73
>2638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636370058818766511&sdat
>a=tSTNYANFFiQ4DMGYbAZaz0dJ9qYDYpcwP2ZoSYRIcG8%3D&reserved=0
><https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcodepen.
>io%2Fjpdevries%2Fpen%2FoXxPOP&data=02%7C01%7C%7C699bbb170b2c4f0bf3ae08d4d7
>32638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636370058818766511&sda
>ta=tSTNYANFFiQ4DMGYbAZaz0dJ9qYDYpcwP2ZoSYRIcG8%3D&reserved=0>
>
>I noticed that the OneFlexibleLayouts have code which set the flex-basis
>of the children if a percentage value is set. When setting the size of
>the one flexible child to 0% this causes the flex-basis to be set to 0
>and then the one flexible child will fit the remaining space even if it
>might overflow because of its children.
>
>I have wasted quite a bit of time before I discovered this. I’m not sure
>whether the OneFlexibleLayout classes should be changed, or maybe we need
>documentation that to fit content that might overflow, the percentage
>should be set to 0. It could be there are cases where the entire
>OnFlexibleLayout should be fit when smaller and expand (and not scroll)
>when bigger. In that case, the current behavior might be correct.
>
>Thoughts?
>Harbs
>
>> On May 23, 2017, at 10:16 AM, aharui@apache.org wrote:
>> 
>> give up on trying to use FlexBox for full-screen 3-pane views.  FlexBox
>>seems more happy stretching to content size instead of clipping at the
>>computed flex-ed size.  These custom layouts will do the proper sizing
>> 
>> 
>> Project: 
>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-u
>>s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Frepo&data=02%7C01%7C%7C699bbb170
>>b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6363
>>70058818766511&sdata=P%2FMkfZAwCYwpQEoCe5UGx8tW0mZaIZsMdDg6VxlaKWA%3D&res
>>erved=0
>> Commit: 
>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-u
>>s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fcommit%2Fbdd34d2e&data=02%7C01%7
>>C%7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7
>>C0%7C0%7C636370058818766511&sdata=QosBAau8lE4nCS7c%2F8B6GDc%2Bqa%2BpSkoP5
>>5x3oji5FnI%3D&reserved=0
>> Tree: 
>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-u
>>s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Ftree%2Fbdd34d2e&data=02%7C01%7C%
>>7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0
>>%7C0%7C636370058818766511&sdata=T4CCqwtn%2FgFTmAnaI%2BuCXqtX0P75ebpKVZOxf
>>XOTbIE%3D&reserved=0
>> Diff: 
>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-u
>>s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fdiff%2Fbdd34d2e&data=02%7C01%7C%
>>7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0
>>%7C0%7C636370058818766511&sdata=f8WVJXc81KrLMuUgRckULYCfglNL7d%2BfdjSbBBU
>>0fRo%3D&reserved=0
>> 
>> Branch: refs/heads/release0.8.0
>> Commit: bdd34d2ef4d8117fa1b222ac470482a42dbea9eb
>> Parents: c505d67
>> Author: Alex Harui <ah...@apache.org>
>> Authored: Mon May 22 10:12:02 2017 -0700
>> Committer: Alex Harui <ah...@apache.org>
>> Committed: Tue May 23 00:15:56 2017 -0700
>> 
>> ----------------------------------------------------------------------
>> ...eFlexibleChildHorizontalLayoutForOverflow.as | 290 ++++++++++++++++++
>> ...xibleChildHorizontalLayoutLockChildHeight.as |  91 ------
>> ...OneFlexibleChildVerticalLayoutForOverflow.as | 291
>>+++++++++++++++++++
>> ...FlexibleChildVerticalLayoutLockChildWidth.as |  93 ------
>> .../Basic/src/main/resources/basic-manifest.xml |   4 +-
>> 5 files changed, 583 insertions(+), 186 deletions(-)
>> ----------------------------------------------------------------------
>> 
>> 
>> 
>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-u
>>s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2Fbdd34d2e%2Fframeworks%2Fp
>>rojects%2FBasic%2Fsrc%2Fmain%2Fflex%2Forg%2Fapache%2Fflex%2Fhtml%2Fbeads%
>>2Flayouts%2FOneFlexibleChildHorizontalLayoutForOverflow.as&data=02%7C01%7
>>C%7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7
>>C0%7C0%7C636370058818766511&sdata=L7BjG%2BM7nTwguX%2BNaE5Op6BIT7XZrEqKFop
>>0D%2Frc0Aw%3D&reserved=0
>> ----------------------------------------------------------------------
>> diff --git 
>>a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layo
>>uts/OneFlexibleChildHorizontalLayoutForOverflow.as
>>b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layo
>>uts/OneFlexibleChildHorizontalLayoutForOverflow.as
>> new file mode 100644
>> index 0000000..c6abc22
>> --- /dev/null
>> +++ 
>>b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layo
>>uts/OneFlexibleChildHorizontalLayoutForOverflow.as
>> @@ -0,0 +1,290 @@
>> 
>>+////////////////////////////////////////////////////////////////////////
>>////////
>> +//
>> +//  Licensed to the Apache Software Foundation (ASF) under one or more
>> +//  contributor license agreements.  See the NOTICE file distributed
>>with
>> +//  this work for additional information regarding copyright ownership.
>> +//  The ASF licenses this file to You under the Apache License,
>>Version 2.0
>> +//  (the "License"); you may not use this file except in compliance
>>with
>> +//  the License.  You may obtain a copy of the License at
>> +//
>> +//      
>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.apach
>>e.org%2Flicenses%2FLICENSE-2.0&data=02%7C01%7C%7C699bbb170b2c4f0bf3ae08d4
>>d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636370058818766511&
>>sdata=bButr5xXaczhl741iZvjXub0l1B72d%2FvImajqD7mvyA%3D&reserved=0
>> +//
>> +//  Unless required by applicable law or agreed to in writing, software
>> +//  distributed under the License is distributed on an "AS IS" BASIS,
>> +//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>implied.
>> +//  See the License for the specific language governing permissions and
>> +//  limitations under the License.
>> +//
>> 
>>+////////////////////////////////////////////////////////////////////////
>>////////
>> +package org.apache.flex.html.beads.layouts
>> +{
>> +	import org.apache.flex.core.LayoutBase;
>> +	import org.apache.flex.core.IDocument;
>> +	import org.apache.flex.core.ILayoutChild;
>> +	import org.apache.flex.core.ILayoutHost;
>> +	import org.apache.flex.core.ILayoutView;
>> +	import org.apache.flex.core.ILayoutParent;
>> +	import org.apache.flex.core.IParentIUIBase;
>> +	import org.apache.flex.core.IStrand;
>> +	import org.apache.flex.core.IUIBase;
>> +	import org.apache.flex.core.ValuesManager;
>> +	import org.apache.flex.core.UIBase;
>> +	import org.apache.flex.events.Event;
>> +	import org.apache.flex.geom.Rectangle;
>> +	import org.apache.flex.utils.CSSContainerUtils;
>> +	import org.apache.flex.utils.CSSUtils;
>> +
>> +    /**
>> +     *  The OneFlexibleChildHorizontalLayoutForOverflowis
>> +	 *  intended for building apps that clip
>> +	 *  and/or scroll the overflow, especially in a
>> +	 *  3-pane view like the ASDoc examples.  It does not use
>> +	 *  FlexBox because FlexBox wants to grow to the size
>> +	 *  of the content without specifying width/height on
>> +	 *  the flexible child.  But then the children in
>> +	 *  the flexible child cannot use % sizing.
>> +	 *  This layout presumes the parent is a known size.
>> +	 *
>> +     *  @langversion 3.0
>> +     *  @playerversion Flash 10.2
>> +     *  @playerversion AIR 2.6
>> +     *  @productversion FlexJS 0.0
>> +     */
>> +	public class OneFlexibleChildHorizontalLayoutForOverflow extends
>>LayoutBase implements IOneFlexibleChildLayout, IDocument
>> +	{
>> +        /**
>> +         *  Constructor.
>> +         *
>> +         *  @langversion 3.0
>> +         *  @playerversion Flash 10.2
>> +         *  @playerversion AIR 2.6
>> +         *  @productversion FlexJS 0.0
>> +         */
>> +		public function OneFlexibleChildHorizontalLayoutForOverflow()
>> +		{
>> +			super();
>> +		}
>> +
>> +        private var _flexibleChild:String;
>> +
>> +        protected var actualChild:ILayoutChild;
>> +
>> +        /**
>> +         *  @private
>> +         *  The document.
>> +         */
>> +        private var document:Object;
>> +
>> +		/**
>> +		 *  The id of the flexible child
>> +		 *
>> +		 *  @langversion 3.0
>> +		 *  @playerversion Flash 10.2
>> +		 *  @playerversion AIR 2.6
>> +		 *  @productversion FlexJS 0.0
>> +		 */
>> +		public function get flexibleChild():String
>> +		{
>> +			return _flexibleChild;
>> +		}
>> +
>> +		/**
>> +		 * @private
>> +		 */
>> +		public function set flexibleChild(value:String):void
>> +		{
>> +			_flexibleChild = value;
>> +		}
>> +
>> +        /**
>> +         * @copy org.apache.flex.core.IBeadLayout#layout
>> +         */
>> +		COMPILE::JS
>> +		override public function layout():Boolean
>> +		{
>> +			var contentView:ILayoutView = layoutView;
>> +
>> +			actualChild = document[flexibleChild];
>> +
>> +			var n:int = contentView.numElements;
>> +			if (n == 0) return false;
>> +
>> +			for(var i:int=0; i < n; i++) {
>> +				var child:UIBase = contentView.getElementAt(i) as UIBase;
>> +				if (child.element.style["display"] != "inline-flex" &&
>>child.element.style["display"] != "none")
>> +					child.element.style["display"] = "inline-block";
>> +			}
>> +
>> +			var w:Number = host.width;
>> +			for(i=0; i < n; i++) {
>> +				child = contentView.getElementAt(i) as UIBase;
>> +				if (child != actualChild)
>> +					w -= child.width;
>> +			}
>> +			actualChild.width = w;
>> +					
>> +			return true;
>> +		}
>> +
>> +		COMPILE::SWF
>> +		override public function layout():Boolean
>> +		{
>> +			var contentView:ILayoutView = layoutView;
>> +			actualChild = document.hasOwnProperty(flexibleChild) ?
>>document[flexibleChild] : null;
>> +
>> +			var n:Number = contentView.numElements;
>> +			if (n == 0) return false;
>> +			
>> +			var maxWidth:Number = 0;
>> +			var maxHeight:Number = 0;
>> +			var hostSizedToContent:Boolean = host.isHeightSizedToContent();
>> +			var hostWidth:Number = host.width;
>> +			var hostHeight:Number = host.height;
>> +
>> +			var ilc:ILayoutChild;
>> +			var data:Object;
>> +			var canAdjust:Boolean = false;
>> +			var margins:Object;
>> +
>> +			var paddingMetrics:Rectangle =
>>CSSContainerUtils.getPaddingMetrics(host);
>> +			var borderMetrics:Rectangle =
>>CSSContainerUtils.getBorderMetrics(host);
>> +			
>> +			// adjust the host's usable size by the metrics. If
>>hostSizedToContent, then the
>> +			// resulting adjusted value may be less than zero.
>> +			hostWidth -= paddingMetrics.left + paddingMetrics.right +
>>borderMetrics.left + borderMetrics.right;
>> +			hostHeight -= paddingMetrics.top + paddingMetrics.bottom +
>>borderMetrics.top + borderMetrics.bottom;
>> +
>> +			var xpos:Number = borderMetrics.left + paddingMetrics.left;
>> +			var ypos:Number = borderMetrics.top + paddingMetrics.left;
>> +			var child:IUIBase;
>> +			var childHeight:Number;
>> +			var i:int;
>> +			var childYpos:Number;
>> +			var adjustLeft:Number = 0;
>> +			var adjustRight:Number = hostWidth + borderMetrics.left +
>>paddingMetrics.left;
>> +
>> +			// first work from left to right
>> +			for(i=0; i < n; i++)
>> +			{
>> +				child = contentView.getElementAt(i) as IUIBase;
>> +				if (child == null || !child.visible) continue;
>> +				if (child == actualChild) break;
>> +
>> +				margins = childMargins(child, hostWidth, hostHeight);
>> +				ilc = child as ILayoutChild;
>> +
>> +				xpos += margins.left;
>> +
>> +				childYpos = ypos + margins.top; // default y position
>> +
>> +				childHeight = child.height;
>> +				if (ilc != null)
>> +				{
>> +					if (!isNaN(ilc.percentHeight)) {
>> +						childHeight = host.height * ilc.percentHeight/100.0;
>> +					}
>> +					else if (isNaN(ilc.explicitHeight)) {
>> +						childHeight = host.height;
>> +					}
>> +					ilc.setHeight(childHeight);
>> +				}
>> +
>> +				if (ilc) {
>> +					ilc.setX(xpos);
>> +					ilc.setY(childYpos);
>> +
>> +					if (!isNaN(ilc.percentWidth)) {
>> +						ilc.setWidth(hostWidth * ilc.percentWidth / 100);
>> +					}
>> +
>> +				} else {
>> +					child.x = xpos;
>> +					child.y = childYpos;
>> +				}
>> +
>> +				xpos += child.width + margins.right;
>> +				adjustLeft = xpos;
>> +			}
>> +
>> +			// then work from right to left
>> +			xpos = hostWidth + borderMetrics.left + paddingMetrics.left;
>> +
>> +			for(i=(n-1); actualChild != null && i >= 0; i--)
>> +			{
>> +				child = contentView.getElementAt(i) as IUIBase;
>> +				if (child == null || !child.visible) continue;
>> +				if (child == actualChild) break;
>> +
>> +				margins = childMargins(child, hostWidth, hostHeight);
>> +				ilc = child as ILayoutChild;
>> +
>> +				childYpos = ypos + margins.top; // default y position
>> +
>> +				childHeight = child.height;
>> +				if (ilc != null)
>> +				{
>> +					if (!isNaN(ilc.percentHeight)) {
>> +						childHeight = host.height * ilc.percentHeight/100.0;
>> +					}
>> +					else if (isNaN(ilc.explicitHeight)) {
>> +						childHeight = host.height;
>> +					}
>> +					ilc.setHeight(childHeight);
>> +				}
>> +
>> +				if (ilc) {
>> +					if (!isNaN(ilc.percentWidth)) {
>> +						ilc.setWidth(hostWidth * ilc.percentWidth / 100);
>> +					}
>> +				}
>> +
>> +				xpos -= child.width + margins.right;
>> +
>> +				if (ilc) {
>> +					ilc.setX(xpos);
>> +					ilc.setY(childYpos);
>> +				} else {
>> +					child.x = xpos;
>> +					child.y = childYpos;
>> +				}
>> +
>> +				xpos -= margins.left;
>> +				adjustRight = xpos;
>> +			}
>> +
>> +			// now adjust the actualChild to fill the space.
>> +			if (actualChild != null) {
>> +				margins = childMargins(actualChild, hostWidth, hostHeight);
>> +				ilc = actualChild as ILayoutChild;
>> +				childHeight = actualChild.height;
>> +				if (ilc != null)
>> +				{
>> +					if (!isNaN(ilc.percentHeight)) {
>> +						childHeight = host.height * ilc.percentHeight/100.0;
>> +					}
>> +					else if (isNaN(ilc.explicitHeight)) {
>> +						childHeight = host.height;
>> +					}
>> +					ilc.setHeight(childHeight);
>> +				}
>> +				childYpos = ypos + margins.top;
>> +				actualChild.x = adjustLeft + margins.left;
>> +				actualChild.y = childYpos;
>> +				if (ilc) {
>> +					ilc.setWidth((adjustRight-margins.right) -
>>(adjustLeft+margins.left));
>> +				} else {
>> +					actualChild.width = (adjustRight-margins.right) -
>>(adjustLeft+margins.left);
>> +				}
>> +			}
>> +
>> +            return true;
>> +		}
>> +
>> +        public function setDocument(document:Object, id:String =
>>null):void
>> +        {
>> +            this.document = document;
>> +        }
>> +
>> +    }
>> +
>> +}
>> 
>> 
>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-u
>>s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2Fbdd34d2e%2Fframeworks%2Fp
>>rojects%2FBasic%2Fsrc%2Fmain%2Fflex%2Forg%2Fapache%2Fflex%2Fhtml%2Fbeads%
>>2Flayouts%2FOneFlexibleChildHorizontalLayoutLockChildHeight.as&data=02%7C
>>01%7C%7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178dece
>>e1%7C0%7C0%7C636370058818766511&sdata=Ir1Siye21IUzzijpvWA1XmQN0AbHktLu%2F
>>u3h%2BRtBZT0%3D&reserved=0
>> ----------------------------------------------------------------------
>> diff --git 
>>a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layo
>>uts/OneFlexibleChildHorizontalLayoutLockChildHeight.as
>>b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layo
>>uts/OneFlexibleChildHorizontalLayoutLockChildHeight.as
>> deleted file mode 100644
>> index d170d23..0000000
>> --- 
>>a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layo
>>uts/OneFlexibleChildHorizontalLayoutLockChildHeight.as
>> +++ /dev/null
>> @@ -1,91 +0,0 @@
>> 
>>-////////////////////////////////////////////////////////////////////////
>>////////
>> -//
>> -//  Licensed to the Apache Software Foundation (ASF) under one or more
>> -//  contributor license agreements.  See the NOTICE file distributed
>>with
>> -//  this work for additional information regarding copyright ownership.
>> -//  The ASF licenses this file to You under the Apache License,
>>Version 2.0
>> -//  (the "License"); you may not use this file except in compliance
>>with
>> -//  the License.  You may obtain a copy of the License at
>> -//
>> -//      
>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.apach
>>e.org%2Flicenses%2FLICENSE-2.0&data=02%7C01%7C%7C699bbb170b2c4f0bf3ae08d4
>>d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636370058818766511&
>>sdata=bButr5xXaczhl741iZvjXub0l1B72d%2FvImajqD7mvyA%3D&reserved=0
>> -//
>> -//  Unless required by applicable law or agreed to in writing, software
>> -//  distributed under the License is distributed on an "AS IS" BASIS,
>> -//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>implied.
>> -//  See the License for the specific language governing permissions and
>> -//  limitations under the License.
>> -//
>> 
>>-////////////////////////////////////////////////////////////////////////
>>////////
>> -package org.apache.flex.html.beads.layouts
>> -{
>> -	import org.apache.flex.core.LayoutBase;
>> -	import org.apache.flex.core.IDocument;
>> -	import org.apache.flex.core.ILayoutChild;
>> -	import org.apache.flex.core.ILayoutHost;
>> -	import org.apache.flex.core.ILayoutView;
>> -	import org.apache.flex.core.ILayoutParent;
>> -	import org.apache.flex.core.IParentIUIBase;
>> -	import org.apache.flex.core.IStrand;
>> -	import org.apache.flex.core.IUIBase;
>> -	import org.apache.flex.core.ValuesManager;
>> -	import org.apache.flex.core.UIBase;
>> -	import org.apache.flex.events.Event;
>> -	import org.apache.flex.geom.Rectangle;
>> -	import org.apache.flex.utils.CSSContainerUtils;
>> -	import org.apache.flex.utils.CSSUtils;
>> -
>> -    /**
>> -     *  The OneFlexibleChildHorizontalLayoutLockChildHeight
>> -	 *  is a subclass of OneFlexibleChildHorizontalLayout
>> -	 *  that sets the flexible child's height to be the height
>> -	 *  of the host container.  This is useful when you
>> -	 *  don't want the actual child's height to dictate the
>> -	 *  height of the container in order to force
>> -	 *  scrollbars
>> -     *
>> -     *  @langversion 3.0
>> -     *  @playerversion Flash 10.2
>> -     *  @playerversion AIR 2.6
>> -     *  @productversion FlexJS 0.0
>> -     */
>> -	public class OneFlexibleChildHorizontalLayoutLockChildHeight extends
>>OneFlexibleChildHorizontalLayout
>> -	{
>> -        /**
>> -         *  Constructor.
>> -         *
>> -         *  @langversion 3.0
>> -         *  @playerversion Flash 10.2
>> -         *  @playerversion AIR 2.6
>> -         *  @productversion FlexJS 0.0
>> -         */
>> -		public function OneFlexibleChildHorizontalLayoutLockChildHeight()
>> -		{
>> -			super();
>> -		}
>> -
>> -        /**
>> -         * @copy org.apache.flex.core.IBeadLayout#layout
>> -         */
>> -		override public function layout():Boolean
>> -		{
>> -			var ret:Boolean = super.layout();
>> -			if (ret)
>> -			{
>> -				var contentView:ILayoutView = layoutView;
>> -	
>> -				var n:int = contentView.numElements;
>> -
>> -				var h:Number = host.height;
>> -				for(var i:int=0; i < n; i++) {
>> -					var child:UIBase = contentView.getElementAt(i) as UIBase;
>> -					if (child != actualChild)
>> -						h = child.height;
>> -				}
>> -				actualChild.setHeight(h);
>> -			}
>> -			return ret;
>> -		}
>> -
>> -    }
>> -
>> -}
>> 
>> 
>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-u
>>s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2Fbdd34d2e%2Fframeworks%2Fp
>>rojects%2FBasic%2Fsrc%2Fmain%2Fflex%2Forg%2Fapache%2Fflex%2Fhtml%2Fbeads%
>>2Flayouts%2FOneFlexibleChildVerticalLayoutForOverflow.as&data=02%7C01%7C%
>>7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0
>>%7C0%7C636370058818766511&sdata=WdJnx6IGbPwIxUibKB3UqfKTHgHugWIleqBVsqJ5f
>>eE%3D&reserved=0
>> ----------------------------------------------------------------------
>> diff --git 
>>a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layo
>>uts/OneFlexibleChildVerticalLayoutForOverflow.as
>>b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layo
>>uts/OneFlexibleChildVerticalLayoutForOverflow.as
>> new file mode 100644
>> index 0000000..5679f80
>> --- /dev/null
>> +++ 
>>b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layo
>>uts/OneFlexibleChildVerticalLayoutForOverflow.as
>> @@ -0,0 +1,291 @@
>> 
>>+////////////////////////////////////////////////////////////////////////
>>////////
>> +//
>> +//  Licensed to the Apache Software Foundation (ASF) under one or more
>> +//  contributor license agreements.  See the NOTICE file distributed
>>with
>> +//  this work for additional information regarding copyright ownership.
>> +//  The ASF licenses this file to You under the Apache License,
>>Version 2.0
>> +//  (the "License"); you may not use this file except in compliance
>>with
>> +//  the License.  You may obtain a copy of the License at
>> +//
>> +//      
>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.apach
>>e.org%2Flicenses%2FLICENSE-2.0&data=02%7C01%7C%7C699bbb170b2c4f0bf3ae08d4
>>d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636370058818766511&
>>sdata=bButr5xXaczhl741iZvjXub0l1B72d%2FvImajqD7mvyA%3D&reserved=0
>> +//
>> +//  Unless required by applicable law or agreed to in writing, software
>> +//  distributed under the License is distributed on an "AS IS" BASIS,
>> +//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>implied.
>> +//  See the License for the specific language governing permissions and
>> +//  limitations under the License.
>> +//
>> 
>>+////////////////////////////////////////////////////////////////////////
>>////////
>> +package org.apache.flex.html.beads.layouts
>> +{
>> +	import org.apache.flex.core.LayoutBase;
>> +	import org.apache.flex.core.IDocument;
>> +	import org.apache.flex.core.ILayoutChild;
>> +	import org.apache.flex.core.ILayoutHost;
>> +	import org.apache.flex.core.ILayoutView;
>> +	import org.apache.flex.core.ILayoutParent;
>> +	import org.apache.flex.core.IParentIUIBase;
>> +	import org.apache.flex.core.IStrand;
>> +	import org.apache.flex.core.IStyleableObject;
>> +	import org.apache.flex.core.IUIBase;
>> +	import org.apache.flex.core.ValuesManager;
>> +	import org.apache.flex.core.UIBase;
>> +	import org.apache.flex.events.Event;
>> +	import org.apache.flex.geom.Rectangle;
>> +	import org.apache.flex.utils.CSSContainerUtils;
>> +	import org.apache.flex.utils.CSSUtils;
>> +
>> +    /**
>> +     *  The OneFlexibleChildVerticalLayoutForOverflow is
>> +	 *  intended for building apps that clip
>> +	 *  and/or scroll the overflow, especially in a
>> +	 *  3-pane view like the ASDoc examples.  It does not use
>> +	 *  FlexBox because FlexBox wants to grow to the size
>> +	 *  of the content without specifying width/height on
>> +	 *  the flexible child.  But then the children in
>> +	 *  the flexible child cannot use % sizing.
>> +	 *  This layout presumes the parent is a known size.
>> +     *
>> +     *  @langversion 3.0
>> +     *  @playerversion Flash 10.2
>> +     *  @playerversion AIR 2.6
>> +     *  @productversion FlexJS 0.0
>> +     */
>> +	public class OneFlexibleChildVerticalLayoutForOverflow extends
>>LayoutBase implements IOneFlexibleChildLayout, IDocument
>> +	{
>> +        /**
>> +         *  Constructor.
>> +         *
>> +         *  @langversion 3.0
>> +         *  @playerversion Flash 10.2
>> +         *  @playerversion AIR 2.6
>> +         *  @productversion FlexJS 0.0
>> +         */
>> +		public function OneFlexibleChildVerticalLayoutForOverflow()
>> +		{
>> +			super();
>> +		}
>> +
>> +        private var _flexibleChild:String;
>> +
>> +        protected var actualChild:ILayoutChild;
>> +
>> +        /**
>> +         *  @private
>> +         *  The document.
>> +         */
>> +        private var document:Object;
>> +
>> +		/**
>> +		 *  The id of the flexible child
>> +		 *
>> +		 *  @langversion 3.0
>> +		 *  @playerversion Flash 10.2
>> +		 *  @playerversion AIR 2.6
>> +		 *  @productversion FlexJS 0.0
>> +		 */
>> +		public function get flexibleChild():String
>> +		{
>> +			return _flexibleChild;
>> +		}
>> +
>> +		/**
>> +		 * @private
>> +		 */
>> +		public function set flexibleChild(value:String):void
>> +		{
>> +			_flexibleChild = value;
>> +		}
>> +
>> +        /**
>> +         * @copy org.apache.flex.core.IBeadLayout#layout
>> +         */
>> +		COMPILE::JS
>> +		override public function layout():Boolean
>> +		{
>> +			var contentView:ILayoutView = layoutView;
>> +
>> +			actualChild = document[flexibleChild];
>> +
>> +			var n:int = contentView.numElements;
>> +			if (n == 0) return false;
>> +
>> +			for(var i:int=0; i < n; i++) {
>> +				var child:UIBase = contentView.getElementAt(i) as UIBase;
>> +				if (child.element.style["display"] != "flex" &&
>>child.element.style["display"] != "none")
>> +					child.element.style["display"] = "block";
>> +			}
>> +
>> +			var h:Number = host.height;
>> +			for(i=0; i < n; i++) {
>> +				child = contentView.getElementAt(i) as UIBase;
>> +				if (child != actualChild)
>> +					h -= child.height;
>> +			}
>> +			actualChild.height = h;
>> +					
>> +			return true;
>> +		}
>> +
>> +		COMPILE::SWF
>> +		override public function layout():Boolean
>> +		{
>> +			var contentView:ILayoutView = layoutView;
>> +			actualChild = document.hasOwnProperty(flexibleChild) ?
>>document[flexibleChild] : null;
>> +
>> +			var n:Number = contentView.numElements;
>> +			if (n == 0) return false;
>> +			
>> +			var maxWidth:Number = 0;
>> +			var maxHeight:Number = 0;
>> +			var hostSizedToContent:Boolean = host.isWidthSizedToContent();
>> +			var hostWidth:Number = host.width;
>> +			var hostHeight:Number = host.height;
>> +
>> +			var ilc:ILayoutChild;
>> +			var data:Object;
>> +			var canAdjust:Boolean = false;
>> +			var margins:Object;
>> +
>> +			var paddingMetrics:Rectangle =
>>CSSContainerUtils.getPaddingMetrics(host);
>> +			var borderMetrics:Rectangle =
>>CSSContainerUtils.getBorderMetrics(host);
>> +			
>> +			// adjust the host's usable size by the metrics. If
>>hostSizedToContent, then the
>> +			// resulting adjusted value may be less than zero.
>> +			hostWidth -= paddingMetrics.left + paddingMetrics.right +
>>borderMetrics.left + borderMetrics.right;
>> +			hostHeight -= paddingMetrics.top + paddingMetrics.bottom +
>>borderMetrics.top + borderMetrics.bottom;
>> +
>> +			var xpos:Number = borderMetrics.left + paddingMetrics.left;
>> +			var ypos:Number = borderMetrics.top + paddingMetrics.left;
>> +			var child:IUIBase;
>> +			var childWidth:Number;
>> +			var i:int;
>> +			var childXpos:Number;
>> +			var adjustTop:Number = 0;
>> +			var adjustBottom:Number = hostHeight + borderMetrics.top +
>>paddingMetrics.top;
>> +
>> +			// first work from top to bottom
>> +			for(i=0; i < n; i++)
>> +			{
>> +				child = contentView.getElementAt(i) as IUIBase;
>> +				if (child == null || !child.visible) continue;
>> +				if (child == actualChild) break;
>> +
>> +				margins = childMargins(child, hostWidth, hostHeight);
>> +				ilc = child as ILayoutChild;
>> +
>> +				ypos += margins.top;
>> +
>> +				childXpos = xpos + margins.left; // default x position
>> +
>> +				childWidth = child.width;
>> +				if (ilc != null)
>> +				{
>> +					if (!isNaN(ilc.percentWidth)) {
>> +						childWidth = hostWidth * ilc.percentWidth/100.0;
>> +					}
>> +					else if (isNaN(ilc.explicitWidth)) {
>> +						childWidth = hostWidth;
>> +					}
>> +					ilc.setWidth(childWidth);
>> +				}
>> +
>> +				if (ilc) {
>> +					ilc.setX(childXpos);
>> +					ilc.setY(ypos);
>> +
>> +					if (!isNaN(ilc.percentHeight)) {
>> +						ilc.setHeight(hostHeight * ilc.percentHeight / 100);
>> +					}
>> +
>> +				} else {
>> +					child.x = childXpos;
>> +					child.y = ypos;
>> +				}
>> +
>> +				ypos += child.height + margins.bottom;
>> +				adjustTop = ypos;
>> +			}
>> +
>> +			// then work from bottom to top
>> +			ypos = hostHeight + borderMetrics.top + paddingMetrics.top;
>> +
>> +			for(i=(n-1); actualChild != null && i >= 0; i--)
>> +			{
>> +				child = contentView.getElementAt(i) as IUIBase;
>> +				if (child == null || !child.visible) continue;
>> +				if (child == actualChild) break;
>> +
>> +				margins = childMargins(child, hostWidth, hostHeight);
>> +				ilc = child as ILayoutChild;
>> +
>> +				childXpos = xpos + margins.left; // default x position
>> +
>> +				childWidth = child.width;
>> +				if (ilc != null)
>> +				{
>> +					if (!isNaN(ilc.percentWidth)) {
>> +						childWidth = hostWidth * ilc.percentWidth/100.0;
>> +					}
>> +					else if (isNaN(ilc.explicitWidth)) {
>> +						childWidth = hostWidth;
>> +					}
>> +					ilc.setWidth(childWidth);
>> +				}
>> +
>> +				if (ilc) {
>> +					if (!isNaN(ilc.percentHeight)) {
>> +						ilc.setHeight(hostHeight * ilc.percentHeight / 100);
>> +					}
>> +				}
>> +
>> +				ypos -= child.height + margins.bottom;
>> +
>> +				if (ilc) {
>> +					ilc.setX(childXpos);
>> +					ilc.setY(ypos);
>> +				} else {
>> +					child.x = childXpos;
>> +					child.y = ypos;
>> +				}
>> +
>> +				ypos -= margins.top;
>> +				adjustBottom = ypos;
>> +			}
>> +
>> +			// now adjust the actualChild to fill the space.
>> +			if (actualChild != null) {
>> +				margins = childMargins(actualChild, hostWidth, hostHeight);
>> +				ilc = actualChild as ILayoutChild;
>> +				childWidth = actualChild.width;
>> +				if (ilc != null)
>> +				{
>> +					if (!isNaN(ilc.percentWidth)) {
>> +						childWidth = hostWidth * ilc.percentWidth/100.0;
>> +					}
>> +					else if (isNaN(ilc.explicitWidth)) {
>> +						childWidth = hostWidth;
>> +					}
>> +					ilc.setWidth(childWidth);
>> +				}
>> +				childXpos = xpos + margins.left;
>> +					
>> +				actualChild.x = childXpos
>> +				actualChild.y = adjustTop + margins.top;
>> +				if (ilc) {
>> +					ilc.setHeight((adjustBottom-margins.bottom) -
>>(adjustTop+margins.top));
>> +				} else {
>> +					actualChild.height = (adjustBottom-margins.bottom) -
>>(adjustTop+margins.top);
>> +				}
>> +			}
>> +
>> +			return true;
>> +		}
>> +
>> +        public function setDocument(document:Object, id:String =
>>null):void
>> +        {
>> +            this.document = document;
>> +        }
>> +    }
>> +
>> +}
>> 
>> 
>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-u
>>s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2Fbdd34d2e%2Fframeworks%2Fp
>>rojects%2FBasic%2Fsrc%2Fmain%2Fflex%2Forg%2Fapache%2Fflex%2Fhtml%2Fbeads%
>>2Flayouts%2FOneFlexibleChildVerticalLayoutLockChildWidth.as&data=02%7C01%
>>7C%7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%
>>7C0%7C0%7C636370058818766511&sdata=4Q4bkts0dp4wvvLUtu2yTYNg%2Fr7jS8bRt4co
>>3nYbPKc%3D&reserved=0
>> ----------------------------------------------------------------------
>> diff --git 
>>a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layo
>>uts/OneFlexibleChildVerticalLayoutLockChildWidth.as
>>b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layo
>>uts/OneFlexibleChildVerticalLayoutLockChildWidth.as
>> deleted file mode 100644
>> index 7415299..0000000
>> --- 
>>a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layo
>>uts/OneFlexibleChildVerticalLayoutLockChildWidth.as
>> +++ /dev/null
>> @@ -1,93 +0,0 @@
>> 
>>-////////////////////////////////////////////////////////////////////////
>>////////
>> -//
>> -//  Licensed to the Apache Software Foundation (ASF) under one or more
>> -//  contributor license agreements.  See the NOTICE file distributed
>>with
>> -//  this work for additional information regarding copyright ownership.
>> -//  The ASF licenses this file to You under the Apache License,
>>Version 2.0
>> -//  (the "License"); you may not use this file except in compliance
>>with
>> -//  the License.  You may obtain a copy of the License at
>> -//
>> -//      
>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.apach
>>e.org%2Flicenses%2FLICENSE-2.0&data=02%7C01%7C%7C699bbb170b2c4f0bf3ae08d4
>>d732638a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636370058818766511&
>>sdata=bButr5xXaczhl741iZvjXub0l1B72d%2FvImajqD7mvyA%3D&reserved=0
>> -//
>> -//  Unless required by applicable law or agreed to in writing, software
>> -//  distributed under the License is distributed on an "AS IS" BASIS,
>> -//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
>>implied.
>> -//  See the License for the specific language governing permissions and
>> -//  limitations under the License.
>> -//
>> 
>>-////////////////////////////////////////////////////////////////////////
>>////////
>> -package org.apache.flex.html.beads.layouts
>> -{
>> -	import org.apache.flex.core.LayoutBase;
>> -	import org.apache.flex.core.IDocument;
>> -	import org.apache.flex.core.ILayoutChild;
>> -	import org.apache.flex.core.ILayoutHost;
>> -	import org.apache.flex.core.ILayoutView;
>> -	import org.apache.flex.core.ILayoutParent;
>> -	import org.apache.flex.core.IParentIUIBase;
>> -	import org.apache.flex.core.IStrand;
>> -	import org.apache.flex.core.IStyleableObject;
>> -	import org.apache.flex.core.IUIBase;
>> -	import org.apache.flex.core.ValuesManager;
>> -	import org.apache.flex.core.UIBase;
>> -	import org.apache.flex.events.Event;
>> -	import org.apache.flex.geom.Rectangle;
>> -	import org.apache.flex.utils.CSSContainerUtils;
>> -	import org.apache.flex.utils.CSSUtils;
>> -
>> -    /**
>> -     *  The OneFlexibleChildHorizontalLayoutLockChildHeight 
>> -	 *  is a subclass of OneFlexibleChildHorizontalLayout
>> -	 *  that sets the flexible child's height to be the height
>> -	 *  of the host container.  This is useful when you
>> -	 *  don't want the actual child's height to dictate the
>> -	 *  height of the container in order to force
>> -	 *  scrollbars or line wrapping.
>> -     *
>> -     *  @langversion 3.0
>> -     *  @playerversion Flash 10.2
>> -     *  @playerversion AIR 2.6
>> -     *  @productversion FlexJS 0.0
>> -     */
>> -	public class OneFlexibleChildVerticalLayoutLockChildWidth extends 
>>OneFlexibleChildVerticalLayout
>> -	{
>> -        /**
>> -         *  Constructor.
>> -         *
>> -         *  @langversion 3.0
>> -         *  @playerversion Flash 10.2
>> -         *  @playerversion AIR 2.6
>> -         *  @productversion FlexJS 0.0
>> -         */
>> -		public function OneFlexibleChildVerticalLayoutLockChildWidth()
>> -		{
>> -			super();
>> -		}
>> -
>> -        /**
>> -         * @copy org.apache.flex.core.IBeadLayout#layout
>> -         */
>> -		override public function layout():Boolean
>> -		{
>> -			var ret:Boolean = super.layout();
>> -			if (ret)
>> -			{
>> -				var contentView:ILayoutView = layoutView;
>> -	
>> -				var n:int = contentView.numElements;
>> -
>> -				var w:Number = host.width;
>> -				for(var i:int=0; i < n; i++) {
>> -					var child:UIBase = contentView.getElementAt(i) as UIBase;
>> -					if (child != actualChild)
>> -						w = child.width;
>> -				}
>> -				
>> -				actualChild.setWidth(w); 
>> -			}
>> -			return ret;
>> -		}
>> -
>> -    }
>> -
>> -}
>> 
>> 
>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-u
>>s.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2Fbdd34d2e%2Fframeworks%2Fp
>>rojects%2FBasic%2Fsrc%2Fmain%2Fresources%2Fbasic-manifest.xml&data=02%7C0
>>1%7C%7C699bbb170b2c4f0bf3ae08d4d732638a%7Cfa7b1b5a7b34438794aed2c178decee
>>1%7C0%7C0%7C636370058818766511&sdata=mPldYCuDfp%2BxQ4QROdu4BWSl3Dh7HP19VX
>>BR3B3IXOg%3D&reserved=0
>> ----------------------------------------------------------------------
>> diff --git 
>>a/frameworks/projects/Basic/src/main/resources/basic-manifest.xml 
>>b/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
>> index 7cbc05d..09bb1a3 100644
>> --- a/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
>> +++ b/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
>> @@ -150,8 +150,8 @@
>>     <component id="FlexibleFirstChildHorizontalLayout" 
>>class="org.apache.flex.html.beads.layouts.FlexibleFirstChildHorizontalLay
>>out"/>
>>     <component id="OneFlexibleChildVerticalLayout" 
>>class="org.apache.flex.html.beads.layouts.OneFlexibleChildVerticalLayout"
>>/>
>>     <component id="OneFlexibleChildHorizontalLayout" 
>>class="org.apache.flex.html.beads.layouts.OneFlexibleChildHorizontalLayou
>>t"/>
>> -    <component id="OneFlexibleChildVerticalLayoutLockChildWidth" 
>>class="org.apache.flex.html.beads.layouts.OneFlexibleChildVerticalLayoutL
>>ockChildWidth"/>
>> -    <component id="OneFlexibleChildHorizontalLayoutLockChildHeight" 
>>class="org.apache.flex.html.beads.layouts.OneFlexibleChildHorizontalLayou
>>tLockChildHeight"/>
>> +    <component id="OneFlexibleChildVerticalLayoutForOverflow" 
>>class="org.apache.flex.html.beads.layouts.OneFlexibleChildVerticalLayoutF
>>orOverflow"/>
>> +    <component id="OneFlexibleChildHorizontalLayoutForOverflow" 
>>class="org.apache.flex.html.beads.layouts.OneFlexibleChildHorizontalLayou
>>tForOverflow"/>
>>     <component id="MXMLBeadView" 
>>class="org.apache.flex.html.MXMLBeadView"/>
>> 
>>     <component id="SubAppLoader" 
>>class="org.apache.flex.html.SubAppLoader" />
>> 
>


Re: [07/13] git commit: [flex-asjs] [refs/heads/release0.8.0] - give up on trying to use FlexBox for full-screen 3-pane views. FlexBox seems more happy stretching to content size instead of clipping at the computed flex-ed size. These custom layouts will d

Posted by Harbs <ha...@gmail.com>.
I think I just ran into the same issue.

This layout seems to more-or-less do the job, but it’s kind of heavy.

I did some research into flexbox and it appear that setting flex-basis to 0 does the job. It needs to be set on ONLY the one flexible child.

Here’s a codepen which shows a use case.
https://codepen.io/jpdevries/pen/oXxPOP <https://codepen.io/jpdevries/pen/oXxPOP>

I noticed that the OneFlexibleLayouts have code which set the flex-basis of the children if a percentage value is set. When setting the size of the one flexible child to 0% this causes the flex-basis to be set to 0 and then the one flexible child will fit the remaining space even if it might overflow because of its children.

I have wasted quite a bit of time before I discovered this. I’m not sure whether the OneFlexibleLayout classes should be changed, or maybe we need documentation that to fit content that might overflow, the percentage should be set to 0. It could be there are cases where the entire OnFlexibleLayout should be fit when smaller and expand (and not scroll) when bigger. In that case, the current behavior might be correct.

Thoughts?
Harbs

> On May 23, 2017, at 10:16 AM, aharui@apache.org wrote:
> 
> give up on trying to use FlexBox for full-screen 3-pane views.  FlexBox seems more happy stretching to content size instead of clipping at the computed flex-ed size.  These custom layouts will do the proper sizing
> 
> 
> Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
> Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/bdd34d2e
> Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/bdd34d2e
> Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/bdd34d2e
> 
> Branch: refs/heads/release0.8.0
> Commit: bdd34d2ef4d8117fa1b222ac470482a42dbea9eb
> Parents: c505d67
> Author: Alex Harui <ah...@apache.org>
> Authored: Mon May 22 10:12:02 2017 -0700
> Committer: Alex Harui <ah...@apache.org>
> Committed: Tue May 23 00:15:56 2017 -0700
> 
> ----------------------------------------------------------------------
> ...eFlexibleChildHorizontalLayoutForOverflow.as | 290 ++++++++++++++++++
> ...xibleChildHorizontalLayoutLockChildHeight.as |  91 ------
> ...OneFlexibleChildVerticalLayoutForOverflow.as | 291 +++++++++++++++++++
> ...FlexibleChildVerticalLayoutLockChildWidth.as |  93 ------
> .../Basic/src/main/resources/basic-manifest.xml |   4 +-
> 5 files changed, 583 insertions(+), 186 deletions(-)
> ----------------------------------------------------------------------
> 
> 
> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bdd34d2e/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayoutForOverflow.as
> ----------------------------------------------------------------------
> diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayoutForOverflow.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayoutForOverflow.as
> new file mode 100644
> index 0000000..c6abc22
> --- /dev/null
> +++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayoutForOverflow.as
> @@ -0,0 +1,290 @@
> +////////////////////////////////////////////////////////////////////////////////
> +//
> +//  Licensed to the Apache Software Foundation (ASF) under one or more
> +//  contributor license agreements.  See the NOTICE file distributed with
> +//  this work for additional information regarding copyright ownership.
> +//  The ASF licenses this file to You under the Apache License, Version 2.0
> +//  (the "License"); you may not use this file except in compliance with
> +//  the License.  You may obtain a copy of the License at
> +//
> +//      http://www.apache.org/licenses/LICENSE-2.0
> +//
> +//  Unless required by applicable law or agreed to in writing, software
> +//  distributed under the License is distributed on an "AS IS" BASIS,
> +//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> +//  See the License for the specific language governing permissions and
> +//  limitations under the License.
> +//
> +////////////////////////////////////////////////////////////////////////////////
> +package org.apache.flex.html.beads.layouts
> +{
> +	import org.apache.flex.core.LayoutBase;
> +	import org.apache.flex.core.IDocument;
> +	import org.apache.flex.core.ILayoutChild;
> +	import org.apache.flex.core.ILayoutHost;
> +	import org.apache.flex.core.ILayoutView;
> +	import org.apache.flex.core.ILayoutParent;
> +	import org.apache.flex.core.IParentIUIBase;
> +	import org.apache.flex.core.IStrand;
> +	import org.apache.flex.core.IUIBase;
> +	import org.apache.flex.core.ValuesManager;
> +	import org.apache.flex.core.UIBase;
> +	import org.apache.flex.events.Event;
> +	import org.apache.flex.geom.Rectangle;
> +	import org.apache.flex.utils.CSSContainerUtils;
> +	import org.apache.flex.utils.CSSUtils;
> +
> +    /**
> +     *  The OneFlexibleChildHorizontalLayoutForOverflowis 
> +	 *  intended for building apps that clip
> +	 *  and/or scroll the overflow, especially in a 
> +	 *  3-pane view like the ASDoc examples.  It does not use
> +	 *  FlexBox because FlexBox wants to grow to the size
> +	 *  of the content without specifying width/height on
> +	 *  the flexible child.  But then the children in
> +	 *  the flexible child cannot use % sizing.
> +	 *  This layout presumes the parent is a known size.
> +	 *
> +     *  @langversion 3.0
> +     *  @playerversion Flash 10.2
> +     *  @playerversion AIR 2.6
> +     *  @productversion FlexJS 0.0
> +     */
> +	public class OneFlexibleChildHorizontalLayoutForOverflow extends LayoutBase implements IOneFlexibleChildLayout, IDocument
> +	{
> +        /**
> +         *  Constructor.
> +         *
> +         *  @langversion 3.0
> +         *  @playerversion Flash 10.2
> +         *  @playerversion AIR 2.6
> +         *  @productversion FlexJS 0.0
> +         */
> +		public function OneFlexibleChildHorizontalLayoutForOverflow()
> +		{
> +			super();
> +		}
> +
> +        private var _flexibleChild:String;
> +
> +        protected var actualChild:ILayoutChild;
> +
> +        /**
> +         *  @private
> +         *  The document.
> +         */
> +        private var document:Object;
> +
> +		/**
> +		 *  The id of the flexible child
> +		 *
> +		 *  @langversion 3.0
> +		 *  @playerversion Flash 10.2
> +		 *  @playerversion AIR 2.6
> +		 *  @productversion FlexJS 0.0
> +		 */
> +		public function get flexibleChild():String
> +		{
> +			return _flexibleChild;
> +		}
> +
> +		/**
> +		 * @private
> +		 */
> +		public function set flexibleChild(value:String):void
> +		{
> +			_flexibleChild = value;
> +		}
> +
> +        /**
> +         * @copy org.apache.flex.core.IBeadLayout#layout
> +         */
> +		COMPILE::JS
> +		override public function layout():Boolean
> +		{
> +			var contentView:ILayoutView = layoutView;
> +
> +			actualChild = document[flexibleChild];
> +
> +			var n:int = contentView.numElements;
> +			if (n == 0) return false;
> +
> +			for(var i:int=0; i < n; i++) {
> +				var child:UIBase = contentView.getElementAt(i) as UIBase;
> +				if (child.element.style["display"] != "inline-flex" && child.element.style["display"] != "none")
> +					child.element.style["display"] = "inline-block";
> +			}
> +
> +			var w:Number = host.width;
> +			for(i=0; i < n; i++) {
> +				child = contentView.getElementAt(i) as UIBase;
> +				if (child != actualChild)
> +					w -= child.width;
> +			}
> +			actualChild.width = w;
> +					
> +			return true;
> +		}
> +
> +		COMPILE::SWF
> +		override public function layout():Boolean
> +		{
> +			var contentView:ILayoutView = layoutView;
> +			actualChild = document.hasOwnProperty(flexibleChild) ? document[flexibleChild] : null;
> +
> +			var n:Number = contentView.numElements;
> +			if (n == 0) return false;
> +			
> +			var maxWidth:Number = 0;
> +			var maxHeight:Number = 0;
> +			var hostSizedToContent:Boolean = host.isHeightSizedToContent();
> +			var hostWidth:Number = host.width;
> +			var hostHeight:Number = host.height;
> +
> +			var ilc:ILayoutChild;
> +			var data:Object;
> +			var canAdjust:Boolean = false;
> +			var margins:Object;
> +
> +			var paddingMetrics:Rectangle = CSSContainerUtils.getPaddingMetrics(host);
> +			var borderMetrics:Rectangle = CSSContainerUtils.getBorderMetrics(host);
> +			
> +			// adjust the host's usable size by the metrics. If hostSizedToContent, then the
> +			// resulting adjusted value may be less than zero.
> +			hostWidth -= paddingMetrics.left + paddingMetrics.right + borderMetrics.left + borderMetrics.right;
> +			hostHeight -= paddingMetrics.top + paddingMetrics.bottom + borderMetrics.top + borderMetrics.bottom;
> +
> +			var xpos:Number = borderMetrics.left + paddingMetrics.left;
> +			var ypos:Number = borderMetrics.top + paddingMetrics.left;
> +			var child:IUIBase;
> +			var childHeight:Number;
> +			var i:int;
> +			var childYpos:Number;
> +			var adjustLeft:Number = 0;
> +			var adjustRight:Number = hostWidth + borderMetrics.left + paddingMetrics.left;
> +
> +			// first work from left to right
> +			for(i=0; i < n; i++)
> +			{
> +				child = contentView.getElementAt(i) as IUIBase;
> +				if (child == null || !child.visible) continue;
> +				if (child == actualChild) break;
> +
> +				margins = childMargins(child, hostWidth, hostHeight);
> +				ilc = child as ILayoutChild;
> +
> +				xpos += margins.left;
> +
> +				childYpos = ypos + margins.top; // default y position
> +
> +				childHeight = child.height;
> +				if (ilc != null)
> +				{
> +					if (!isNaN(ilc.percentHeight)) {
> +						childHeight = host.height * ilc.percentHeight/100.0;
> +					}
> +					else if (isNaN(ilc.explicitHeight)) {
> +						childHeight = host.height;
> +					}
> +					ilc.setHeight(childHeight);
> +				}
> +
> +				if (ilc) {
> +					ilc.setX(xpos);
> +					ilc.setY(childYpos);
> +
> +					if (!isNaN(ilc.percentWidth)) {
> +						ilc.setWidth(hostWidth * ilc.percentWidth / 100);
> +					}
> +
> +				} else {
> +					child.x = xpos;
> +					child.y = childYpos;
> +				}
> +
> +				xpos += child.width + margins.right;
> +				adjustLeft = xpos;
> +			}
> +
> +			// then work from right to left
> +			xpos = hostWidth + borderMetrics.left + paddingMetrics.left;
> +
> +			for(i=(n-1); actualChild != null && i >= 0; i--)
> +			{
> +				child = contentView.getElementAt(i) as IUIBase;
> +				if (child == null || !child.visible) continue;
> +				if (child == actualChild) break;
> +
> +				margins = childMargins(child, hostWidth, hostHeight);
> +				ilc = child as ILayoutChild;
> +
> +				childYpos = ypos + margins.top; // default y position
> +
> +				childHeight = child.height;
> +				if (ilc != null)
> +				{
> +					if (!isNaN(ilc.percentHeight)) {
> +						childHeight = host.height * ilc.percentHeight/100.0;
> +					}
> +					else if (isNaN(ilc.explicitHeight)) {
> +						childHeight = host.height;
> +					}
> +					ilc.setHeight(childHeight);
> +				}
> +
> +				if (ilc) {
> +					if (!isNaN(ilc.percentWidth)) {
> +						ilc.setWidth(hostWidth * ilc.percentWidth / 100);
> +					}
> +				}
> +
> +				xpos -= child.width + margins.right;
> +
> +				if (ilc) {
> +					ilc.setX(xpos);
> +					ilc.setY(childYpos);
> +				} else {
> +					child.x = xpos;
> +					child.y = childYpos;
> +				}
> +
> +				xpos -= margins.left;
> +				adjustRight = xpos;
> +			}
> +
> +			// now adjust the actualChild to fill the space.
> +			if (actualChild != null) {
> +				margins = childMargins(actualChild, hostWidth, hostHeight);
> +				ilc = actualChild as ILayoutChild;
> +				childHeight = actualChild.height;
> +				if (ilc != null)
> +				{
> +					if (!isNaN(ilc.percentHeight)) {
> +						childHeight = host.height * ilc.percentHeight/100.0;
> +					}
> +					else if (isNaN(ilc.explicitHeight)) {
> +						childHeight = host.height;
> +					}
> +					ilc.setHeight(childHeight);
> +				}
> +				childYpos = ypos + margins.top;
> +				actualChild.x = adjustLeft + margins.left;
> +				actualChild.y = childYpos;
> +				if (ilc) {
> +					ilc.setWidth((adjustRight-margins.right) - (adjustLeft+margins.left));
> +				} else {
> +					actualChild.width = (adjustRight-margins.right) - (adjustLeft+margins.left);
> +				}
> +			}
> +
> +            return true;
> +		}
> +
> +        public function setDocument(document:Object, id:String = null):void
> +        {
> +            this.document = document;
> +        }
> +
> +    }
> +
> +}
> 
> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bdd34d2e/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayoutLockChildHeight.as
> ----------------------------------------------------------------------
> diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayoutLockChildHeight.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayoutLockChildHeight.as
> deleted file mode 100644
> index d170d23..0000000
> --- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayoutLockChildHeight.as
> +++ /dev/null
> @@ -1,91 +0,0 @@
> -////////////////////////////////////////////////////////////////////////////////
> -//
> -//  Licensed to the Apache Software Foundation (ASF) under one or more
> -//  contributor license agreements.  See the NOTICE file distributed with
> -//  this work for additional information regarding copyright ownership.
> -//  The ASF licenses this file to You under the Apache License, Version 2.0
> -//  (the "License"); you may not use this file except in compliance with
> -//  the License.  You may obtain a copy of the License at
> -//
> -//      http://www.apache.org/licenses/LICENSE-2.0
> -//
> -//  Unless required by applicable law or agreed to in writing, software
> -//  distributed under the License is distributed on an "AS IS" BASIS,
> -//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> -//  See the License for the specific language governing permissions and
> -//  limitations under the License.
> -//
> -////////////////////////////////////////////////////////////////////////////////
> -package org.apache.flex.html.beads.layouts
> -{
> -	import org.apache.flex.core.LayoutBase;
> -	import org.apache.flex.core.IDocument;
> -	import org.apache.flex.core.ILayoutChild;
> -	import org.apache.flex.core.ILayoutHost;
> -	import org.apache.flex.core.ILayoutView;
> -	import org.apache.flex.core.ILayoutParent;
> -	import org.apache.flex.core.IParentIUIBase;
> -	import org.apache.flex.core.IStrand;
> -	import org.apache.flex.core.IUIBase;
> -	import org.apache.flex.core.ValuesManager;
> -	import org.apache.flex.core.UIBase;
> -	import org.apache.flex.events.Event;
> -	import org.apache.flex.geom.Rectangle;
> -	import org.apache.flex.utils.CSSContainerUtils;
> -	import org.apache.flex.utils.CSSUtils;
> -
> -    /**
> -     *  The OneFlexibleChildHorizontalLayoutLockChildHeight 
> -	 *  is a subclass of OneFlexibleChildHorizontalLayout
> -	 *  that sets the flexible child's height to be the height
> -	 *  of the host container.  This is useful when you
> -	 *  don't want the actual child's height to dictate the
> -	 *  height of the container in order to force
> -	 *  scrollbars
> -     *
> -     *  @langversion 3.0
> -     *  @playerversion Flash 10.2
> -     *  @playerversion AIR 2.6
> -     *  @productversion FlexJS 0.0
> -     */
> -	public class OneFlexibleChildHorizontalLayoutLockChildHeight extends OneFlexibleChildHorizontalLayout
> -	{
> -        /**
> -         *  Constructor.
> -         *
> -         *  @langversion 3.0
> -         *  @playerversion Flash 10.2
> -         *  @playerversion AIR 2.6
> -         *  @productversion FlexJS 0.0
> -         */
> -		public function OneFlexibleChildHorizontalLayoutLockChildHeight()
> -		{
> -			super();
> -		}
> -
> -        /**
> -         * @copy org.apache.flex.core.IBeadLayout#layout
> -         */
> -		override public function layout():Boolean
> -		{
> -			var ret:Boolean = super.layout();
> -			if (ret)
> -			{
> -				var contentView:ILayoutView = layoutView;
> -	
> -				var n:int = contentView.numElements;
> -
> -				var h:Number = host.height;
> -				for(var i:int=0; i < n; i++) {
> -					var child:UIBase = contentView.getElementAt(i) as UIBase;
> -					if (child != actualChild)
> -						h = child.height;
> -				}
> -				actualChild.setHeight(h); 
> -			}
> -			return ret;
> -		}
> -
> -    }
> -
> -}
> 
> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bdd34d2e/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayoutForOverflow.as
> ----------------------------------------------------------------------
> diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayoutForOverflow.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayoutForOverflow.as
> new file mode 100644
> index 0000000..5679f80
> --- /dev/null
> +++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayoutForOverflow.as
> @@ -0,0 +1,291 @@
> +////////////////////////////////////////////////////////////////////////////////
> +//
> +//  Licensed to the Apache Software Foundation (ASF) under one or more
> +//  contributor license agreements.  See the NOTICE file distributed with
> +//  this work for additional information regarding copyright ownership.
> +//  The ASF licenses this file to You under the Apache License, Version 2.0
> +//  (the "License"); you may not use this file except in compliance with
> +//  the License.  You may obtain a copy of the License at
> +//
> +//      http://www.apache.org/licenses/LICENSE-2.0
> +//
> +//  Unless required by applicable law or agreed to in writing, software
> +//  distributed under the License is distributed on an "AS IS" BASIS,
> +//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> +//  See the License for the specific language governing permissions and
> +//  limitations under the License.
> +//
> +////////////////////////////////////////////////////////////////////////////////
> +package org.apache.flex.html.beads.layouts
> +{
> +	import org.apache.flex.core.LayoutBase;
> +	import org.apache.flex.core.IDocument;
> +	import org.apache.flex.core.ILayoutChild;
> +	import org.apache.flex.core.ILayoutHost;
> +	import org.apache.flex.core.ILayoutView;
> +	import org.apache.flex.core.ILayoutParent;
> +	import org.apache.flex.core.IParentIUIBase;
> +	import org.apache.flex.core.IStrand;
> +	import org.apache.flex.core.IStyleableObject;
> +	import org.apache.flex.core.IUIBase;
> +	import org.apache.flex.core.ValuesManager;
> +	import org.apache.flex.core.UIBase;
> +	import org.apache.flex.events.Event;
> +	import org.apache.flex.geom.Rectangle;
> +	import org.apache.flex.utils.CSSContainerUtils;
> +	import org.apache.flex.utils.CSSUtils;
> +
> +    /**
> +     *  The OneFlexibleChildVerticalLayoutForOverflow is 
> +	 *  intended for building apps that clip
> +	 *  and/or scroll the overflow, especially in a 
> +	 *  3-pane view like the ASDoc examples.  It does not use
> +	 *  FlexBox because FlexBox wants to grow to the size
> +	 *  of the content without specifying width/height on
> +	 *  the flexible child.  But then the children in
> +	 *  the flexible child cannot use % sizing.
> +	 *  This layout presumes the parent is a known size.
> +     *
> +     *  @langversion 3.0
> +     *  @playerversion Flash 10.2
> +     *  @playerversion AIR 2.6
> +     *  @productversion FlexJS 0.0
> +     */
> +	public class OneFlexibleChildVerticalLayoutForOverflow extends LayoutBase implements IOneFlexibleChildLayout, IDocument
> +	{
> +        /**
> +         *  Constructor.
> +         *
> +         *  @langversion 3.0
> +         *  @playerversion Flash 10.2
> +         *  @playerversion AIR 2.6
> +         *  @productversion FlexJS 0.0
> +         */
> +		public function OneFlexibleChildVerticalLayoutForOverflow()
> +		{
> +			super();
> +		}
> +
> +        private var _flexibleChild:String;
> +
> +        protected var actualChild:ILayoutChild;
> +
> +        /**
> +         *  @private
> +         *  The document.
> +         */
> +        private var document:Object;
> +
> +		/**
> +		 *  The id of the flexible child
> +		 *
> +		 *  @langversion 3.0
> +		 *  @playerversion Flash 10.2
> +		 *  @playerversion AIR 2.6
> +		 *  @productversion FlexJS 0.0
> +		 */
> +		public function get flexibleChild():String
> +		{
> +			return _flexibleChild;
> +		}
> +
> +		/**
> +		 * @private
> +		 */
> +		public function set flexibleChild(value:String):void
> +		{
> +			_flexibleChild = value;
> +		}
> +
> +        /**
> +         * @copy org.apache.flex.core.IBeadLayout#layout
> +         */
> +		COMPILE::JS
> +		override public function layout():Boolean
> +		{
> +			var contentView:ILayoutView = layoutView;
> +
> +			actualChild = document[flexibleChild];
> +
> +			var n:int = contentView.numElements;
> +			if (n == 0) return false;
> +
> +			for(var i:int=0; i < n; i++) {
> +				var child:UIBase = contentView.getElementAt(i) as UIBase;
> +				if (child.element.style["display"] != "flex" && child.element.style["display"] != "none")
> +					child.element.style["display"] = "block";
> +			}
> +
> +			var h:Number = host.height;
> +			for(i=0; i < n; i++) {
> +				child = contentView.getElementAt(i) as UIBase;
> +				if (child != actualChild)
> +					h -= child.height;
> +			}
> +			actualChild.height = h;
> +					
> +			return true;
> +		}
> +
> +		COMPILE::SWF
> +		override public function layout():Boolean
> +		{
> +			var contentView:ILayoutView = layoutView;
> +			actualChild = document.hasOwnProperty(flexibleChild) ? document[flexibleChild] : null;
> +
> +			var n:Number = contentView.numElements;
> +			if (n == 0) return false;
> +			
> +			var maxWidth:Number = 0;
> +			var maxHeight:Number = 0;
> +			var hostSizedToContent:Boolean = host.isWidthSizedToContent();
> +			var hostWidth:Number = host.width;
> +			var hostHeight:Number = host.height;
> +
> +			var ilc:ILayoutChild;
> +			var data:Object;
> +			var canAdjust:Boolean = false;
> +			var margins:Object;
> +
> +			var paddingMetrics:Rectangle = CSSContainerUtils.getPaddingMetrics(host);
> +			var borderMetrics:Rectangle = CSSContainerUtils.getBorderMetrics(host);
> +			
> +			// adjust the host's usable size by the metrics. If hostSizedToContent, then the
> +			// resulting adjusted value may be less than zero.
> +			hostWidth -= paddingMetrics.left + paddingMetrics.right + borderMetrics.left + borderMetrics.right;
> +			hostHeight -= paddingMetrics.top + paddingMetrics.bottom + borderMetrics.top + borderMetrics.bottom;
> +
> +			var xpos:Number = borderMetrics.left + paddingMetrics.left;
> +			var ypos:Number = borderMetrics.top + paddingMetrics.left;
> +			var child:IUIBase;
> +			var childWidth:Number;
> +			var i:int;
> +			var childXpos:Number;
> +			var adjustTop:Number = 0;
> +			var adjustBottom:Number = hostHeight + borderMetrics.top + paddingMetrics.top;
> +
> +			// first work from top to bottom
> +			for(i=0; i < n; i++)
> +			{
> +				child = contentView.getElementAt(i) as IUIBase;
> +				if (child == null || !child.visible) continue;
> +				if (child == actualChild) break;
> +
> +				margins = childMargins(child, hostWidth, hostHeight);
> +				ilc = child as ILayoutChild;
> +
> +				ypos += margins.top;
> +
> +				childXpos = xpos + margins.left; // default x position
> +
> +				childWidth = child.width;
> +				if (ilc != null)
> +				{
> +					if (!isNaN(ilc.percentWidth)) {
> +						childWidth = hostWidth * ilc.percentWidth/100.0;
> +					}
> +					else if (isNaN(ilc.explicitWidth)) {
> +						childWidth = hostWidth;
> +					}
> +					ilc.setWidth(childWidth);
> +				}
> +
> +				if (ilc) {
> +					ilc.setX(childXpos);
> +					ilc.setY(ypos);
> +
> +					if (!isNaN(ilc.percentHeight)) {
> +						ilc.setHeight(hostHeight * ilc.percentHeight / 100);
> +					}
> +
> +				} else {
> +					child.x = childXpos;
> +					child.y = ypos;
> +				}
> +
> +				ypos += child.height + margins.bottom;
> +				adjustTop = ypos;
> +			}
> +
> +			// then work from bottom to top
> +			ypos = hostHeight + borderMetrics.top + paddingMetrics.top;
> +
> +			for(i=(n-1); actualChild != null && i >= 0; i--)
> +			{
> +				child = contentView.getElementAt(i) as IUIBase;
> +				if (child == null || !child.visible) continue;
> +				if (child == actualChild) break;
> +
> +				margins = childMargins(child, hostWidth, hostHeight);
> +				ilc = child as ILayoutChild;
> +
> +				childXpos = xpos + margins.left; // default x position
> +
> +				childWidth = child.width;
> +				if (ilc != null)
> +				{
> +					if (!isNaN(ilc.percentWidth)) {
> +						childWidth = hostWidth * ilc.percentWidth/100.0;
> +					}
> +					else if (isNaN(ilc.explicitWidth)) {
> +						childWidth = hostWidth;
> +					}
> +					ilc.setWidth(childWidth);
> +				}
> +
> +				if (ilc) {
> +					if (!isNaN(ilc.percentHeight)) {
> +						ilc.setHeight(hostHeight * ilc.percentHeight / 100);
> +					}
> +				}
> +
> +				ypos -= child.height + margins.bottom;
> +
> +				if (ilc) {
> +					ilc.setX(childXpos);
> +					ilc.setY(ypos);
> +				} else {
> +					child.x = childXpos;
> +					child.y = ypos;
> +				}
> +
> +				ypos -= margins.top;
> +				adjustBottom = ypos;
> +			}
> +
> +			// now adjust the actualChild to fill the space.
> +			if (actualChild != null) {
> +				margins = childMargins(actualChild, hostWidth, hostHeight);
> +				ilc = actualChild as ILayoutChild;
> +				childWidth = actualChild.width;
> +				if (ilc != null)
> +				{
> +					if (!isNaN(ilc.percentWidth)) {
> +						childWidth = hostWidth * ilc.percentWidth/100.0;
> +					}
> +					else if (isNaN(ilc.explicitWidth)) {
> +						childWidth = hostWidth;
> +					}
> +					ilc.setWidth(childWidth);
> +				}
> +				childXpos = xpos + margins.left;
> +					
> +				actualChild.x = childXpos
> +				actualChild.y = adjustTop + margins.top;
> +				if (ilc) {
> +					ilc.setHeight((adjustBottom-margins.bottom) - (adjustTop+margins.top));
> +				} else {
> +					actualChild.height = (adjustBottom-margins.bottom) - (adjustTop+margins.top);
> +				}
> +			}
> +
> +			return true;
> +		}
> +
> +        public function setDocument(document:Object, id:String = null):void
> +        {
> +            this.document = document;
> +        }
> +    }
> +
> +}
> 
> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bdd34d2e/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayoutLockChildWidth.as
> ----------------------------------------------------------------------
> diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayoutLockChildWidth.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayoutLockChildWidth.as
> deleted file mode 100644
> index 7415299..0000000
> --- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayoutLockChildWidth.as
> +++ /dev/null
> @@ -1,93 +0,0 @@
> -////////////////////////////////////////////////////////////////////////////////
> -//
> -//  Licensed to the Apache Software Foundation (ASF) under one or more
> -//  contributor license agreements.  See the NOTICE file distributed with
> -//  this work for additional information regarding copyright ownership.
> -//  The ASF licenses this file to You under the Apache License, Version 2.0
> -//  (the "License"); you may not use this file except in compliance with
> -//  the License.  You may obtain a copy of the License at
> -//
> -//      http://www.apache.org/licenses/LICENSE-2.0
> -//
> -//  Unless required by applicable law or agreed to in writing, software
> -//  distributed under the License is distributed on an "AS IS" BASIS,
> -//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> -//  See the License for the specific language governing permissions and
> -//  limitations under the License.
> -//
> -////////////////////////////////////////////////////////////////////////////////
> -package org.apache.flex.html.beads.layouts
> -{
> -	import org.apache.flex.core.LayoutBase;
> -	import org.apache.flex.core.IDocument;
> -	import org.apache.flex.core.ILayoutChild;
> -	import org.apache.flex.core.ILayoutHost;
> -	import org.apache.flex.core.ILayoutView;
> -	import org.apache.flex.core.ILayoutParent;
> -	import org.apache.flex.core.IParentIUIBase;
> -	import org.apache.flex.core.IStrand;
> -	import org.apache.flex.core.IStyleableObject;
> -	import org.apache.flex.core.IUIBase;
> -	import org.apache.flex.core.ValuesManager;
> -	import org.apache.flex.core.UIBase;
> -	import org.apache.flex.events.Event;
> -	import org.apache.flex.geom.Rectangle;
> -	import org.apache.flex.utils.CSSContainerUtils;
> -	import org.apache.flex.utils.CSSUtils;
> -
> -    /**
> -     *  The OneFlexibleChildHorizontalLayoutLockChildHeight 
> -	 *  is a subclass of OneFlexibleChildHorizontalLayout
> -	 *  that sets the flexible child's height to be the height
> -	 *  of the host container.  This is useful when you
> -	 *  don't want the actual child's height to dictate the
> -	 *  height of the container in order to force
> -	 *  scrollbars or line wrapping.
> -     *
> -     *  @langversion 3.0
> -     *  @playerversion Flash 10.2
> -     *  @playerversion AIR 2.6
> -     *  @productversion FlexJS 0.0
> -     */
> -	public class OneFlexibleChildVerticalLayoutLockChildWidth extends OneFlexibleChildVerticalLayout
> -	{
> -        /**
> -         *  Constructor.
> -         *
> -         *  @langversion 3.0
> -         *  @playerversion Flash 10.2
> -         *  @playerversion AIR 2.6
> -         *  @productversion FlexJS 0.0
> -         */
> -		public function OneFlexibleChildVerticalLayoutLockChildWidth()
> -		{
> -			super();
> -		}
> -
> -        /**
> -         * @copy org.apache.flex.core.IBeadLayout#layout
> -         */
> -		override public function layout():Boolean
> -		{
> -			var ret:Boolean = super.layout();
> -			if (ret)
> -			{
> -				var contentView:ILayoutView = layoutView;
> -	
> -				var n:int = contentView.numElements;
> -
> -				var w:Number = host.width;
> -				for(var i:int=0; i < n; i++) {
> -					var child:UIBase = contentView.getElementAt(i) as UIBase;
> -					if (child != actualChild)
> -						w = child.width;
> -				}
> -				
> -				actualChild.setWidth(w); 
> -			}
> -			return ret;
> -		}
> -
> -    }
> -
> -}
> 
> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bdd34d2e/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
> ----------------------------------------------------------------------
> diff --git a/frameworks/projects/Basic/src/main/resources/basic-manifest.xml b/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
> index 7cbc05d..09bb1a3 100644
> --- a/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
> +++ b/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
> @@ -150,8 +150,8 @@
>     <component id="FlexibleFirstChildHorizontalLayout" class="org.apache.flex.html.beads.layouts.FlexibleFirstChildHorizontalLayout"/>
>     <component id="OneFlexibleChildVerticalLayout" class="org.apache.flex.html.beads.layouts.OneFlexibleChildVerticalLayout"/>
>     <component id="OneFlexibleChildHorizontalLayout" class="org.apache.flex.html.beads.layouts.OneFlexibleChildHorizontalLayout"/>
> -    <component id="OneFlexibleChildVerticalLayoutLockChildWidth" class="org.apache.flex.html.beads.layouts.OneFlexibleChildVerticalLayoutLockChildWidth"/>
> -    <component id="OneFlexibleChildHorizontalLayoutLockChildHeight" class="org.apache.flex.html.beads.layouts.OneFlexibleChildHorizontalLayoutLockChildHeight"/>
> +    <component id="OneFlexibleChildVerticalLayoutForOverflow" class="org.apache.flex.html.beads.layouts.OneFlexibleChildVerticalLayoutForOverflow"/>
> +    <component id="OneFlexibleChildHorizontalLayoutForOverflow" class="org.apache.flex.html.beads.layouts.OneFlexibleChildHorizontalLayoutForOverflow"/>
>     <component id="MXMLBeadView" class="org.apache.flex.html.MXMLBeadView"/>
> 
>     <component id="SubAppLoader" class="org.apache.flex.html.SubAppLoader" />
> 


[07/13] git commit: [flex-asjs] [refs/heads/release0.8.0] - give up on trying to use FlexBox for full-screen 3-pane views. FlexBox seems more happy stretching to content size instead of clipping at the computed flex-ed size. These custom layouts will d

Posted by ah...@apache.org.
give up on trying to use FlexBox for full-screen 3-pane views.  FlexBox seems more happy stretching to content size instead of clipping at the computed flex-ed size.  These custom layouts will do the proper sizing


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

Branch: refs/heads/release0.8.0
Commit: bdd34d2ef4d8117fa1b222ac470482a42dbea9eb
Parents: c505d67
Author: Alex Harui <ah...@apache.org>
Authored: Mon May 22 10:12:02 2017 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue May 23 00:15:56 2017 -0700

----------------------------------------------------------------------
 ...eFlexibleChildHorizontalLayoutForOverflow.as | 290 ++++++++++++++++++
 ...xibleChildHorizontalLayoutLockChildHeight.as |  91 ------
 ...OneFlexibleChildVerticalLayoutForOverflow.as | 291 +++++++++++++++++++
 ...FlexibleChildVerticalLayoutLockChildWidth.as |  93 ------
 .../Basic/src/main/resources/basic-manifest.xml |   4 +-
 5 files changed, 583 insertions(+), 186 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bdd34d2e/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayoutForOverflow.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayoutForOverflow.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayoutForOverflow.as
new file mode 100644
index 0000000..c6abc22
--- /dev/null
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayoutForOverflow.as
@@ -0,0 +1,290 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.html.beads.layouts
+{
+	import org.apache.flex.core.LayoutBase;
+	import org.apache.flex.core.IDocument;
+	import org.apache.flex.core.ILayoutChild;
+	import org.apache.flex.core.ILayoutHost;
+	import org.apache.flex.core.ILayoutView;
+	import org.apache.flex.core.ILayoutParent;
+	import org.apache.flex.core.IParentIUIBase;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.IUIBase;
+	import org.apache.flex.core.ValuesManager;
+	import org.apache.flex.core.UIBase;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.geom.Rectangle;
+	import org.apache.flex.utils.CSSContainerUtils;
+	import org.apache.flex.utils.CSSUtils;
+
+    /**
+     *  The OneFlexibleChildHorizontalLayoutForOverflowis 
+	 *  intended for building apps that clip
+	 *  and/or scroll the overflow, especially in a 
+	 *  3-pane view like the ASDoc examples.  It does not use
+	 *  FlexBox because FlexBox wants to grow to the size
+	 *  of the content without specifying width/height on
+	 *  the flexible child.  But then the children in
+	 *  the flexible child cannot use % sizing.
+	 *  This layout presumes the parent is a known size.
+	 *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+	public class OneFlexibleChildHorizontalLayoutForOverflow extends LayoutBase implements IOneFlexibleChildLayout, IDocument
+	{
+        /**
+         *  Constructor.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function OneFlexibleChildHorizontalLayoutForOverflow()
+		{
+			super();
+		}
+
+        private var _flexibleChild:String;
+
+        protected var actualChild:ILayoutChild;
+
+        /**
+         *  @private
+         *  The document.
+         */
+        private var document:Object;
+
+		/**
+		 *  The id of the flexible child
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function get flexibleChild():String
+		{
+			return _flexibleChild;
+		}
+
+		/**
+		 * @private
+		 */
+		public function set flexibleChild(value:String):void
+		{
+			_flexibleChild = value;
+		}
+
+        /**
+         * @copy org.apache.flex.core.IBeadLayout#layout
+         */
+		COMPILE::JS
+		override public function layout():Boolean
+		{
+			var contentView:ILayoutView = layoutView;
+
+			actualChild = document[flexibleChild];
+
+			var n:int = contentView.numElements;
+			if (n == 0) return false;
+
+			for(var i:int=0; i < n; i++) {
+				var child:UIBase = contentView.getElementAt(i) as UIBase;
+				if (child.element.style["display"] != "inline-flex" && child.element.style["display"] != "none")
+					child.element.style["display"] = "inline-block";
+			}
+
+			var w:Number = host.width;
+			for(i=0; i < n; i++) {
+				child = contentView.getElementAt(i) as UIBase;
+				if (child != actualChild)
+					w -= child.width;
+			}
+			actualChild.width = w;
+					
+			return true;
+		}
+
+		COMPILE::SWF
+		override public function layout():Boolean
+		{
+			var contentView:ILayoutView = layoutView;
+			actualChild = document.hasOwnProperty(flexibleChild) ? document[flexibleChild] : null;
+
+			var n:Number = contentView.numElements;
+			if (n == 0) return false;
+			
+			var maxWidth:Number = 0;
+			var maxHeight:Number = 0;
+			var hostSizedToContent:Boolean = host.isHeightSizedToContent();
+			var hostWidth:Number = host.width;
+			var hostHeight:Number = host.height;
+
+			var ilc:ILayoutChild;
+			var data:Object;
+			var canAdjust:Boolean = false;
+			var margins:Object;
+
+			var paddingMetrics:Rectangle = CSSContainerUtils.getPaddingMetrics(host);
+			var borderMetrics:Rectangle = CSSContainerUtils.getBorderMetrics(host);
+			
+			// adjust the host's usable size by the metrics. If hostSizedToContent, then the
+			// resulting adjusted value may be less than zero.
+			hostWidth -= paddingMetrics.left + paddingMetrics.right + borderMetrics.left + borderMetrics.right;
+			hostHeight -= paddingMetrics.top + paddingMetrics.bottom + borderMetrics.top + borderMetrics.bottom;
+
+			var xpos:Number = borderMetrics.left + paddingMetrics.left;
+			var ypos:Number = borderMetrics.top + paddingMetrics.left;
+			var child:IUIBase;
+			var childHeight:Number;
+			var i:int;
+			var childYpos:Number;
+			var adjustLeft:Number = 0;
+			var adjustRight:Number = hostWidth + borderMetrics.left + paddingMetrics.left;
+
+			// first work from left to right
+			for(i=0; i < n; i++)
+			{
+				child = contentView.getElementAt(i) as IUIBase;
+				if (child == null || !child.visible) continue;
+				if (child == actualChild) break;
+
+				margins = childMargins(child, hostWidth, hostHeight);
+				ilc = child as ILayoutChild;
+
+				xpos += margins.left;
+
+				childYpos = ypos + margins.top; // default y position
+
+				childHeight = child.height;
+				if (ilc != null)
+				{
+					if (!isNaN(ilc.percentHeight)) {
+						childHeight = host.height * ilc.percentHeight/100.0;
+					}
+					else if (isNaN(ilc.explicitHeight)) {
+						childHeight = host.height;
+					}
+					ilc.setHeight(childHeight);
+				}
+
+				if (ilc) {
+					ilc.setX(xpos);
+					ilc.setY(childYpos);
+
+					if (!isNaN(ilc.percentWidth)) {
+						ilc.setWidth(hostWidth * ilc.percentWidth / 100);
+					}
+
+				} else {
+					child.x = xpos;
+					child.y = childYpos;
+				}
+
+				xpos += child.width + margins.right;
+				adjustLeft = xpos;
+			}
+
+			// then work from right to left
+			xpos = hostWidth + borderMetrics.left + paddingMetrics.left;
+
+			for(i=(n-1); actualChild != null && i >= 0; i--)
+			{
+				child = contentView.getElementAt(i) as IUIBase;
+				if (child == null || !child.visible) continue;
+				if (child == actualChild) break;
+
+				margins = childMargins(child, hostWidth, hostHeight);
+				ilc = child as ILayoutChild;
+
+				childYpos = ypos + margins.top; // default y position
+
+				childHeight = child.height;
+				if (ilc != null)
+				{
+					if (!isNaN(ilc.percentHeight)) {
+						childHeight = host.height * ilc.percentHeight/100.0;
+					}
+					else if (isNaN(ilc.explicitHeight)) {
+						childHeight = host.height;
+					}
+					ilc.setHeight(childHeight);
+				}
+
+				if (ilc) {
+					if (!isNaN(ilc.percentWidth)) {
+						ilc.setWidth(hostWidth * ilc.percentWidth / 100);
+					}
+				}
+
+				xpos -= child.width + margins.right;
+
+				if (ilc) {
+					ilc.setX(xpos);
+					ilc.setY(childYpos);
+				} else {
+					child.x = xpos;
+					child.y = childYpos;
+				}
+
+				xpos -= margins.left;
+				adjustRight = xpos;
+			}
+
+			// now adjust the actualChild to fill the space.
+			if (actualChild != null) {
+				margins = childMargins(actualChild, hostWidth, hostHeight);
+				ilc = actualChild as ILayoutChild;
+				childHeight = actualChild.height;
+				if (ilc != null)
+				{
+					if (!isNaN(ilc.percentHeight)) {
+						childHeight = host.height * ilc.percentHeight/100.0;
+					}
+					else if (isNaN(ilc.explicitHeight)) {
+						childHeight = host.height;
+					}
+					ilc.setHeight(childHeight);
+				}
+				childYpos = ypos + margins.top;
+				actualChild.x = adjustLeft + margins.left;
+				actualChild.y = childYpos;
+				if (ilc) {
+					ilc.setWidth((adjustRight-margins.right) - (adjustLeft+margins.left));
+				} else {
+					actualChild.width = (adjustRight-margins.right) - (adjustLeft+margins.left);
+				}
+			}
+
+            return true;
+		}
+
+        public function setDocument(document:Object, id:String = null):void
+        {
+            this.document = document;
+        }
+
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bdd34d2e/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayoutLockChildHeight.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayoutLockChildHeight.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayoutLockChildHeight.as
deleted file mode 100644
index d170d23..0000000
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayoutLockChildHeight.as
+++ /dev/null
@@ -1,91 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.html.beads.layouts
-{
-	import org.apache.flex.core.LayoutBase;
-	import org.apache.flex.core.IDocument;
-	import org.apache.flex.core.ILayoutChild;
-	import org.apache.flex.core.ILayoutHost;
-	import org.apache.flex.core.ILayoutView;
-	import org.apache.flex.core.ILayoutParent;
-	import org.apache.flex.core.IParentIUIBase;
-	import org.apache.flex.core.IStrand;
-	import org.apache.flex.core.IUIBase;
-	import org.apache.flex.core.ValuesManager;
-	import org.apache.flex.core.UIBase;
-	import org.apache.flex.events.Event;
-	import org.apache.flex.geom.Rectangle;
-	import org.apache.flex.utils.CSSContainerUtils;
-	import org.apache.flex.utils.CSSUtils;
-
-    /**
-     *  The OneFlexibleChildHorizontalLayoutLockChildHeight 
-	 *  is a subclass of OneFlexibleChildHorizontalLayout
-	 *  that sets the flexible child's height to be the height
-	 *  of the host container.  This is useful when you
-	 *  don't want the actual child's height to dictate the
-	 *  height of the container in order to force
-	 *  scrollbars
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10.2
-     *  @playerversion AIR 2.6
-     *  @productversion FlexJS 0.0
-     */
-	public class OneFlexibleChildHorizontalLayoutLockChildHeight extends OneFlexibleChildHorizontalLayout
-	{
-        /**
-         *  Constructor.
-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-		public function OneFlexibleChildHorizontalLayoutLockChildHeight()
-		{
-			super();
-		}
-
-        /**
-         * @copy org.apache.flex.core.IBeadLayout#layout
-         */
-		override public function layout():Boolean
-		{
-			var ret:Boolean = super.layout();
-			if (ret)
-			{
-				var contentView:ILayoutView = layoutView;
-	
-				var n:int = contentView.numElements;
-
-				var h:Number = host.height;
-				for(var i:int=0; i < n; i++) {
-					var child:UIBase = contentView.getElementAt(i) as UIBase;
-					if (child != actualChild)
-						h = child.height;
-				}
-				actualChild.setHeight(h); 
-			}
-			return ret;
-		}
-
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bdd34d2e/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayoutForOverflow.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayoutForOverflow.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayoutForOverflow.as
new file mode 100644
index 0000000..5679f80
--- /dev/null
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayoutForOverflow.as
@@ -0,0 +1,291 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.html.beads.layouts
+{
+	import org.apache.flex.core.LayoutBase;
+	import org.apache.flex.core.IDocument;
+	import org.apache.flex.core.ILayoutChild;
+	import org.apache.flex.core.ILayoutHost;
+	import org.apache.flex.core.ILayoutView;
+	import org.apache.flex.core.ILayoutParent;
+	import org.apache.flex.core.IParentIUIBase;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.IStyleableObject;
+	import org.apache.flex.core.IUIBase;
+	import org.apache.flex.core.ValuesManager;
+	import org.apache.flex.core.UIBase;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.geom.Rectangle;
+	import org.apache.flex.utils.CSSContainerUtils;
+	import org.apache.flex.utils.CSSUtils;
+
+    /**
+     *  The OneFlexibleChildVerticalLayoutForOverflow is 
+	 *  intended for building apps that clip
+	 *  and/or scroll the overflow, especially in a 
+	 *  3-pane view like the ASDoc examples.  It does not use
+	 *  FlexBox because FlexBox wants to grow to the size
+	 *  of the content without specifying width/height on
+	 *  the flexible child.  But then the children in
+	 *  the flexible child cannot use % sizing.
+	 *  This layout presumes the parent is a known size.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+	public class OneFlexibleChildVerticalLayoutForOverflow extends LayoutBase implements IOneFlexibleChildLayout, IDocument
+	{
+        /**
+         *  Constructor.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function OneFlexibleChildVerticalLayoutForOverflow()
+		{
+			super();
+		}
+
+        private var _flexibleChild:String;
+
+        protected var actualChild:ILayoutChild;
+
+        /**
+         *  @private
+         *  The document.
+         */
+        private var document:Object;
+
+		/**
+		 *  The id of the flexible child
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function get flexibleChild():String
+		{
+			return _flexibleChild;
+		}
+
+		/**
+		 * @private
+		 */
+		public function set flexibleChild(value:String):void
+		{
+			_flexibleChild = value;
+		}
+
+        /**
+         * @copy org.apache.flex.core.IBeadLayout#layout
+         */
+		COMPILE::JS
+		override public function layout():Boolean
+		{
+			var contentView:ILayoutView = layoutView;
+
+			actualChild = document[flexibleChild];
+
+			var n:int = contentView.numElements;
+			if (n == 0) return false;
+
+			for(var i:int=0; i < n; i++) {
+				var child:UIBase = contentView.getElementAt(i) as UIBase;
+				if (child.element.style["display"] != "flex" && child.element.style["display"] != "none")
+					child.element.style["display"] = "block";
+			}
+
+			var h:Number = host.height;
+			for(i=0; i < n; i++) {
+				child = contentView.getElementAt(i) as UIBase;
+				if (child != actualChild)
+					h -= child.height;
+			}
+			actualChild.height = h;
+					
+			return true;
+		}
+
+		COMPILE::SWF
+		override public function layout():Boolean
+		{
+			var contentView:ILayoutView = layoutView;
+			actualChild = document.hasOwnProperty(flexibleChild) ? document[flexibleChild] : null;
+
+			var n:Number = contentView.numElements;
+			if (n == 0) return false;
+			
+			var maxWidth:Number = 0;
+			var maxHeight:Number = 0;
+			var hostSizedToContent:Boolean = host.isWidthSizedToContent();
+			var hostWidth:Number = host.width;
+			var hostHeight:Number = host.height;
+
+			var ilc:ILayoutChild;
+			var data:Object;
+			var canAdjust:Boolean = false;
+			var margins:Object;
+
+			var paddingMetrics:Rectangle = CSSContainerUtils.getPaddingMetrics(host);
+			var borderMetrics:Rectangle = CSSContainerUtils.getBorderMetrics(host);
+			
+			// adjust the host's usable size by the metrics. If hostSizedToContent, then the
+			// resulting adjusted value may be less than zero.
+			hostWidth -= paddingMetrics.left + paddingMetrics.right + borderMetrics.left + borderMetrics.right;
+			hostHeight -= paddingMetrics.top + paddingMetrics.bottom + borderMetrics.top + borderMetrics.bottom;
+
+			var xpos:Number = borderMetrics.left + paddingMetrics.left;
+			var ypos:Number = borderMetrics.top + paddingMetrics.left;
+			var child:IUIBase;
+			var childWidth:Number;
+			var i:int;
+			var childXpos:Number;
+			var adjustTop:Number = 0;
+			var adjustBottom:Number = hostHeight + borderMetrics.top + paddingMetrics.top;
+
+			// first work from top to bottom
+			for(i=0; i < n; i++)
+			{
+				child = contentView.getElementAt(i) as IUIBase;
+				if (child == null || !child.visible) continue;
+				if (child == actualChild) break;
+
+				margins = childMargins(child, hostWidth, hostHeight);
+				ilc = child as ILayoutChild;
+
+				ypos += margins.top;
+
+				childXpos = xpos + margins.left; // default x position
+
+				childWidth = child.width;
+				if (ilc != null)
+				{
+					if (!isNaN(ilc.percentWidth)) {
+						childWidth = hostWidth * ilc.percentWidth/100.0;
+					}
+					else if (isNaN(ilc.explicitWidth)) {
+						childWidth = hostWidth;
+					}
+					ilc.setWidth(childWidth);
+				}
+
+				if (ilc) {
+					ilc.setX(childXpos);
+					ilc.setY(ypos);
+
+					if (!isNaN(ilc.percentHeight)) {
+						ilc.setHeight(hostHeight * ilc.percentHeight / 100);
+					}
+
+				} else {
+					child.x = childXpos;
+					child.y = ypos;
+				}
+
+				ypos += child.height + margins.bottom;
+				adjustTop = ypos;
+			}
+
+			// then work from bottom to top
+			ypos = hostHeight + borderMetrics.top + paddingMetrics.top;
+
+			for(i=(n-1); actualChild != null && i >= 0; i--)
+			{
+				child = contentView.getElementAt(i) as IUIBase;
+				if (child == null || !child.visible) continue;
+				if (child == actualChild) break;
+
+				margins = childMargins(child, hostWidth, hostHeight);
+				ilc = child as ILayoutChild;
+
+				childXpos = xpos + margins.left; // default x position
+
+				childWidth = child.width;
+				if (ilc != null)
+				{
+					if (!isNaN(ilc.percentWidth)) {
+						childWidth = hostWidth * ilc.percentWidth/100.0;
+					}
+					else if (isNaN(ilc.explicitWidth)) {
+						childWidth = hostWidth;
+					}
+					ilc.setWidth(childWidth);
+				}
+
+				if (ilc) {
+					if (!isNaN(ilc.percentHeight)) {
+						ilc.setHeight(hostHeight * ilc.percentHeight / 100);
+					}
+				}
+
+				ypos -= child.height + margins.bottom;
+
+				if (ilc) {
+					ilc.setX(childXpos);
+					ilc.setY(ypos);
+				} else {
+					child.x = childXpos;
+					child.y = ypos;
+				}
+
+				ypos -= margins.top;
+				adjustBottom = ypos;
+			}
+
+			// now adjust the actualChild to fill the space.
+			if (actualChild != null) {
+				margins = childMargins(actualChild, hostWidth, hostHeight);
+				ilc = actualChild as ILayoutChild;
+				childWidth = actualChild.width;
+				if (ilc != null)
+				{
+					if (!isNaN(ilc.percentWidth)) {
+						childWidth = hostWidth * ilc.percentWidth/100.0;
+					}
+					else if (isNaN(ilc.explicitWidth)) {
+						childWidth = hostWidth;
+					}
+					ilc.setWidth(childWidth);
+				}
+				childXpos = xpos + margins.left;
+					
+				actualChild.x = childXpos
+				actualChild.y = adjustTop + margins.top;
+				if (ilc) {
+					ilc.setHeight((adjustBottom-margins.bottom) - (adjustTop+margins.top));
+				} else {
+					actualChild.height = (adjustBottom-margins.bottom) - (adjustTop+margins.top);
+				}
+			}
+
+			return true;
+		}
+
+        public function setDocument(document:Object, id:String = null):void
+        {
+            this.document = document;
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bdd34d2e/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayoutLockChildWidth.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayoutLockChildWidth.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayoutLockChildWidth.as
deleted file mode 100644
index 7415299..0000000
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayoutLockChildWidth.as
+++ /dev/null
@@ -1,93 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.html.beads.layouts
-{
-	import org.apache.flex.core.LayoutBase;
-	import org.apache.flex.core.IDocument;
-	import org.apache.flex.core.ILayoutChild;
-	import org.apache.flex.core.ILayoutHost;
-	import org.apache.flex.core.ILayoutView;
-	import org.apache.flex.core.ILayoutParent;
-	import org.apache.flex.core.IParentIUIBase;
-	import org.apache.flex.core.IStrand;
-	import org.apache.flex.core.IStyleableObject;
-	import org.apache.flex.core.IUIBase;
-	import org.apache.flex.core.ValuesManager;
-	import org.apache.flex.core.UIBase;
-	import org.apache.flex.events.Event;
-	import org.apache.flex.geom.Rectangle;
-	import org.apache.flex.utils.CSSContainerUtils;
-	import org.apache.flex.utils.CSSUtils;
-
-    /**
-     *  The OneFlexibleChildHorizontalLayoutLockChildHeight 
-	 *  is a subclass of OneFlexibleChildHorizontalLayout
-	 *  that sets the flexible child's height to be the height
-	 *  of the host container.  This is useful when you
-	 *  don't want the actual child's height to dictate the
-	 *  height of the container in order to force
-	 *  scrollbars or line wrapping.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10.2
-     *  @playerversion AIR 2.6
-     *  @productversion FlexJS 0.0
-     */
-	public class OneFlexibleChildVerticalLayoutLockChildWidth extends OneFlexibleChildVerticalLayout
-	{
-        /**
-         *  Constructor.
-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-		public function OneFlexibleChildVerticalLayoutLockChildWidth()
-		{
-			super();
-		}
-
-        /**
-         * @copy org.apache.flex.core.IBeadLayout#layout
-         */
-		override public function layout():Boolean
-		{
-			var ret:Boolean = super.layout();
-			if (ret)
-			{
-				var contentView:ILayoutView = layoutView;
-	
-				var n:int = contentView.numElements;
-
-				var w:Number = host.width;
-				for(var i:int=0; i < n; i++) {
-					var child:UIBase = contentView.getElementAt(i) as UIBase;
-					if (child != actualChild)
-						w = child.width;
-				}
-				
-				actualChild.setWidth(w); 
-			}
-			return ret;
-		}
-
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bdd34d2e/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/resources/basic-manifest.xml b/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
index 7cbc05d..09bb1a3 100644
--- a/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
+++ b/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
@@ -150,8 +150,8 @@
     <component id="FlexibleFirstChildHorizontalLayout" class="org.apache.flex.html.beads.layouts.FlexibleFirstChildHorizontalLayout"/>
     <component id="OneFlexibleChildVerticalLayout" class="org.apache.flex.html.beads.layouts.OneFlexibleChildVerticalLayout"/>
     <component id="OneFlexibleChildHorizontalLayout" class="org.apache.flex.html.beads.layouts.OneFlexibleChildHorizontalLayout"/>
-    <component id="OneFlexibleChildVerticalLayoutLockChildWidth" class="org.apache.flex.html.beads.layouts.OneFlexibleChildVerticalLayoutLockChildWidth"/>
-    <component id="OneFlexibleChildHorizontalLayoutLockChildHeight" class="org.apache.flex.html.beads.layouts.OneFlexibleChildHorizontalLayoutLockChildHeight"/>
+    <component id="OneFlexibleChildVerticalLayoutForOverflow" class="org.apache.flex.html.beads.layouts.OneFlexibleChildVerticalLayoutForOverflow"/>
+    <component id="OneFlexibleChildHorizontalLayoutForOverflow" class="org.apache.flex.html.beads.layouts.OneFlexibleChildHorizontalLayoutForOverflow"/>
     <component id="MXMLBeadView" class="org.apache.flex.html.MXMLBeadView"/>
 
     <component id="SubAppLoader" class="org.apache.flex.html.SubAppLoader" />


[02/13] git commit: [flex-asjs] [refs/heads/release0.8.0] - force childResizeHandlers to run in parent if our size changes during layout

Posted by ah...@apache.org.
force childResizeHandlers to run in parent if our size changes during layout


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

Branch: refs/heads/release0.8.0
Commit: 4713ffd4728fca1feec86368033e9a0cee33780e
Parents: 0cbb478
Author: Alex Harui <ah...@apache.org>
Authored: Sun May 21 23:24:12 2017 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue May 23 00:15:55 2017 -0700

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


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4713ffd4/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 dd0cdee..5241bed 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
@@ -283,6 +283,9 @@ package org.apache.flex.core
 			if (isLayoutRunning) return;
 			
 			isLayoutRunning = true;
+
+			var oldWidth:Number = host.width;
+			var oldHeight:Number = host.height;
 			
 			var viewBead:ILayoutHost = (host as ILayoutParent).getLayoutHost();
 			
@@ -295,6 +298,13 @@ package org.apache.flex.core
 			isLayoutRunning = false;
 			
 			IEventDispatcher(host).dispatchEvent(new Event("layoutComplete"));
+			
+			// check sizes to see if layout changed the size or not
+			// and send an event to re-layout parent of host
+			if (host.width != oldWidth ||
+			    host.height != oldHeight)
+				host.dispatchEvent(new Event("sizeChanged"));
+
 		}
 
         /**


[04/13] git commit: [flex-asjs] [refs/heads/release0.8.0] - make selectedIndex and selectedItem bindable

Posted by ah...@apache.org.
make selectedIndex and selectedItem bindable


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

Branch: refs/heads/release0.8.0
Commit: 9a319b263fbc0e5baa83119eda84bd5876e61d18
Parents: 4713ffd
Author: Alex Harui <ah...@apache.org>
Authored: Sun May 21 23:25:57 2017 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue May 23 00:15:55 2017 -0700

----------------------------------------------------------------------
 .../projects/Basic/src/main/flex/org/apache/flex/html/List.as      | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9a319b26/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/List.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/List.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/List.as
index fb2481f..2daf3b1 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/List.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/List.as
@@ -88,6 +88,7 @@ package org.apache.flex.html
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
+		[Bindable("change")]
         public function get selectedIndex():int
 		{
 			return ISelectionModel(model).selectedIndex;
@@ -140,6 +141,7 @@ package org.apache.flex.html
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
+		[Bindable("change")]
 		public function get selectedItem():Object
 		{
 			return ISelectionModel(model).selectedItem;


[03/13] git commit: [flex-asjs] [refs/heads/release0.8.0] - I think you have to use Flex layouts within other Flex layouts otherwise percentage sizing won't work since the flex'd parent may not have an 'known' size.

Posted by ah...@apache.org.
I think you have to use Flex layouts within other Flex layouts otherwise percentage sizing won't work since the flex'd parent may not have an 'known' size.


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

Branch: refs/heads/release0.8.0
Commit: 0cbb478e6ed4acf78eb13659f2e6ac6f0cfc66d9
Parents: 85b9754
Author: Alex Harui <ah...@apache.org>
Authored: Sun May 21 23:21:18 2017 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue May 23 00:15:55 2017 -0700

----------------------------------------------------------------------
 examples/flexjs/ASDoc/src/main/flex/DetailRenderer.mxml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0cbb478e/examples/flexjs/ASDoc/src/main/flex/DetailRenderer.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/ASDoc/src/main/flex/DetailRenderer.mxml b/examples/flexjs/ASDoc/src/main/flex/DetailRenderer.mxml
index ca7b296..b7b92d3 100644
--- a/examples/flexjs/ASDoc/src/main/flex/DetailRenderer.mxml
+++ b/examples/flexjs/ASDoc/src/main/flex/DetailRenderer.mxml
@@ -34,7 +34,7 @@ limitations under the License.
     <fx:Style>
     </fx:Style>
     <js:beads>
-        <js:VerticalLayout />
+        <js:VerticalFlexLayout />
         <js:ItemRendererDataBinding />
     </js:beads>
     <js:Label width="100%" height="30" style="fontWeight:bold" text="{obj.qname}" >


[12/13] git commit: [flex-asjs] [refs/heads/release0.8.0] - block infinite layout loops when notifying parent your size has changed

Posted by ah...@apache.org.
block infinite layout loops when notifying parent your size has changed


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

Branch: refs/heads/release0.8.0
Commit: 43bbbdb971144d739090867447c39dbe4c385bc7
Parents: bdd34d2
Author: Alex Harui <ah...@apache.org>
Authored: Tue May 23 00:10:56 2017 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue May 23 00:15:57 2017 -0700

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


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/43bbbdb9/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 5241bed..859add9 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
@@ -303,7 +303,11 @@ package org.apache.flex.core
 			// and send an event to re-layout parent of host
 			if (host.width != oldWidth ||
 			    host.height != oldHeight)
+			{
+				isLayoutRunning = true;
 				host.dispatchEvent(new Event("sizeChanged"));
+				isLayoutRunning = false;
+			}
 
 		}