1
0
Fork 0
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:
Luke Pulverenti 2016-12-20 00:22:31 -05:00
parent 71980ad405
commit 61a71a50fb
11 changed files with 77 additions and 36 deletions

View file

@ -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
};
});