first commit
This commit is contained in:
33
frontend/node_modules/rc-util/lib/Dom/isVisible.js
generated
vendored
Normal file
33
frontend/node_modules/rc-util/lib/Dom/isVisible.js
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
var _default = exports.default = function _default(element) {
|
||||
if (!element) {
|
||||
return false;
|
||||
}
|
||||
if (element instanceof Element) {
|
||||
if (element.offsetParent) {
|
||||
return true;
|
||||
}
|
||||
if (element.getBBox) {
|
||||
var _getBBox = element.getBBox(),
|
||||
width = _getBBox.width,
|
||||
height = _getBBox.height;
|
||||
if (width || height) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (element.getBoundingClientRect) {
|
||||
var _element$getBoundingC = element.getBoundingClientRect(),
|
||||
_width = _element$getBoundingC.width,
|
||||
_height = _element$getBoundingC.height;
|
||||
if (_width || _height) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
Reference in New Issue
Block a user