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

update scrollthreshold.js

This commit is contained in:
Luke Pulverenti 2016-04-23 16:49:14 -04:00
parent 727a2e09f2
commit 049bc4aeac

View file

@ -15,7 +15,7 @@
function getScrollSize() {
if (!scrollSize) {
scrollSize = horizontal ? (elem.scrollWidth - elem.clientWidth) : (elem.scrollHeight - elem.clientHeight);
scrollSize = horizontal ? (elem.scrollWidth - elem.clientWidth) : (elem.scrollHeight - elem.offsetHeight);
}
return scrollSize;
}
@ -28,6 +28,8 @@
var position = horizontal ? elem.scrollLeft : elem.scrollTop;
//console.log('onscroll: ' + position + '-' + getScrollSize());
// Detect upper threshold
if (!upperTriggered && position < upperTolerance) {
upperTriggered = true;