Lots of fixes and improvements
This commit is contained in:
Robert Jelic
2025-02-16 14:33:07 +01:00
parent 19edc4b295
commit cc7b2de51a
27 changed files with 198 additions and 208 deletions

View File

@@ -226,11 +226,9 @@ local function updateLayout(self, direction, spacing, justifyContent, wrap)
end
--- Creates a new Flexbox instance
--- @param props table The properties to initialize the element with
--- @param basalt table The basalt instance
--- @return Flexbox object The newly created Flexbox instance
--- @usage local element = Flexbox.new("myId", basalt)
function Flexbox.new(props, basalt)
function Flexbox.new()
local self = setmetatable({}, Flexbox):__init()
self.set("width", 12)
self.set("height", 6)
@@ -238,7 +236,6 @@ function Flexbox.new(props, basalt)
self.set("z", 10)
self:observe("width", function() self.set("flexUpdateLayout", true) end)
self:observe("height", function() self.set("flexUpdateLayout", true) end)
self:init(props, basalt)
return self
end