Fixed all reported issues

This commit is contained in:
Hadi Charara 2022-10-13 13:59:48 -04:00
parent aed7feda2b
commit 892f5b73cf
6 changed files with 28 additions and 26 deletions

View file

@ -40,13 +40,13 @@ const EmbyScrollButtonsPrototype = Object.create(HTMLDivElement.prototype);
}
function updateScrollButtons(scrollButtons, scrollSize, scrollPos, scrollWidth) {
// TODO: Check if hack is really needed
// hack alert add twenty for rounding errors
let localeAwarePos = scrollPos;
if (globalize.getElementIsRTL(scrollButtons)) {
if (globalize.getIsElementRTL(scrollButtons)) {
localeAwarePos *= -1;
}
// TODO: Check if hack is really needed
// hack alert add twenty for rounding errors
if (scrollWidth <= scrollSize + 20) {
scrollButtons.scrollButtonsLeft.classList.add('hide');
scrollButtons.scrollButtonsRight.classList.add('hide');