You've already forked pigallery2
mirror of
https://github.com/bpatrik/pigallery2.git
synced 2025-11-27 22:38:10 +02:00
Improve scroll detection compatibility
This commit is contained in:
@@ -447,14 +447,12 @@ export class GalleryGridComponent
|
||||
*/
|
||||
private shouldRenderMore(offset = 0): boolean {
|
||||
const bottomOffset = this.getMaxRowHeight() * 2;
|
||||
const maxScroll = PageHelper.MaxScrollY + offset;
|
||||
|
||||
return (
|
||||
Config.Gallery.enableOnScrollRendering === false ||
|
||||
PageHelper.ScrollY >=
|
||||
document.body.clientHeight +
|
||||
offset -
|
||||
window.innerHeight -
|
||||
bottomOffset ||
|
||||
(document.body.clientHeight + offset) * 0.85 < window.innerHeight
|
||||
PageHelper.ScrollY >= maxScroll - bottomOffset ||
|
||||
maxScroll * 0.85 < window.innerHeight
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user