This is an automated email from the ASF dual-hosted git repository. aharui pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
commit a3757b0fce8aaad8012e0c2f9dab59e1ad32719f Author: Alex Harui <aha...@apache.org> AuthorDate: Thu Dec 6 21:31:37 2018 -0800 more size to content handling --- .../src/main/royale/spark/layouts/supportClasses/LayoutBase.as | 9 ++++++++- .../main/royale/spark/layouts/supportClasses/SparkLayoutBead.as | 8 +++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/layouts/supportClasses/LayoutBase.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/layouts/supportClasses/LayoutBase.as index 5b88d81..7151e34 100644 --- a/frameworks/projects/SparkRoyale/src/main/royale/spark/layouts/supportClasses/LayoutBase.as +++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/layouts/supportClasses/LayoutBase.as @@ -2155,7 +2155,14 @@ public class LayoutBase extends org.apache.royale.core.LayoutBase implements IEv if (n == 0) return false; - updateDisplayList(target.width, target.height); + var w:Number = target.width; + var h:Number = target.height; + if (target.isHeightSizedToContent()) + h = target.measuredHeight; + if (target.isWidthSizedToContent()) + w = target.measuredWidth; + + updateDisplayList(w, h); // update the target's actual size if needed. if (target.isWidthSizedToContent() && target.isHeightSizedToContent()) { diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/layouts/supportClasses/SparkLayoutBead.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/layouts/supportClasses/SparkLayoutBead.as index b74d2ae..4f05fff 100644 --- a/frameworks/projects/SparkRoyale/src/main/royale/spark/layouts/supportClasses/SparkLayoutBead.as +++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/layouts/supportClasses/SparkLayoutBead.as @@ -76,7 +76,13 @@ public class SparkLayoutBead extends org.apache.royale.core.LayoutBase if (n == 0) return false; - target.layout.updateDisplayList(target.width, target.height); + var w:Number = target.width; + var h:Number = target.height; + if (target.isHeightSizedToContent()) + h = target.measuredHeight; + if (target.isWidthSizedToContent()) + w = target.measuredWidth; + target.layout.updateDisplayList(w, h); // update the target's actual size if needed. if (target.isWidthSizedToContent() && target.isHeightSizedToContent()) {