naver / egjs-visible

A class that checks if an element is visible in the base element or viewport.
https://naver.github.io/egjs-visible/
MIT License
53 stars 6 forks source link

if call check function in scroll event, always trigger "change" event #10

Closed daybrush closed 7 years ago

daybrush commented 7 years ago

if call check function in scroll event, always trigger "change" event when not visible and not invisible.

add code

if (visible.length === 0 && invisible.length === 0) {
return this;
}