react-scroll-loading-plugin
Version:
react scroll loading plugin
19 lines (16 loc) • 517 B
JavaScript
/* eslint-disable */
// FIXME
function getInnerHeight(el) {
const { clientHeight } = el;
const { paddingTop, paddingBottom } = getComputedStyle(el);
return clientHeight - parseFloat(paddingTop) - parseFloat(paddingBottom);
}
function getInnerWidth(el) {
const { clientWidth } = el;
const { paddingRight, paddingLeft } = getComputedStyle(el);
return clientWidth - parseFloat(paddingRight) - parseFloat(paddingLeft);
}
export default {
width: getInnerWidth,
height:getInnerHeight,
}