We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
throttle
IntersectionObserver
1 parent 2dddb62 commit 3194ecbCopy full SHA for 3194ecb
src/utils/lazy-load.ts
@@ -17,13 +17,12 @@ class LazyLoader {
17
if (this.rended) return this.unobserve()
18
19
const entry = entries[0]
20
-
21
- if (entry.intersectionRatio > 0) {
+ const DELAY_TIME = 260
+ if (entry.intersectionRatio >= 0) {
22
this.timer = setTimeout(() => {
23
this.handler()
24
this.rended = true
25
- console.log(this.rended)
26
- }, 260)
+ }, DELAY_TIME)
27
} else {
28
if (this.timer) {
29
clearTimeout(this.timer)
0 commit comments