flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcl...@apache.org
Subject [1/2] git commit: [flex-sdk] [refs/heads/develop] - FLEX-32599 Stop RTE when scrolled horizontally + cleaned up spacing/reaability
Date Sun, 28 Jul 2013 23:28:40 GMT
Updated Branches:
  refs/heads/develop 3269a20dd -> 3023d3767


FLEX-32599 Stop RTE when scrolled horizontally + cleaned up spacing/reaability


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

Branch: refs/heads/develop
Commit: f513e0c9f8e19022cba360fcb08fd1d3f426277c
Parents: 97bedf7
Author: Justin Mclean <jmclean@apache.org>
Authored: Sun Jul 28 14:27:37 2013 +1000
Committer: Justin Mclean <jmclean@apache.org>
Committed: Sun Jul 28 14:27:37 2013 +1000

----------------------------------------------------------------------
 .../src/mx/controls/AdvancedDataGrid.as         | 23 ++++++++++++--------
 1 file changed, 14 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f513e0c9/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGrid.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGrid.as b/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGrid.as
index 20e9862..ae429a7 100644
--- a/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGrid.as
+++ b/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGrid.as
@@ -5863,29 +5863,33 @@ public class AdvancedDataGrid extends AdvancedDataGridBaseEx
     override protected function findHeaderRenderer(pt:Point):IListItemRenderer
     {
         var headerItem:IListItemRenderer;
-        var xMatched:Boolean=false;
+        var xMatched:Boolean = false;
         var array:Array = visibleHeaderInfos;
         var x:Number;
 
-        while(!xMatched)
+        while (!xMatched)
         {
             var n:int = array ? array.length : 0;
-            for(var i:int=0; i < n; i++)
+            for (var i:int = 0; i < n; i++)
             {
                 headerItem = array[i]["headerItem"];
+				
+				if (headerItem == null)
+					continue;
+				
                 x = headerItem.x;
 
-                if(array[i].actualColNum >= lockedColumnCount)
+                if (array[i].actualColNum >= lockedColumnCount)
                     x = getAdjustedXPos(headerItem.x);
 
-                if(pt.x >= x && pt.x < (x + headerItem.getExplicitOrMeasuredWidth()))
+                if (pt.x >= x && pt.x < (x + headerItem.getExplicitOrMeasuredWidth()))
                 {
                     xMatched = true;
 
-                    if(pt.y >headerItem.y - cachedPaddingTop && 
-                       pt.y <= headerItem.y + headerItem.height + cachedPaddingBottom)
+                    if (pt.y >headerItem.y - cachedPaddingTop && 
+                        pt.y <= headerItem.y + headerItem.height + cachedPaddingBottom)
                         return headerItem;
-                    else if(array[i].visibleChildren && array[i].visibleChildren.length
> 0)
+                    else if (array[i].visibleChildren && array[i].visibleChildren.length
> 0)
                         array = array[i].visibleChildren;
                     else
                         return null;
@@ -5893,7 +5897,8 @@ public class AdvancedDataGrid extends AdvancedDataGridBaseEx
                 }
 
             }
-            if(!xMatched)//There is no point of keep looping over if x is not within range
+			// There is no point of keep looping over if x is not within range
+            if (!xMatched)
                 return null;
             xMatched = false;
         }


Mime
View raw message