no need for inner container in this layout model. Especially if container is sized to parent since then it will never 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/2c93a944 Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/2c93a944 Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/2c93a944 Branch: refs/heads/develop Commit: 2c93a9442a9f7f9209e12ff40da13c9dec8b9fa9 Parents: 122055f Author: Alex Harui <aha...@apache.org> Authored: Tue Aug 4 13:53:42 2015 -0700 Committer: Alex Harui <aha...@apache.org> Committed: Tue Aug 4 13:54:17 2015 -0700 ---------------------------------------------------------------------- .../src/productsView/ProductCatalogPanel.mxml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2c93a944/examples/FlexJSStore/src/productsView/ProductCatalogPanel.mxml ---------------------------------------------------------------------- diff --git a/examples/FlexJSStore/src/productsView/ProductCatalogPanel.mxml b/examples/FlexJSStore/src/productsView/ProductCatalogPanel.mxml index e085222..e34c5cc 100755 --- a/examples/FlexJSStore/src/productsView/ProductCatalogPanel.mxml +++ b/examples/FlexJSStore/src/productsView/ProductCatalogPanel.mxml @@ -89,7 +89,7 @@ limitations under the License. { for (i=0; i < thumbnails.length; i++) { - thumbContent.removeElement(thumbnails[i]); + thumbContentGroup.removeElement(thumbnails[i]); } } @@ -108,7 +108,7 @@ limitations under the License. // thumbnails[i].showInAutomationHierarchy = true; thumb.product = catalog.getItemAt(i) as Product; accepted[thumb.product.productId.toString()] = true; - thumbContent.addElement(thumb); + thumbContentGroup.addElement(thumb); thumb.addEventListener(ProductThumbEvent.PURCHASE, productThumbEventHandler); thumb.addEventListener(ProductThumbEvent.COMPARE, productThumbEventHandler); thumb.addEventListener(ProductThumbEvent.DETAILS, productThumbEventHandler); @@ -350,7 +350,7 @@ limitations under the License. var row:int = -1; //should be computed using border metrics instead of hard-coding the 20, but... - var xTo:Number = thumbContent.width - ProductCatalogThumbnail.COL_WIDTH_4 - 20; + var xTo:Number = thumbContentGroup.width - ProductCatalogThumbnail.COL_WIDTH_4 - 20; var yTo:Number; var move:Move; @@ -404,10 +404,10 @@ limitations under the License. { scv.model.verticalScrollPosition = y; } - else if (selectedThumb.y + ProductCatalogThumbnail.COL_HEIGHT_4 > curpos + thumbContent.height) + else if (selectedThumb.y + ProductCatalogThumbnail.COL_HEIGHT_4 > curpos + thumbContentGroup.height) { //this logic doesn't seem to be perfect but it will do - var diff:int = selectedThumb.y - (curpos + thumbContent.height) + var diff:int = selectedThumb.y - (curpos + thumbContentGroup.height) scv.model.verticalScrollPosition += diff + ProductCatalogThumbnail.COL_HEIGHT_4 + ProductCatalogThumbnail.VERTICAL_GAP; } }); @@ -525,7 +525,6 @@ limitations under the License. <js:beads> <js:ScrollingViewport id="scv" /> </js:beads> - <js:Container id="thumbContent" width="100%" height="100%" /> </js:Container> <productsView:ProductDetails id="details" y="0" width="{ProductCatalogThumbnail.COL_WIDTH_4 * 3}"