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 e7f61a6  handle too few rows
e7f61a6 is described below

commit e7f61a6343efb2ebc03d37e704178745d235bcf1
Author: Alex Harui <[email protected]>
AuthorDate: Wed Jan 8 14:44:45 2020 -0800

    handle too few rows
---
 .../org/apache/royale/html/beads/layouts/VirtualListVerticalLayout.as  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/layouts/VirtualListVerticalLayout.as
 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/layouts/VirtualListVerticalLayout.as
index 02a17e0..0ea0a7b 100644
--- 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/layouts/VirtualListVerticalLayout.as
+++ 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/layouts/VirtualListVerticalLayout.as
@@ -362,7 +362,8 @@ package org.apache.royale.html.beads.layouts
                     bottomSpacer = document.createElement("div") as 
HTMLDivElement;
                     contentView.element.appendChild(bottomSpacer);
                 }
-                bottomSpacer.style.height = ((dp.length - endIndex) * 
presentationModel.rowHeight).toString() + "px";  
+                var numBottomRows:int = dp.length - endIndex;
+                bottomSpacer.style.height = (numBottomRows > 0) ? 
(numBottomRows * presentationModel.rowHeight).toString() + "px" : "0px";  
                 inLayout = false;
                                return true;
                        }

Reply via email to