Skip to content

Commit

Permalink
fix: break line logic
Browse files Browse the repository at this point in the history
  • Loading branch information
iuriatan committed Oct 29, 2021
1 parent 530e1d2 commit aaf1418
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/WrappingStack/WrappingHStack.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ public struct WrappingHStack<Data: RandomAccessCollection, ID: Hashable, Content
width = newWidth + horizontalSpacing
lineLength += 1
} else {
width = elementWidth
width = elementWidth + horizontalSpacing
let lineEnd = data.index(lineStart, offsetBy:lineLength)
result.append(lineStart ..< lineEnd)
lineLength = 0
lineLength = 1
lineStart = lineEnd
}
}
Expand Down

0 comments on commit aaf1418

Please sign in to comment.