/ top and bottom gaps on songwheel if there aren't many songs to fill it
This commit is contained in:
parent
94803d5b92
commit
3a5e348d2c
|
@ -163,6 +163,14 @@ end
|
|||
function getCorrectedIndex(from, offset)
|
||||
total = #songwheel.songs;
|
||||
|
||||
if (math.abs(offset) > total) then
|
||||
if (offset < 0) then
|
||||
offset = offset + total*math.floor(math.abs(offset)/total);
|
||||
else
|
||||
offset = offset - total*math.floor(math.abs(offset)/total);
|
||||
end
|
||||
end
|
||||
|
||||
index = from + offset;
|
||||
|
||||
if index < 1 then
|
||||
|
|
Loading…
Reference in New Issue