Fix flow layout getting stuck in a loop

This commit is contained in:
Sasha Koshka 2024-06-15 18:12:08 -04:00
parent 23fb28ce5c
commit c06f10c193

View File

@ -38,6 +38,7 @@ func (flow Flow) Arrange (hints tomo.LayoutHints, boxes []tomo.Box) {
minorSteps := minorSteps :=
(flow.deltaMinor(hints.Bounds) + flow.minor(hints.Gap)) / (flow.deltaMinor(hints.Bounds) + flow.minor(hints.Gap)) /
(minorSize + flow.minor(hints.Gap)) (minorSize + flow.minor(hints.Gap))
if minorSteps < 1 { minorSteps = 1 }
// arrange // arrange
point := hints.Bounds.Min point := hints.Bounds.Min