You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2020/06/14 08:19:38 UTC

[royale-asjs] branch develop updated: fix editor position. Should fix #863

This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new 75fe027  fix editor position.  Should fix #863
75fe027 is described below

commit 75fe0272fc818f9e343e61fdc72e36e783cf7793
Author: Alex Harui <ah...@apache.org>
AuthorDate: Sun Jun 14 01:19:21 2020 -0700

    fix editor position.  Should fix #863
---
 .../main/royale/mx/controls/AdvancedDataGrid.as    | 25 ++++++++++------------
 1 file changed, 11 insertions(+), 14 deletions(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/AdvancedDataGrid.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/AdvancedDataGrid.as
index 48c7fbc..b27f721 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/AdvancedDataGrid.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/AdvancedDataGrid.as
@@ -10493,24 +10493,21 @@ public class AdvancedDataGrid extends AdvancedListBase implements IDataGrid
         }
 
 		var xx:Number = 0;
-        if (visibleColumns.length != columns.length)
+        var n:int = visibleColumns.length;
+        for (var i:int = 0; i < n; i++)
         {
-            var n:int = visibleColumns.length;
-            for (var i:int = 0; i < n; i++)
+            if ((visibleColumns[i] as AdvancedDataGridColumn).colNum >= colIndex)
             {
-                if ((visibleColumns[i] as AdvancedDataGridColumn).colNum >= colIndex)
-                {
-                    colIndex = i;
-                    break;
-                }
-				xx += visibleColumns[i].width;
+                colIndex = i;
+                break;
             }
-            if (i == visibleColumns.length)
-			{
-                colIndex = 0;
-				xx = 0;
-			}
+			xx += visibleColumns[i].width;
         }
+        if (i == visibleColumns.length)
+		{
+		    colIndex = 0;
+			xx = 0;
+		}
 
         if (rowIndex > lockedRowCount)
             rowIndex -= verticalScrollPosition;