You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by yi...@apache.org on 2016/09/08 07:18:58 UTC
git commit: [flex-asjs] [refs/heads/refactor-sprite] - Make sure NaN
doesn't mess up resizing.
Repository: flex-asjs
Updated Branches:
refs/heads/refactor-sprite 61d58b8b9 -> 006b9ba5f
Make sure NaN doesn't mess up resizing.
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/006b9ba5
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/006b9ba5
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/006b9ba5
Branch: refs/heads/refactor-sprite
Commit: 006b9ba5fbbadda4114a66ed89e47f8e0ff89a93
Parents: 61d58b8
Author: yishayw <yi...@hotmail.com>
Authored: Thu Sep 8 10:18:34 2016 +0300
Committer: yishayw <yi...@hotmail.com>
Committed: Thu Sep 8 10:18:34 2016 +0300
----------------------------------------------------------------------
.../main/flex/org/apache/flex/core/BrowserResizeListener.as | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/006b9ba5/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BrowserResizeListener.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BrowserResizeListener.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BrowserResizeListener.as
index 28adf54..791fabe 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BrowserResizeListener.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BrowserResizeListener.as
@@ -114,13 +114,14 @@ COMPILE::SWF
COMPILE::SWF
{
var initialView:UIBase = app.initialView as UIBase;
+ var constrainedWidth:Number = Math.max(isNaN(minWidth) ? 0 : minWidth, app.$displayObject.stage.stageWidth);
+ var constrainedHeight:Number = Math.max(isNaN(minHeight) ? 0 : minHeight, app.$displayObject.stage.stageHeight);
if (!isNaN(initialView.percentWidth) && !isNaN(initialView.percentHeight))
- initialView.setWidthAndHeight(Math.max(minWidth, app.$displayObject.stage.stageWidth),
- Math.max(minHeight, app.$displayObject.stage.stageHeight), true);
+ initialView.setWidthAndHeight(constrainedWidth, constrainedHeight, true);
else if (!isNaN(initialView.percentWidth))
- initialView.setWidth(Math.max(minWidth, app.$displayObject.stage.stageWidth));
+ initialView.setWidth(constrainedWidth);
else if (!isNaN(initialView.percentHeight))
- initialView.setHeight(Math.max(minHeight, app.$displayObject.stage.stageHeight));
+ initialView.setHeight(constrainedHeight);
}
COMPILE::JS
{