ngx-bootstrap
Version:
Angular Bootstrap
10 lines • 360 B
JavaScript
/**
* Helper to detect borders of a given element
*/
export function getBordersSize(styles, axis) {
const sideA = axis === 'x' ? 'Left' : 'Top';
const sideB = sideA === 'Left' ? 'Right' : 'Bottom';
return (parseFloat(styles[`border${sideA}Width`]) +
parseFloat(styles[`border${sideB}Width`]));
}
//# sourceMappingURL=getBordersSize.js.map