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

Don't math twice

This commit is contained in:
MrTimscampi 2020-08-06 22:25:14 +02:00
parent f2e1d03ae9
commit e7d6bc2889

View file

@ -229,15 +229,15 @@ var scrollerFactory = function (frame, options) {
}
} else if (!immediate && container.scrollTo) {
if (o.horizontal) {
container.scrollTo(Math.Math.round(pos), 0);
container.scrollTo(Math.round(pos), 0);
} else {
container.scrollTo(0, Math.Math.round(pos));
container.scrollTo(0, Math.round(pos));
}
} else {
if (o.horizontal) {
container.scrollLeft = Math.Math.round(pos);
container.scrollLeft = Math.round(pos);
} else {
container.scrollTop = Math.Math.round(pos);
container.scrollTop = Math.round(pos);
}
}
}