* Get the outer sizes of the given element (offset size + margins) * @method * @memberof Popper.Utils * @argument {Element} element * @returns {Object} object containing width and height properties
(element)
| 3728 | |
| 3729 | |
| 3730 | function getOuterSizes(element) { |
| 3731 | var window = element.ownerDocument.defaultView; |
| 3732 | var styles = window.getComputedStyle(element); |
| 3733 | var x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0); |
| 3734 | var y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0); |
| 3735 | var result = { |
| 3736 | width: element.offsetWidth + y, |
| 3737 | height: element.offsetHeight + x |
| 3738 | }; |
| 3739 | return result; |
| 3740 | } |
| 3741 | /** |
| 3742 | * Get the opposite placement of the given one |
| 3743 | * @method |
no outgoing calls
no test coverage detected
searching dependent graphs…