Browse Source

Fixed handling of hidden images

pull/73/head
Michał Dudak 10 years ago
parent
commit
309b8db4c9
  1. 8
      src/echo.js

8
src/echo.js

@ -18,7 +18,15 @@
var offset, poll, delay, useDebounce, unload;
var isHidden = function (element) {
return (element.offsetParent === null);
}
var inView = function (element, view) {
if (isHidden(element)) {
return false;
}
var box = element.getBoundingClientRect();
return (box.right >= view.l && box.bottom >= view.t && box.left <= view.r && box.top <= view.b);
};

Loading…
Cancel
Save