Closed lsnch closed 6 years ago
intersectionRatio !== 0 doesn't work super well with zero-area elements, so isIntersecting is meant to disambiguate that situation.
but can change.intersectionRatio
ever be >0
if the element is in view but 0 height and 0 width?
@OZZlE Probably not.
However, consider the case where that zero-by-zero element is over an area of interest.
Their intersectionRatio
is 0
, but (IIRC), isIntersecting
would then be true
.
@ccjmne thanks for clearing it up! :-)
Is it meant to distinguish in which direction the root is moving? Or is it just a shortcut for
intersectionRatio !== 0
?This fiddle https://jsfiddle.net/wuka38z1/ shows different behaviors for Firefox and Chrome.