mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Update src/elements/emby-scrollbuttons/utils.ts
Co-authored-by: viown <48097677+viown@users.noreply.github.com>
This commit is contained in:
parent
a0a2ca5fb9
commit
d139242ca8
1 changed files with 1 additions and 1 deletions
|
@ -76,7 +76,7 @@ function scrollToWindow({
|
|||
let scrollToPosition: number;
|
||||
|
||||
if (direction === ScrollDirection.RIGHT) {
|
||||
const nextItem = items[lastVisibleIndex] ? items[lastVisibleIndex] : items[lastVisibleIndex - 1];
|
||||
const nextItem = items[lastVisibleIndex] || items[lastVisibleIndex - 1];
|
||||
|
||||
// This will be the position to anchor the item at `lastVisibleIndex` to the start of the view window.
|
||||
const nextItemScrollOffset = lastVisibleIndex * nextItem.offsetWidth;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue