Blame view

天文台pc/tianwentai-ui/node_modules/dom-helpers/cjs/isVisible.js 336 Bytes
bc518174   王天杨   提交两个项目文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  "use strict";
  
  exports.__esModule = true;
  exports.default = isVisible;
  
  /**
   * Checks if a given element is currently visible.
   * 
   * @param node the element to check
   */
  function isVisible(node) {
    return node ? !!(node.offsetWidth || node.offsetHeight || node.getClientRects().length) : false;
  }
  
  module.exports = exports["default"];