Fix estimatedHeight calculation in listframes
This commit is contained in:
parent
af06f11e03
commit
d0c8d867ab
|
@ -143,11 +143,13 @@ local function updatePage(scrollPos)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function estimatedHeight()
|
local function estimatedHeight()
|
||||||
|
local firstEntryFrame = subFrames[1]
|
||||||
local lastEntryFrame = subFrames[length]
|
local lastEntryFrame = subFrames[length]
|
||||||
if lastEntryFrame ~= nil then
|
if firstEntryFrame ~= nil and lastEntryFrame ~= nil then
|
||||||
|
local firstXPos, firstYPos = firstEntryFrame.getPosition()
|
||||||
local xPos, yPos = lastEntryFrame.getPosition()
|
local xPos, yPos = lastEntryFrame.getPosition()
|
||||||
local xSize, ySize = lastEntryFrame.getSize()
|
local xSize, ySize = lastEntryFrame.getSize()
|
||||||
return yPos+ySize-1
|
return yPos-firstYPos+ySize
|
||||||
else
|
else
|
||||||
return length
|
return length
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue