Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images no longer lazy load after 1.8.0 #113

Closed
dbirkbeck opened this issue Oct 22, 2016 · 1 comment
Closed

Images no longer lazy load after 1.8.0 #113

dbirkbeck opened this issue Oct 22, 2016 · 1 comment

Comments

@dbirkbeck
Copy link

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
Copy link
Owner

dinbror commented Oct 25, 2016

Thanks @dbirkbeck - Released in v.1.8.2. Some of your chevrons were wrong

@dinbror dinbror closed this as completed Oct 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants