Various fixes

This commit is contained in:
Ilya Laktyushin
2023-01-27 00:57:19 +04:00
parent edc737dce1
commit 72fce11e2d
8 changed files with 18 additions and 35 deletions

View File

@@ -96,7 +96,9 @@ public func generateRectsImage(color: UIColor, rects: [CGRect], inset: CGFloat,
var currentRects: [CGRect] = []
for rect in rects {
if rect.width.isZero {
combinedRects.append(currentRects)
if !currentRects.isEmpty {
combinedRects.append(currentRects)
}
currentRects.removeAll()
} else {
currentRects.append(rect)