beekai-oss / react-simple-img

🌅 React lazy load images with IntersectionObserver API and Priority Hints
MIT License
989 stars 41 forks source link

threshold doesn't take in account scrolling down #84

Closed younes0 closed 4 years ago

younes0 commented 4 years ago

Threshold should take in account, the lower part of the image which would the only visible part when scrolling from down.

Not sure how you could do this with one IntersectionObserver, you would need two with different roots maybe?

bluebill1049 commented 4 years ago

react simple img is based on IntersectionObserver and I am not sure to introduce the additional features on top of it just yet.

younes0 commented 4 years ago

I understand, but shouldn't be lazyLoading be active on any scroll direction ?

bluebill1049 commented 4 years ago

last time I tested it was working for me.

bluebill1049 commented 4 years ago

gong to close this issue for now, unless someone wants to contribute

younes0 commented 4 years ago

last time I tested it was working for me.

All right then. I'm using react simple img inside a Carousel which is not the conventional way of using the library :)