Images no longer lazy load after 1.8.0
dbirkbeck opened this issue · 1 comments
dbirkbeck commented
If a container extends outside of the view range, all images within the container (including images outside of the viewport) are now loaded. To fix this, the container must be bounded by the viewport (plus offset). I'm new to GitHub so I'll post the fix in this message below as well as try to submit a pull request.
var containerRectWithOffset = {
top: ((containerRect.top - options.offset) < _viewport.top) ? containerRect.top - options.offset : _viewport.top,
right: ((containerRect.right + options.offset) > _viewport.right) ? containerRect.right + options.offset : _viewport.right,
bottom: ((containerRect.bottom + options.offset) < _viewport.bottom) ? containerRect.bottom + options.offset : _viewport.bottom,
left: ((containerRect.left - options.offset) < _viewport.left) ? containerRect.left - options.offset : _viewport.left
};
dinbror commented
Thanks @dbirkbeck - Released in v.1.8.2. Some of your chevrons were wrong