jlayout.flexgrid.js row height fix

71 views
Skip to first unread message

Cory

unread,
Dec 28, 2010, 4:41:52 PM12/28/10
to jLayout
Here is a small patch to jlayout.flexgrid.js to correctly compute the
height of each row.

--- jlayout/jlayout.flexgrid.js 2010-07-31 09:47:32.000000000
-0700
+++ jlayout/jlayout.flexgrid.js 2010-12-28 13:00:08.646032014 -0800
@@ -36,7 +36,7 @@
insets =
container.insets();

for (i = 0; i <
my.items.length; i += 1) {
- r = i / my.columns;
+ r = Math.floor(i /
my.columns);
c = i % my.columns;
type_size = my.items[i]
[type + 'Size']();
if (w[c] <
type_size.width) {
@@ -76,7 +76,7 @@
d;

for (i = 0; i < my.items.length; i +=
1) {
- r = i / my.columns;
+ r = Math.floor(i /
my.columns);
c = i % my.columns;
d =
my.items[i].preferredSize();
d.width = sw * d.width;

Bram Stein

unread,
Jan 3, 2011, 4:46:44 AM1/3/11
to jLayout
Thanks, I've applied the patch:
https://github.com/bramstein/jlayout/commit/b5ff32977e136f519236d29593433e87dadb74d0

Don't know how I missed that, thanks for reporting.

Bram

Reply all
Reply to author
Forward
0 new messages