1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

use shared headroom

This commit is contained in:
Luke Pulverenti 2016-08-15 22:40:29 -04:00
parent e5b6336256
commit a11c82ac9d
12 changed files with 177 additions and 156 deletions

View file

@ -879,21 +879,6 @@
}
}
pageClassOn('pageinit', 'page', function () {
var page = this;
var isLibraryPage = page.classList.contains('libraryPage');
if (isLibraryPage) {
var navs = page.querySelectorAll('.libraryViewNav');
for (var i = 0, length = navs.length; i < length; i++) {
initHeadRoom(navs[i]);
}
}
});
pageClassOn('pagebeforeshow', 'page', function (e) {
var page = this;
@ -999,18 +984,9 @@
return;
}
require(["headroom"], function () {
require(["headroom-window"], function (headroom) {
// construct an instance of Headroom, passing the element
var headroom = new Headroom(elem, {
// or scroll tolerance per direction
tolerance: {
down: 40,
up: 0
}
});
// initialise
headroom.init();
headroom.add(elem);
});
}