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 2019/12/05 21:53:01 UTC

[royale-asjs] 01/02: tune last row viewing. Should fix #609

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

commit ae7b2d021ec487f9b3c6ed4655541def910d91a5
Author: Alex Harui <ah...@apache.org>
AuthorDate: Thu Dec 5 13:35:35 2019 -0800

    tune last row viewing.  Should fix #609
---
 .../royale/mx/controls/beads/layouts/AdvancedDataGridLayout.as     | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/beads/layouts/AdvancedDataGridLayout.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/beads/layouts/AdvancedDataGridLayout.as
index 1adf495..a499ef0 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/beads/layouts/AdvancedDataGridLayout.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/beads/layouts/AdvancedDataGridLayout.as
@@ -121,6 +121,13 @@ package mx.controls.beads.layouts
                         // the lists are "absolute" so they float over the spacer
                         spacer.style.height = totalHeight.toString() + "px";
                         topSpacerHeight = Math.min(topSpacerHeight, totalHeight - useHeight);
+                        // if we have enough to scroll, then make the columns a row taller because
+                        // the virtual scrolling neds to shift the column lists
+                        if (totalHeight > useHeight)
+                        {
+                            var numVisibleRows:int = Math.floor(useHeight / actualRowHeight);
+                            useHeight = actualRowHeight * (numVisibleRows + 1);
+                        }
                     }
                 }
                 for (var i:int = 0; i < n; i++)