in the browser, %width is applied even if parent is sizedToContent, so make SWF do the samething
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/925a08d3 Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/925a08d3 Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/925a08d3 Branch: refs/heads/develop Commit: 925a08d3b3aa84a07ca3d29dde9f429233c3e9fb Parents: 9ae73e0 Author: Alex Harui <[email protected]> Authored: Mon Apr 24 10:47:31 2017 -0700 Committer: Alex Harui <[email protected]> Committed: Mon Apr 24 10:47:31 2017 -0700 ---------------------------------------------------------------------- .../apache/flex/html/beads/layouts/VerticalFlexLayout.as | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/925a08d3/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 c543425..bdc080d 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 @@ -159,11 +159,11 @@ package org.apache.flex.html.beads.layouts } var useWidth:Number = -1; - if (!hostWidthSizedToContent) { - if (ilc) { - if (!isNaN(ilc.percentWidth)) useWidth = hostWidth * (ilc.percentWidth/100.0); - else if (!isNaN(ilc.explicitWidth)) useWidth = ilc.explicitWidth; - else useWidth = hostWidth; + if (ilc) { + if (!isNaN(ilc.percentWidth)) useWidth = hostWidth * (ilc.percentWidth/100.0); + else if (!isNaN(ilc.explicitWidth)) useWidth = ilc.explicitWidth; + else if (!hostWidthSizedToContent) { + useWidth = hostWidth; } }
