feat: introduce growth options .horizontal_only and .vertical_only
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m5s

Growing containers only in one specific direction while fixing the
other dimension (which is then required to be provided - just like
before).
This commit is contained in:
2026-01-18 13:36:03 +01:00
parent 1621715ad8
commit 836d7669e5
2 changed files with 21 additions and 11 deletions
+2 -2
View File
@@ -219,8 +219,8 @@ pub fn Alignment(Model: type, Event: type) type {
outer: for (0..csize.y) |row| {
inner: for (0..csize.x) |col| {
// do not read/write out of bounce
if (this.size.x < row) break :outer;
if (this.size.y < col) break :inner;
if (this.size.y < row) break :outer;
if (this.size.x < col) break :inner;
cells[((row + origin.y) * size.x) + col + origin.x] = container_cells[(row * csize.x) + col];
}