Hmm.  In my mind, TileLayout is different from flex-box.  For a display of
a month of a calendar, with fixed sizes on the day labels, if I set the
width of the container to be something really wide, if I have set
numColumns=7, I would expect that there would be 7 days displayed with
lots of whitespace somewhere to fill out the remaining width.  Won't
flex-box start putting more days on each week's row?

-Alex

On 12/7/16, 1:00 PM, "[email protected]" <[email protected]> wrote:

>Repository: flex-asjs
>Updated Branches:
>  refs/heads/develop 327ced48a -> 10e1773d6
>
>
>Fix for bug FLEX-35201: TileLayout not working. Fixed the JS side by
>having it use flex-box display.
>
>
>Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
>Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/10e1773d
>Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/10e1773d
>Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/10e1773d
>
>Branch: refs/heads/develop
>Commit: 10e1773d6b63d968063f6f0db01dd56ba8ec2054
>Parents: 327ced4
>Author: Peter Ent <[email protected]>
>Authored: Wed Dec 7 15:59:57 2016 -0500
>Committer: Peter Ent <[email protected]>
>Committed: Wed Dec 7 15:59:57 2016 -0500
>
>----------------------------------------------------------------------
> .../org/apache/flex/html/beads/layouts/TileLayout.as     | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>----------------------------------------------------------------------
>
>
>http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/10e1773d/frameworks/
>projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/TileLayout.
>as
>----------------------------------------------------------------------
>diff --git 
>a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layout
>s/TileLayout.as 
>b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layout
>s/TileLayout.as
>index ff869b4..77e752c 100644
>--- 
>a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layout
>s/TileLayout.as
>+++ 
>b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layout
>s/TileLayout.as
>@@ -24,6 +24,7 @@ package org.apache.flex.html.beads.layouts
>       import org.apache.flex.core.IParentIUIBase;
>       import org.apache.flex.core.IStrand;
>       import org.apache.flex.core.IUIBase;
>+      import org.apache.flex.core.IChild;
>       import org.apache.flex.core.UIBase;
>       import org.apache.flex.events.Event;
>       import org.apache.flex.events.IEventDispatcher;
>@@ -150,14 +151,15 @@ package org.apache.flex.html.beads.layouts
>                               for(var j:int=0; j < n; j++)
>                               {
>                                       var testChild:IUIBase = 
> area.getElementAt(i) as IUIBase;
>-                                      if (testChild || !testChild.visible) 
>realN--;
>+                                      if (testChild == null || 
>!testChild.visible) realN--;
>                               }
> 
>                               if (isNaN(useWidth)) useWidth = 
> Math.floor(host.width / numColumns);
>// + gap
>                               if (isNaN(useHeight)) {
>                                       // given the width and total number of 
> items, how many rows?
>                                       var numRows:Number = 
> Math.floor(realN/numColumns);
>-                                      useHeight = Math.floor(host.height / 
>numRows);
>+                                      if (host.isHeightSizedToContent) 
>useHeight = 30; // default height
>+                                      else useHeight = Math.floor(host.height 
>/ numRows);
>                               }
> 
>                               var maxWidth:Number = useWidth;
>@@ -214,6 +216,8 @@ package org.apache.flex.html.beads.layouts
>                               if (n === 0) return false;
> 
>                               viewBead.contentView.width = host.width;
>+                              viewBead.contentView.element.style["display"] = 
>"flex";
>+                              viewBead.contentView.element.style["flex-flow"] 
>= "row wrap";
> 
>                               var realN:int = n;
>                               for (i = 0; i < n; i++)
>@@ -231,7 +235,8 @@ package org.apache.flex.html.beads.layouts
>                               if (isNaN(useHeight)) {
>                                       // given the width and total number of 
> items, how many rows?
>                                       var numRows:Number = Math.floor(realN / 
> numColumns);
>-                                      useHeight = Math.floor(host.height / 
>numRows);
>+                                      if (host.isHeightSizedToContent) 
>useHeight = 30; // default height
>+                                      else useHeight = Math.floor(host.height 
>/ numRows);
>                               }
> 
>                               for (i = 0; i < n; i++)
>

Reply via email to