mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update components
This commit is contained in:
parent
1f41a29864
commit
ba749de15d
18 changed files with 482 additions and 369 deletions
|
@ -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(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue