Nuget update vari (Bootstrap JQuery)

This commit is contained in:
Samuele Locatelli
2020-03-03 15:41:45 +01:00
parent 6529fbc6a2
commit f0d0cef894
299 changed files with 13123 additions and 3536 deletions
+18
View File
@@ -0,0 +1,18 @@
/**
* 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
*/
export default function getOuterSizes(element) {
const window = element.ownerDocument.defaultView;
const styles = window.getComputedStyle(element);
const x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0);
const y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0);
const result = {
width: element.offsetWidth + y,
height: element.offsetHeight + x,
};
return result;
}