Skip to content

Commit 9daeffd

Browse files
committed
feat(ImgObserver): add isIntersecting for observe
1 parent 10f7bd9 commit 9daeffd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/Image/observer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ export function unobserve(element, obs) {
6363

6464
function excute(entries) {
6565
entries.forEach(each => {
66-
const { target, intersectionRatio } = each
67-
if(intersectionRatio > 0) {
66+
const { target, intersectionRatio, isIntersecting } = each
67+
if(intersectionRatio > 0 || isIntersecting) {
6868
const tar = targets.get(target)
6969
if(tar) {
7070
tar.cb(each)

0 commit comments

Comments
 (0)