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

Merge pull request #4714 from thornbill/edgy-emby-scroller

This commit is contained in:
Bill Thornton 2023-07-11 16:37:49 -04:00 committed by GitHub
commit 200c9d417a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 16 deletions

View file

@ -3,10 +3,10 @@
}
.emby-scroller {
margin-left: 3.3%;
margin-left: max(env(safe-area-inset-left), 3.3%);
margin-right: 3.3%;
margin-right: max(env(safe-area-inset-right), 3.3%);
padding-left: 3.3%;
padding-left: max(env(safe-area-inset-left), 3.3%);
padding-right: 3.3%;
padding-right: max(env(safe-area-inset-right), 3.3%);
}
.servers > .card > .cardBox {
@ -26,13 +26,3 @@
margin-left: 1.2em;
}
}
.layout-tv .emby-scroller,
.layout-mobile .emby-scroller {
padding-left: 3.3%;
padding-left: max(env(safe-area-inset-left), 3.3%);
padding-right: 3.3%;
padding-right: max(env(safe-area-inset-right), 3.3%);
margin-left: 0;
margin-right: 0;
}

View file

@ -175,11 +175,19 @@ const scrollerFactory = function (frame, options) {
requiresReflow = false;
// Reset global variables
frameSize = o.horizontal ? (frame).offsetWidth : (frame).offsetHeight;
const frameStyle = window.getComputedStyle(frame);
if (o.horizontal) {
frameSize = frame.clientWidth;
frameSize -= parseFloat(frameStyle.paddingLeft) + parseFloat(frameStyle.paddingRight);
} else {
frameSize = frame.clientHeight;
frameSize -= parseFloat(frameStyle.paddingTop) + parseFloat(frameStyle.paddingBottom);
}
frameSize = Math.round(frameSize);
slideeSize = o.scrollWidth || Math.max(slideeElement[o.horizontal ? 'offsetWidth' : 'offsetHeight'], slideeElement[o.horizontal ? 'scrollWidth' : 'scrollHeight']);
// Set position limits & relativess
// Set position limits & relatives
self._pos.end = Math.max(slideeSize - frameSize, 0);
if (globalize.getIsRTL())
self._pos.end *= -1;