MCPcopy Index your code
hub / github.com/docker/getting-started / getOuterSizes

Function getOuterSizes

app/src/static/js/react-bootstrap.js:3730–3740  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

3728
3729
3730function 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

Callers 2

getPopperOffsetsFunction · 0.85
arrowFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…