You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by pe...@apache.org on 2015/12/18 20:42:23 UTC
git commit: [flex-asjs] [refs/heads/develop] - Rather than use AS3
code, replace with original JS code that got lost in the back-port.
Repository: flex-asjs
Updated Branches:
refs/heads/develop b4e6ab687 -> 534a6900b
Rather than use AS3 code, replace with original JS code that got lost in the back-port.
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/534a6900
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/534a6900
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/534a6900
Branch: refs/heads/develop
Commit: 534a6900bcabce029b153a558cc09b59000de166
Parents: b4e6ab6
Author: Peter Ent <pe...@apache.org>
Authored: Fri Dec 18 14:42:21 2015 -0500
Committer: Peter Ent <pe...@apache.org>
Committed: Fri Dec 18 14:42:21 2015 -0500
----------------------------------------------------------------------
.../as/src/org/apache/flex/core/Application.as | 22 ++++++--------------
1 file changed, 6 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/534a6900/frameworks/projects/Core/as/src/org/apache/flex/core/Application.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/Application.as b/frameworks/projects/Core/as/src/org/apache/flex/core/Application.as
index a5f299b..ac80b8c 100644
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/Application.as
+++ b/frameworks/projects/Core/as/src/org/apache/flex/core/Application.as
@@ -586,22 +586,12 @@ package org.apache.flex.core
if (initialView)
{
- initialView.applicationModel = model;
- // if someone has installed a resize listener, fake an event to run it now
- if (initialView is ILayoutChild)
- {
- var ilc:ILayoutChild = initialView as ILayoutChild;
- var useWidth:Number = document.width;
- var useHeight:Number = document.height;
- // otherwise, size once like this
- if (!isNaN(ilc.percentWidth) && !isNaN(ilc.percentHeight)) {
- ilc.setWidthAndHeight(useWidth, useHeight);
- }
- else if (!isNaN(ilc.percentWidth))
- ilc.setWidth(useWidth);
- else if (!isNaN(ilc.percentHeight))
- ilc.setHeight(useHeight);
- }
+ var baseView:UIBase = initialView as UIBase;
+ if (!isNaN(baseView.percentWidth) || !isNaN(baseView.percentHeight)) {
+ this.element.style.height = window.innerHeight.toString() + 'px';
+ this.element.style.width = window.innerWidth.toString() + 'px';
+ this.initialView.dispatchEvent('sizeChanged'); // kick off layout if % sizes
+ }
dispatchEvent(new org.apache.flex.events.Event("viewChanged"));
}