File tree 3 files changed +10
-5
lines changed
3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ Layout {
20
20
var p = 0
21
21
var w = 0
22
22
this .count = children .length
23
+
23
24
for (var i = 0 ; i < children .length ; ++ i) {
24
25
var c = children[i]
25
26
if (! (' height' in c))
@@ -32,7 +33,7 @@ Layout {
32
33
if (r > w)
33
34
w = r
34
35
c .viewY = p + tm
35
- if (c .visible )
36
+ if (c .visible && c . height > 0 )
36
37
p += c .height + tm + bm + this .spacing
37
38
}
38
39
if (p > 0 )
Original file line number Diff line number Diff line change @@ -101,9 +101,11 @@ BaseView {
101
101
s = 0
102
102
103
103
if (horizontal) {
104
- x += s + spacing
104
+ if (s > 0 )
105
+ x += s + spacing
105
106
} else {
106
- y += s + spacing
107
+ if (s > 0 )
108
+ y += s + spacing
107
109
}
108
110
}
109
111
return [x, y, w, h]
@@ -273,7 +275,8 @@ BaseView {
273
275
}
274
276
}
275
277
276
- p += s + this .spacing
278
+ if (s > 0 )
279
+ p += s + this .spacing
277
280
}
278
281
if (p > startPos)
279
282
p -= this .spacing ;
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ Layout {
20
20
var p = 0
21
21
var h = 0
22
22
this .count = children .length
23
+
23
24
for (var i = 0 ; i < children .length ; ++ i) {
24
25
var c = children[i]
25
26
if (! (' width' in c))
@@ -32,7 +33,7 @@ Layout {
32
33
if (b > h)
33
34
h = b
34
35
c .viewX = p + rm
35
- if (c .visible )
36
+ if (c .visible && c . width > 0 )
36
37
p += c .width + this .spacing + rm + lm
37
38
}
38
39
if (p > 0 )
You can’t perform that action at this time.
0 commit comments