|
- export function isVisible(scrollbar, elem) {
- var bounding = scrollbar.bounding;
- var targetBounding = elem.getBoundingClientRect();
- // check overlapping
- var top = Math.max(bounding.top, targetBounding.top);
- var left = Math.max(bounding.left, targetBounding.left);
- var right = Math.min(bounding.right, targetBounding.right);
- var bottom = Math.min(bounding.bottom, targetBounding.bottom);
- return top < bottom && left < right;
- }
- //# sourceMappingURL=is-visible.js.map
|