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 multiple nodes are too big, it isn't ok. but a single node can't shrink so only check here
|
||||||
if rowSize > okThreshold*targetSize {
|
if rowSize > okThreshold*targetSize {
|
||||||
skipCount++
|
skipCount++
|
||||||
if skipCount >= SKIP_LIMIT {
|
|
||||||
// there may even be too many to skip
|
// there may even be too many to skip
|
||||||
return true
|
return skipCount >= SKIP_LIMIT
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// row is too small to be good overall
|
// row is too small to be good overall
|
||||||
if rowSize < targetSize/okThreshold {
|
if rowSize < targetSize/okThreshold {
|
||||||
skipCount++
|
skipCount++
|
||||||
if skipCount >= SKIP_LIMIT {
|
return skipCount >= SKIP_LIMIT
|
||||||
return true
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue