Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 

24 строки
514 B

  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = {
  6. isDescendant: function isDescendant(parent, child) {
  7. var node = child.parentNode;
  8. while (node !== null) {
  9. if (node === parent) return true;
  10. node = node.parentNode;
  11. }
  12. return false;
  13. },
  14. offset: function offset(el) {
  15. var rect = el.getBoundingClientRect();
  16. return {
  17. top: rect.top + document.body.scrollTop,
  18. left: rect.left + document.body.scrollLeft
  19. };
  20. }
  21. };