flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject git commit: [flex-asjs] [refs/heads/develop] - Rather than use AS3 code, replace with original JS code that got lost in the back-port.
Date Fri, 18 Dec 2015 19:42:23 GMT
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 <pent@apache.org>
Authored: Fri Dec 18 14:42:21 2015 -0500
Committer: Peter Ent <pent@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"));
             }


Mime
View raw message