mirror of
https://github.com/storytold/gridcraft.git
synced 2026-11-09 20:09:57 -06:00
address review: stop the descriptive builder once the grid is too large
This commit is contained in:
@@ -332,6 +332,10 @@ fn descriptive(s: &Session, p: &Json) -> Result<Grid> {
|
||||
}
|
||||
let mut g = Grid::default();
|
||||
for (i, v) in vars.iter().enumerate() {
|
||||
// The report is refused once the grid is too large: the rest would only build discarded labels.
|
||||
if g.too_large {
|
||||
break;
|
||||
}
|
||||
let x = numbers(&v.vals, true)?;
|
||||
let c = idx(i).saturating_mul(2);
|
||||
g.txt(0, c, &v.name);
|
||||
|
||||
Reference in New Issue
Block a user