working on tests
This commit is contained in:
@@ -2878,13 +2878,16 @@ function Element:layoutChildren()
|
|||||||
elseif self.justifyContent == JustifyContent.SPACE_BETWEEN then
|
elseif self.justifyContent == JustifyContent.SPACE_BETWEEN then
|
||||||
startPos = 0
|
startPos = 0
|
||||||
if #line > 1 then
|
if #line > 1 then
|
||||||
|
-- Gap already accounted for in freeSpace calculation
|
||||||
itemSpacing = self.gap + (freeSpace / (#line - 1))
|
itemSpacing = self.gap + (freeSpace / (#line - 1))
|
||||||
end
|
end
|
||||||
elseif self.justifyContent == JustifyContent.SPACE_AROUND then
|
elseif self.justifyContent == JustifyContent.SPACE_AROUND then
|
||||||
|
-- Gap already accounted for in freeSpace calculation
|
||||||
local spaceAroundEach = freeSpace / #line
|
local spaceAroundEach = freeSpace / #line
|
||||||
startPos = spaceAroundEach / 2
|
startPos = spaceAroundEach / 2
|
||||||
itemSpacing = self.gap + spaceAroundEach
|
itemSpacing = self.gap + spaceAroundEach
|
||||||
elseif self.justifyContent == JustifyContent.SPACE_EVENLY then
|
elseif self.justifyContent == JustifyContent.SPACE_EVENLY then
|
||||||
|
-- Gap already accounted for in freeSpace calculation
|
||||||
local spaceBetween = freeSpace / (#line + 1)
|
local spaceBetween = freeSpace / (#line + 1)
|
||||||
startPos = spaceBetween
|
startPos = spaceBetween
|
||||||
itemSpacing = self.gap + spaceBetween
|
itemSpacing = self.gap + spaceBetween
|
||||||
@@ -3766,4 +3769,4 @@ Gui.new = Element.new
|
|||||||
Gui.Element = Element
|
Gui.Element = Element
|
||||||
Gui.Animation = Animation
|
Gui.Animation = Animation
|
||||||
Gui.Theme = Theme
|
Gui.Theme = Theme
|
||||||
return { GUI = Gui, Color = Color, Theme = Theme, enums = enums }
|
return { GUI = Gui, Gui = Gui, Element = Element, Color = Color, Theme = Theme, Animation = Animation, enums = enums }
|
||||||
|
|||||||
@@ -664,7 +664,7 @@ function TestAbsolutePositioningBasic:testMultiBranchZIndexStacking()
|
|||||||
})
|
})
|
||||||
|
|
||||||
-- Verify stacking order by z-index
|
-- Verify stacking order by z-index
|
||||||
luaunit.assertEquals(background.z, 1)
|
luaunit.assertEquals(backgroundColor.z, 1)
|
||||||
luaunit.assertEquals(middleParent.z, 5)
|
luaunit.assertEquals(middleParent.z, 5)
|
||||||
luaunit.assertEquals(middleChild1.z, 1)
|
luaunit.assertEquals(middleChild1.z, 1)
|
||||||
luaunit.assertEquals(middleChild2.z, 2)
|
luaunit.assertEquals(middleChild2.z, 2)
|
||||||
|
|||||||
Reference in New Issue
Block a user