Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- checkVisible() {
- const elm = ReactDOM.findDOMNode(this).parentElement;
- var rect = elm.getBoundingClientRect();
- var viewHeight = Math.max(document.documentElement.clientHeight, window.innerHeight);
- return (rect.y >= 0 && rect.y + rect.height < viewHeight);
- }
Add Comment
Please, Sign In to add comment