MCPcopy
hub / github.com/helloxz/onenav / getReferenceOffsets

Function getReferenceOffsets

static/bootstrap4/js/bootstrap.bundle.js:2255–2260  ·  view source on GitHub ↗

* Get offsets to the reference element * @method * @memberof Popper.Utils * @param {Object} state * @param {Element} popper - the popper element * @param {Element} reference - the reference element (the popper will be relative to this) * @param {Element} fixedPosition - is in fixed

(state, popper, reference)

Source from the content-addressed store, hash-verified

2253 * @returns {Object} An object containing the offsets which will be applied to the popper
2254 */
2255 function getReferenceOffsets(state, popper, reference) {
2256 var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
2257
2258 var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));
2259 return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);
2260 }
2261
2262 /**
2263 * Get the outer sizes of the given element (offset size + margins)

Callers 2

updateFunction · 0.85
applyStyleOnLoadFunction · 0.85

Calls 4

findCommonOffsetParentFunction · 0.85
getReferenceNodeFunction · 0.85

Tested by

no test coverage detected