toddmotto / echo

Lazy-loading images with data-* attributes
http://toddmotto.com/labs/echo
3.72k stars 504 forks source link

Event is fired at the end of the scroll event. #118

Closed proov closed 7 years ago

proov commented 7 years ago

I dont know if it's a normal behavior or not. I set a CSS loading spinner while images are not loaded. When i scroll, i see all the spinners, but images are showing only when the scroll is fully finished. Images should be loaded and displayed when they're downloaded, whatever if we're scrolling at this moment or not.

This behavior is even more perceptible on touch device because the momentum is bigger.

Someone noticed this yet ? Is it a normal behavior ? i'm using "echojs": "^1.7.3"

thanks :)

EDIT

debounce

Type: Boolean Default: true

By default the throttling function is actually a debounce function so that the checking function is only triggered after a user stops scrolling. To use traditional throttling where it will only check the images every throttle milliseconds, set debounce to false.

My apologizes 😅