don't scroll apps by default and let them take natural size if not specified 
otherwise


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/51f8ce2e
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/51f8ce2e
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/51f8ce2e

Branch: refs/heads/develop
Commit: 51f8ce2e3a48b865221819534a6da826f726d6d9
Parents: 4df2c71
Author: Alex Harui <[email protected]>
Authored: Thu Sep 3 11:45:29 2015 -0700
Committer: Alex Harui <[email protected]>
Committed: Thu Sep 3 11:46:42 2015 -0700

----------------------------------------------------------------------
 .../Core/as/src/org/apache/flex/core/Application.as     | 12 +++++++-----
 .../Core/js/src/org/apache/flex/core/Application.js     |  1 +
 2 files changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/51f8ce2e/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 3e4821e..d4ba73a 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
@@ -182,17 +182,19 @@ package org.apache.flex.core
             if (initialView)
             {
                 initialView.applicationModel =  model;
-                if (isNaN(initialView.explicitWidth))
-                    initialView.width = stage.stageWidth;
-                if (isNaN(initialView.explicitHeight))
-                    initialView.height = stage.stageHeight;
+                if (!isNaN(initialView.percentWidth) && 
!isNaN(initialView.percentHeight))
+                    initialView.setWidthAndHeight(stage.stageWidth, 
stage.stageHeight);
+                else if (!isNaN(initialView.percentWidth))
+                    initialView.setWidth(stage.stageWidth);
+                else if (!isNaN(initialView.percentHeight))
+                    initialView.setHeight(stage.stageHeight);
                    this.addElement(initialView);
                 var bgColor:Object = ValuesManager.valuesImpl.getValue(this, 
"background-color");
                 if (bgColor != null)
                 {
                     var backgroundColor:uint = 
ValuesManager.valuesImpl.convertColor(bgColor);
                     graphics.beginFill(backgroundColor);
-                    graphics.drawRect(0, 0, stage.stageWidth, 
stage.stageHeight);
+                    graphics.drawRect(0, 0, initialView.width, 
initialView.height);
                     graphics.endFill();
                 }
                 dispatchEvent(new org.apache.flex.events.Event("viewChanged"));

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/51f8ce2e/frameworks/projects/Core/js/src/org/apache/flex/core/Application.js
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Core/js/src/org/apache/flex/core/Application.js 
b/frameworks/projects/Core/js/src/org/apache/flex/core/Application.js
index ccb618b..e9b2a3e 100644
--- a/frameworks/projects/Core/js/src/org/apache/flex/core/Application.js
+++ b/frameworks/projects/Core/js/src/org/apache/flex/core/Application.js
@@ -72,6 +72,7 @@ org.apache.flex.core.Application.prototype.start = function() 
{
   this.element = document.getElementsByTagName('body')[0];
   this.element.flexjs_wrapper = this;
   this.element.className = 'Application';
+  this.element.style.overflow = 'hidden';
 
   org.apache.flex.utils.MXMLDataInterpreter.generateMXMLInstances(this, null, 
this.MXMLDescriptor);
 

Reply via email to