fix(CountersSelector): bad selectedPage calculation
This commit is contained in:
parent
b2beb2fdbb
commit
5501e06844
@ -91,7 +91,7 @@ local function renderCountersMap(win, countersMap, selectedCounter, titleFn)
|
|||||||
|
|
||||||
local availableHeight = height - topMargin - bottomMargin
|
local availableHeight = height - topMargin - bottomMargin
|
||||||
|
|
||||||
local selectedPage = math.floor(selectedCounter / availableHeight) + 1
|
local selectedPage = math.floor((selectedCounter - 1) / availableHeight) + 1
|
||||||
-- local totalPages = (nbCounters % availableHeight) + 1
|
-- local totalPages = (nbCounters % availableHeight) + 1
|
||||||
|
|
||||||
local nbElementsToOmit = (selectedPage - 1) * availableHeight
|
local nbElementsToOmit = (selectedPage - 1) * availableHeight
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user