fixes to graphics constraint logic

This commit is contained in:
Mikayla Fischler
2024-06-05 19:38:22 -04:00
parent e37b8758cd
commit 375b7f680e
2 changed files with 8 additions and 2 deletions

View File

@@ -230,7 +230,7 @@ function element.new(args, constraint, child_offset_x, child_offset_y)
if type(constraint) == "function" then
-- constrain per provided constraint function (can only get smaller than available space)
w, h = constraint(w, h)
w, h = constraint(f)
f.w = math.min(f.w, w)
f.h = math.min(f.h, h)
end