Flow layout no longer leaves last box behind
This commit is contained in:
parent
1cb9e8091e
commit
4cea0aa0bd
@ -43,7 +43,7 @@ func (flow Flow) Arrange (hints tomo.LayoutHints, boxes []tomo.Box) {
|
||||
for index < len(boxes) {
|
||||
// get a slice of boxes for this major step
|
||||
stepIndexEnd := index + minorSteps
|
||||
if stepIndexEnd >= len(boxes) { stepIndexEnd = len(boxes) - 1 }
|
||||
if stepIndexEnd > len(boxes) { stepIndexEnd = len(boxes) }
|
||||
step := boxes[index:stepIndexEnd]
|
||||
index += minorSteps
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user