Skip to content

Conversation

@h2owl
Copy link

@h2owl h2owl commented Oct 25, 2017

Hi, dear

This PR stops loading img which is not displayed ( display:none ).
The function getBoundingClientRect, which is used in inViewport can't take correct position when the node is in invisible element, can it?
So I added a check in inViewport to know whether it's displayed.
Please tell me if I did anything wrong.
Thanks.

best regards,

h2owl added 2 commits October 25, 2017 12:08
when layzr checks "getBoundingClientRect", element which is nod displayed returns 0 as getBoundingClientRect().top
@Stolzenhain
Copy link

+1 for this

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

Successfully merging this pull request may close these issues.

2 participants