Akryum / vue-observe-visibility

Detect when an element is becoming visible or hidden on the page.
https://jsfiddle.net/Akryum/ppt7endj/
1.65k stars 87 forks source link

fix: threshold array callback #257

Open iosamuel opened 2 years ago

iosamuel commented 2 years ago

If the Threshold is an Array we cannot check for ´entry.intersectionRatio >= this.threshold´ because it will always be false, so the callback is not executed correctly. We need to call it if it finds an intersection with the array that we provided.

iosamuel commented 1 year ago

@Akryum could you check these out?