feat: introduce growth options .horizontal_only and .vertical_only
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m5s
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:
+2
-2
@@ -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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user