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 {
|
private shouldRenderMore(offset = 0): boolean {
|
||||||
const bottomOffset = this.getMaxRowHeight() * 2;
|
const bottomOffset = this.getMaxRowHeight() * 2;
|
||||||
|
const maxScroll = PageHelper.MaxScrollY + offset;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
Config.Gallery.enableOnScrollRendering === false ||
|
Config.Gallery.enableOnScrollRendering === false ||
|
||||||
PageHelper.ScrollY >=
|
PageHelper.ScrollY >= maxScroll - bottomOffset ||
|
||||||
document.body.clientHeight +
|
maxScroll * 0.85 < window.innerHeight
|
||||||
offset -
|
|
||||||
window.innerHeight -
|
|
||||||
bottomOffset ||
|
|
||||||
(document.body.clientHeight + offset) * 0.85 < window.innerHeight
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user