mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update by genre views
This commit is contained in:
parent
71b0be28b8
commit
dfbe16f07e
7 changed files with 75 additions and 35 deletions
|
@ -14,12 +14,12 @@
|
|||
},
|
||||
"devDependencies": {},
|
||||
"ignore": [],
|
||||
"version": "1.4.337",
|
||||
"_release": "1.4.337",
|
||||
"version": "1.4.338",
|
||||
"_release": "1.4.338",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "1.4.337",
|
||||
"commit": "1653cc935acba06056afae3a6fc8bce17fb46a7a"
|
||||
"tag": "1.4.338",
|
||||
"commit": "89d5917a0c6425e6f07868b92c9cabb04dcd0139"
|
||||
},
|
||||
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
||||
"_target": "^1.2.1",
|
||||
|
|
|
@ -15,17 +15,24 @@ define(['visibleinviewport', 'browser', 'dom'], function (visibleinviewport, bro
|
|||
|
||||
//options.rootMargin = "300%";
|
||||
|
||||
var observerId = 'obs' + new Date().getTime();
|
||||
|
||||
var self = this;
|
||||
var observer = new IntersectionObserver(function (entries) {
|
||||
for (var j = 0, length2 = entries.length; j < length2; j++) {
|
||||
var entry = entries[j];
|
||||
var target = entry.target;
|
||||
observer.unobserve(target);
|
||||
callback(target);
|
||||
loadedCount++;
|
||||
|
||||
if (loadedCount >= self.elementCount) {
|
||||
self.destroyObserver();
|
||||
observer.unobserve(target);
|
||||
|
||||
if (!target[observerId]) {
|
||||
target[observerId] = 1;
|
||||
callback(target);
|
||||
loadedCount++;
|
||||
|
||||
if (loadedCount >= self.elementCount) {
|
||||
self.destroyObserver();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue