mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
remove unused onMaskTransitionEnd
apply sonarcloud suggestions
This commit is contained in:
parent
be609351ef
commit
9758a0ff1e
2 changed files with 4 additions and 15 deletions
|
@ -17,7 +17,7 @@ function disableEvent(e) {
|
|||
e.stopPropagation();
|
||||
}
|
||||
|
||||
class NavigationDrawer {
|
||||
class NavDrawer {
|
||||
mask;
|
||||
newPos = 0;
|
||||
currentPos = 0;
|
||||
|
@ -188,14 +188,6 @@ class NavigationDrawer {
|
|||
this.countStart = 0;
|
||||
};
|
||||
|
||||
onMaskTransitionEnd = () => {
|
||||
const classList = this.mask.classList;
|
||||
|
||||
if (!classList.contains('backdrop')) {
|
||||
classList.add('hide');
|
||||
}
|
||||
};
|
||||
|
||||
initElements() {
|
||||
const options = this.options;
|
||||
|
||||
|
@ -207,9 +199,6 @@ class NavigationDrawer {
|
|||
this.mask = document.createElement('div');
|
||||
this.mask.className = 'tmla-mask hide';
|
||||
document.body.appendChild(this.mask);
|
||||
dom.addEventListener(this.mask, dom.whichTransitionEvent(), this.onMaskTransitionEnd, {
|
||||
passive: true
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -372,5 +361,5 @@ class NavigationDrawer {
|
|||
}
|
||||
}
|
||||
|
||||
export default NavigationDrawer;
|
||||
export default NavDrawer;
|
||||
|
||||
|
|
|
@ -899,8 +899,8 @@ import { getParameterByName } from '../utils/url.ts';
|
|||
navDrawerScrollContainer = navDrawerElement.querySelector('.scrollContainer');
|
||||
navDrawerScrollContainer.addEventListener('click', onMainDrawerClick);
|
||||
return new Promise(function (resolve) {
|
||||
import('../libraries/navdrawer/navdrawer').then(({ default: NavigationDrawer }) => {
|
||||
navDrawerInstance = new NavigationDrawer(getNavDrawerOptions());
|
||||
import('../libraries/navdrawer/navdrawer').then(({ default: NavDrawer }) => {
|
||||
navDrawerInstance = new NavDrawer(getNavDrawerOptions());
|
||||
|
||||
if (!layoutManager.tv) {
|
||||
navDrawerElement.classList.remove('hide');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue