Update Flexbox.lua
Small renaming fix
This commit is contained in:
@@ -42,9 +42,9 @@ return function(name, basalt)
|
|||||||
|
|
||||||
base:addProperty("FlexDirection", {"row", "column"}, "row", nil, function(self, direction)
|
base:addProperty("FlexDirection", {"row", "column"}, "row", nil, function(self, direction)
|
||||||
if(direction=="row")then
|
if(direction=="row")then
|
||||||
self:setScrollDirection("horizontal")
|
base:setDirection("horizontal")
|
||||||
elseif(direction=="column")then
|
elseif(direction=="column")then
|
||||||
self:setScrollDirection("vertical")
|
base:setDirection("vertical")
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
base:addProperty("Spacing", "number", 1, nil, function(self, spacing)
|
base:addProperty("Spacing", "number", 1, nil, function(self, spacing)
|
||||||
@@ -324,7 +324,7 @@ return function(name, basalt)
|
|||||||
|
|
||||||
local function applyLayout(self)
|
local function applyLayout(self)
|
||||||
sortChildren(self)
|
sortChildren(self)
|
||||||
if self:getDirection() == "row" then
|
if self:getFlexDirection() == "row" then
|
||||||
for _,v in pairs(sortedChildren)do
|
for _,v in pairs(sortedChildren)do
|
||||||
calculateRow(self, v)
|
calculateRow(self, v)
|
||||||
end
|
end
|
||||||
@@ -378,4 +378,4 @@ return function(name, basalt)
|
|||||||
|
|
||||||
object.__index = object
|
object.__index = object
|
||||||
return setmetatable(object, base)
|
return setmetatable(object, base)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user