react-chronos
Version:
⛓ React chronology component providing dual chronological timelines.
16 lines (12 loc) • 384 B
JavaScript
export function outerHeight(el) {
let height = el.offsetHeight;
const style = getComputedStyle(el);
height += parseInt(style.marginTop) + parseInt(style.marginBottom);
return height;
}
export function outerWidth(el) {
let width = el.offsetWidth;
const style = getComputedStyle(el);
width += parseInt(style.marginLeft) + parseInt(style.marginRight);
return width;
}