Guest User

Untitled

a guest
Jan 18th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. checkVisible() {
  2. const elm = ReactDOM.findDOMNode(this).parentElement;
  3. var rect = elm.getBoundingClientRect();
  4. var viewHeight = Math.max(document.documentElement.clientHeight, window.innerHeight);
  5. return (rect.y >= 0 && rect.y + rect.height < viewHeight);
  6. }
Add Comment
Please, Sign In to add comment