flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bigosma...@apache.org
Subject git commit: [flex-sdk] [refs/heads/develop] - Fix for https://issues.apache.org/jira/browse/FLEX-34391 Ensure that StageText's viewport x/y values stay within the range 0 to stage.stageWidth or stage.stageHeight
Date Mon, 29 Feb 2016 21:16:12 GMT
Repository: flex-sdk
Updated Branches:
  refs/heads/develop 1a15b4a51 -> f14dc1431


Fix for https://issues.apache.org/jira/browse/FLEX-34391
Ensure that StageText's viewport x/y values stay within the range 0 to stage.stageWidth or
stage.stageHeight


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

Branch: refs/heads/develop
Commit: f14dc1431c1914a5e1fef6c77b67b23b9c41a7fd
Parents: 1a15b4a
Author: OmPrakash Muppirala <bigosmallm@gmail.com>
Authored: Mon Feb 29 13:15:08 2016 -0800
Committer: OmPrakash Muppirala <bigosmallm@gmail.com>
Committed: Mon Feb 29 13:15:08 2016 -0800

----------------------------------------------------------------------
 .../supportClasses/ScrollableStageText.as       | 22 ++++++++++++++++++++
 1 file changed, 22 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f14dc143/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ScrollableStageText.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ScrollableStageText.as
b/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ScrollableStageText.as
index de6cff1..18006ac 100644
--- a/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ScrollableStageText.as
+++ b/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ScrollableStageText.as
@@ -1628,6 +1628,28 @@ public class ScrollableStageText extends UIComponent  implements IStyleableEdita
         globalRect.y = Math.floor(Math.min(globalTopLeft.y, globalBottomRight.y));
         globalRect.width = Math.ceil(Math.abs(globalBottomRight.x - globalTopLeft.x));
         globalRect.height = Math.ceil(Math.abs(globalBottomRight.y - globalTopLeft.y));
+		
+		//StageText ViewPort's x and y should be in between -8192 and 8191
+		//Reset x to min of x and stage.stageWidth
+		if(globalRect.x > 0)
+		{
+			globalRect.x = Math.min(globalRect.x, stage.stageWidth);	
+		}
+		else
+		{
+			globalRect.x = Math.max(globalRect.x, 0);
+		}
+		
+		//Reset y to min of y and stage.stageHeight
+		if(globalRect.y > 0)
+		{
+			globalRect.y = Math.min(globalRect.y, stage.stageHeight);	
+		}
+		else
+		{
+			globalRect.y = Math.max(globalRect.y, 0);
+		}
+		
 
         return globalRect;
     }


Mime
View raw message