royale-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yish...@apache.org
Subject [royale-asjs] branch develop updated: Number of rows increases, event if there's one extra, so Math.ceil() is a more appropriate function
Date Wed, 06 Dec 2017 14:56:25 GMT
This is an automated email from the ASF dual-hosted git repository.

yishayw 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 16f3de0  Number of rows increases, event if there's one extra, so Math.ceil() is
a more appropriate function
16f3de0 is described below

commit 16f3de0425d310271275d9b9dfd33d1b80156d1b
Author: DESKTOP-RH4S838\Yishay <yishayjobs@hotmail.com>
AuthorDate: Wed Dec 6 16:55:58 2017 +0200

    Number of rows increases, event if there's one extra, so Math.ceil() is a more appropriate
function
---
 .../main/royale/org/apache/royale/html/beads/layouts/TileLayout.as    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/layouts/TileLayout.as
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/layouts/TileLayout.as
index 63182bb..d01d08b 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/layouts/TileLayout.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/layouts/TileLayout.as
@@ -148,12 +148,12 @@ package org.apache.royale.html.beads.layouts
 					if (testChild == null || !testChild.visible) realN--;
 				}
 
-				if (isNaN(useWidth)) useWidth = Math.floor(adjustedWidth / numColumns); // + gap
+				if (isNaN(useWidth)) useWidth = Math.ceil(adjustedWidth / numColumns); // + gap
 				if (isNaN(useHeight)) {
 					// given the width and total number of items, how many rows?
 					var numRows:Number = Math.floor(realN/numColumns);
 					if (host.isHeightSizedToContent()) useHeight = 30; // default height
-					else useHeight = Math.floor(adjustedHeight / numRows);
+					else useHeight = Math.ceil(adjustedHeight / numRows);
 				}
 
 				var maxWidth:Number = useWidth;

-- 
To stop receiving notification emails like this one, please contact
['"commits@royale.apache.org" <commits@royale.apache.org>'].

Mime
View raw message