cleanup warning
This commit is contained in:
parent
d9f9fe5415
commit
e44ac23c84
1 changed files with 3 additions and 9 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue