1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Update src/controllers/lyrics.js

Co-authored-by: Dmitry Lyzo <56478732+dmitrylyzo@users.noreply.github.com>
This commit is contained in:
scampower3 2024-05-23 22:01:07 +08:00 committed by GitHub
parent 65550e07c3
commit 8c829fde46
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -73,12 +73,9 @@ export default function (view) {
if (lyric) { if (lyric) {
lyric.classList.remove('pastLyric'); lyric.classList.remove('pastLyric');
lyric.classList.remove('futureLyric'); lyric.classList.remove('futureLyric');
if (autoScroll === AutoScrollType.Smooth) { if (autoScroll !== AutoScrollType.NoScroll) {
scrollManager.scrollToElement(lyric, true);
}
if (autoScroll === AutoScrollType.Instant) {
// instant scroll is used when the view is first loaded // instant scroll is used when the view is first loaded
scrollManager.scrollToElement(lyric, false); scrollManager.scrollToElement(lyric, autoScroll === AutoScrollType.Smooth);
autoScroll = AutoScrollType.Smooth; autoScroll = AutoScrollType.Smooth;
} }
} }