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

update components

This commit is contained in:
Luke Pulverenti 2016-03-11 22:29:37 -05:00
parent 1f41a29864
commit ba749de15d
18 changed files with 482 additions and 369 deletions

View file

@ -10,17 +10,22 @@
* the user visible viewport of a web browser.
* only accounts for vertical position, not horizontal.
*/
function visibleInViewport(elem, partial, thresholdX, thresholdY) {
function visibleInViewport(elem, partial, thresholdX, thresholdY, windowSize) {
thresholdX = thresholdX || 0;
thresholdY = thresholdY || 0;
var vpWidth = window.innerWidth,
vpHeight = window.innerHeight;
if (!elem.getBoundingClientRect){
return true;
}
if (!elem.getBoundingClientRect) {
return true;
}
windowSize = windowSize || {
innerHeight: window.innerHeight,
innerWidth: window.innerWidth
};
var vpWidth = windowSize.innerWidth,
vpHeight = windowSize.innerHeight;
// Use this native browser method, if available.
var rec = elem.getBoundingClientRect(),