mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Fixed navbar for RTL layouts
This commit is contained in:
parent
d38518e1e5
commit
87190cf31a
6 changed files with 33 additions and 3 deletions
|
@ -7,6 +7,7 @@ import browser from '../../scripts/browser';
|
|||
import dom from '../../scripts/dom';
|
||||
import './navdrawer.scss';
|
||||
import '../../assets/css/scrollstyles.scss';
|
||||
import { getIsRTL } from '../../scripts/globalize';
|
||||
|
||||
function getTouches(e) {
|
||||
return e.changedTouches || e.targetTouches || e.touches;
|
||||
|
@ -193,7 +194,7 @@ class NavDrawer {
|
|||
|
||||
options.target.classList.add('touch-menu-la');
|
||||
options.target.style.width = options.width + 'px';
|
||||
options.target.style.left = -options.width + 'px';
|
||||
options.target.style.insetInlineStart = -options.width + 'px';
|
||||
|
||||
if (!options.disableMask) {
|
||||
this.mask = document.createElement('div');
|
||||
|
@ -205,7 +206,7 @@ class NavDrawer {
|
|||
animateToPosition(pos) {
|
||||
const options = this.options;
|
||||
requestAnimationFrame(function () {
|
||||
options.target.style.transform = pos ? 'translateX(' + pos + 'px)' : 'none';
|
||||
options.target.style.transform = pos ? 'translateX(' + (getIsRTL() ? -pos : pos) + 'px)' : 'none';
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue