flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ha...@apache.org
Subject git commit: [flex-asjs] [refs/heads/refactor-sprite] - Made DeviceSizeBEad work with refactor-sprite
Date Wed, 26 Oct 2016 13:49:10 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/refactor-sprite f24c9e683 -> 2e3fc30db


Made DeviceSizeBEad work with refactor-sprite


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

Branch: refs/heads/refactor-sprite
Commit: 2e3fc30db1f1606200b6769563714c3c76ae5e49
Parents: f24c9e6
Author: Harbs <harbs@in-tools.com>
Authored: Wed Oct 26 16:49:04 2016 +0300
Committer: Harbs <harbs@in-tools.com>
Committed: Wed Oct 26 16:49:04 2016 +0300

----------------------------------------------------------------------
 .../org/apache/flex/mobile/beads/DeviceSizeBead.as  | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2e3fc30d/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/DeviceSizeBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/DeviceSizeBead.as
b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/DeviceSizeBead.as
index eb004d0..56934bc 100644
--- a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/DeviceSizeBead.as
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/DeviceSizeBead.as
@@ -30,7 +30,8 @@ package org.apache.flex.mobile.beads
 	{
 		import flash.events.Event;
 		import flash.external.ExternalInterface;
-		import flash.utils.getQualifiedClassName;        
+		import flash.utils.getQualifiedClassName;
+		import flash.display.Stage;
 	}
 	
 	/**
@@ -58,6 +59,10 @@ package org.apache.flex.mobile.beads
 		
 		private var _app:Application;
 		
+		COMPILE::SWF
+		{
+			private var stage:Stage;
+		}
 		/**
 		 * @private
 		 */
@@ -67,7 +72,8 @@ package org.apache.flex.mobile.beads
 			
 			COMPILE::SWF
 			{
-				_app.stage.addEventListener("resize", onResize);     
+				stage = _app.$displayObject.stage;
+				stage.addEventListener("resize", onResize);     
 				onResize(null);
 			}
 			
@@ -95,11 +101,11 @@ package org.apache.flex.mobile.beads
 		{
 			var initialView:UIBase = _app.initialView as UIBase;
 			if (!isNaN(initialView.percentWidth) && !isNaN(initialView.percentHeight))
-				initialView.setWidthAndHeight(_app.stage.stageWidth, _app.stage.stageHeight);
+				initialView.setWidthAndHeight(stage.stageWidth, stage.stageHeight);
 			else if (!isNaN(initialView.percentWidth))
-				initialView.setWidth(_app.stage.stageWidth);
+				initialView.setWidth(stage.stageWidth);
 			else if (!isNaN(initialView.percentHeight))
-				initialView.setHeight(_app.stage.stageHeight);
+				initialView.setHeight(stage.stageHeight);
 		}
 	}
 }


Mime
View raw message