You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3 vuotta sitten
1234567891011
  1. export function isVisible(scrollbar, elem) {
  2. var bounding = scrollbar.bounding;
  3. var targetBounding = elem.getBoundingClientRect();
  4. // check overlapping
  5. var top = Math.max(bounding.top, targetBounding.top);
  6. var left = Math.max(bounding.left, targetBounding.left);
  7. var right = Math.min(bounding.right, targetBounding.right);
  8. var bottom = Math.min(bounding.bottom, targetBounding.bottom);
  9. return top < bottom && left < right;
  10. }
  11. //# sourceMappingURL=is-visible.js.map