mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix duplicate latest recordings section
This commit is contained in:
parent
71980ad405
commit
61a71a50fb
11 changed files with 77 additions and 36 deletions
|
@ -57,6 +57,24 @@ define(['focusManager', 'dom', 'scrollStyles'], function (focusManager, dom) {
|
|||
}
|
||||
}
|
||||
|
||||
function toStart(container, elem, horizontal) {
|
||||
var pos = getPosition(container, elem, horizontal);
|
||||
|
||||
if (container.scrollTo) {
|
||||
if (horizontal) {
|
||||
container.scrollTo(pos.start, 0);
|
||||
} else {
|
||||
container.scrollTo(0, pos.start);
|
||||
}
|
||||
} else {
|
||||
if (horizontal) {
|
||||
container.scrollLeft = Math.round(pos.start);
|
||||
} else {
|
||||
container.scrollTop = Math.round(pos.start);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function centerOnFocus(e, scrollSlider, horizontal) {
|
||||
var focused = focusManager.focusableParent(e.target);
|
||||
|
||||
|
@ -102,6 +120,7 @@ define(['focusManager', 'dom', 'scrollStyles'], function (focusManager, dom) {
|
|||
}
|
||||
}
|
||||
},
|
||||
toCenter: toCenter
|
||||
toCenter: toCenter,
|
||||
toStart: toStart
|
||||
};
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue