flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mih...@apache.org
Subject git commit: [flex-sdk] [refs/heads/develop] - FLEX-35260 When calling localToGlobal() on gridColumnHeaderGroup, the result does not reflect its horizontal scroll position, which means that we need to include it manually (in GridHeaderViewLayout.getHeader
Date Wed, 12 Apr 2017 13:40:11 GMT
Repository: flex-sdk
Updated Branches:
  refs/heads/develop 60ccf24cb -> d726aee2d


FLEX-35260 When calling localToGlobal() on gridColumnHeaderGroup, the result does not reflect
its horizontal scroll position, which means that we need to include it manually (in GridHeaderViewLayout.getHeaderIndexAt()).
However, the 'x' function argument is assumed to include it, so we're not adding it anymore
when calling GridDimensionsView.getColumnIndexAt().


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

Branch: refs/heads/develop
Commit: d726aee2da04bd796ab91fa1960d7e55d47cde44
Parents: 60ccf24
Author: Mihai Chira <mihaic@apache.org>
Authored: Wed Apr 12 15:16:39 2017 +0200
Committer: Mihai Chira <mihaic@apache.org>
Committed: Wed Apr 12 15:16:39 2017 +0200

----------------------------------------------------------------------
 .../projects/spark/src/spark/components/GridColumnHeaderGroup.as | 4 ++--
 .../src/spark/components/gridClasses/GridHeaderViewLayout.as     | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/d726aee2/frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.as b/frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.as
index 3d51fd8..63a0eb3 100644
--- a/frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.as
+++ b/frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.as
@@ -1039,11 +1039,11 @@ public class GridColumnHeaderGroup extends Group implements IDataGridElement
     // TODO: apologize for stashing the separatorIndex in headerCP.rowIndex
     private function eventToHeaderLocations(event:MouseEvent, headerCP:CellPosition, headerXY:Point):Boolean
     {
-        const view:Group = getHeaderViewUnderGlobalCoordinates(new Point(event.stageX, event.stageY));
+        const stageXY:Point = new Point(event.stageX, event.stageY);
+        const view:Group = getHeaderViewUnderGlobalCoordinates(stageXY);
         if (!view)
             return false;
 
-		const stageXY:Point = new Point(event.stageX, event.stageY);
         const viewXY:Point = view.globalToLocal(stageXY);
         const viewLayout:GridHeaderViewLayout = view.layout as GridHeaderViewLayout;
         const gdv:GridDimensionsView = viewLayout.gridView.gridViewLayout.gridDimensionsView;

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/d726aee2/frameworks/projects/spark/src/spark/components/gridClasses/GridHeaderViewLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/src/spark/components/gridClasses/GridHeaderViewLayout.as
b/frameworks/projects/spark/src/spark/components/gridClasses/GridHeaderViewLayout.as
index cbdf3eb..9432c0a 100644
--- a/frameworks/projects/spark/src/spark/components/gridClasses/GridHeaderViewLayout.as
+++ b/frameworks/projects/spark/src/spark/components/gridClasses/GridHeaderViewLayout.as
@@ -501,14 +501,14 @@ public class GridHeaderViewLayout extends LayoutBase
     public function getHeaderIndexAt(x:Number, y:Number):int
     {
         var headerIndex:int = -1;
-        var globalPoint:Point = gridColumnHeaderGroup.localToGlobal(new Point(x, y));
+        var globalPoint:Point = gridColumnHeaderGroup.localToGlobal(new Point(x - horizontalScrollPosition,
y));
 
         if(gridColumnHeaderGroup.areCoordinatesOverAHeaderView(globalPoint))
         {
             var paddingLeftStyle:Number = gridColumnHeaderGroup.getStyle("paddingLeft");
             var paddingLeft:Number = isNaN(paddingLeftStyle) ? 0 : paddingLeftStyle;
 
-            headerIndex = gridView.gridViewLayout.gridDimensionsView.getColumnIndexAt(x -
paddingLeft + horizontalScrollPosition, y);
+            headerIndex = gridView.gridViewLayout.gridDimensionsView.getColumnIndexAt(x -
paddingLeft, y);
 
             if(headerIndex == -1)
             {


Mime
View raw message