cleanup warning

This commit is contained in:
Gavin Nishizawa 2023-09-20 11:51:43 -07:00
parent d9f9fe5415
commit e44ac23c84
No known key found for this signature in database
GPG key ID: AE3B177777CE55CD

View file

@ -704,20 +704,14 @@ func (gd *gridDiagram) getBestLayout(targetSize float64, columns bool) [][]*d2gr
// if multiple nodes are too big, it isn't ok. but a single node can't shrink so only check here
if rowSize > okThreshold*targetSize {
skipCount++
if skipCount >= SKIP_LIMIT {
// there may even be too many to skip
return true
}
return false
// there may even be too many to skip
return skipCount >= SKIP_LIMIT
}
}
// row is too small to be good overall
if rowSize < targetSize/okThreshold {
skipCount++
if skipCount >= SKIP_LIMIT {
return true
}
return false
return skipCount >= SKIP_LIMIT
}
return true
}