MCPcopy
hub / github.com/deepch/RTSPtoWebRTC / applyStyleOnLoad

Function applyStyleOnLoad

web/static/js/bootstrap.bundle.js:2693–2709  ·  view source on GitHub ↗

* Set the x-placement attribute before everything else because it could be used * to add margins to the popper margins needs to be calculated to get the * correct popper offsets. * @method * @memberof Popper.modifiers * @param {HTMLElement} reference - The reference element used to po

(reference, popper, options, modifierOptions, state)

Source from the content-addressed store, hash-verified

2691 * @param {Object} options - Popper.js options
2692 */
2693 function applyStyleOnLoad(reference, popper, options, modifierOptions, state) {
2694 // compute reference element offsets
2695 var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);
2696
2697 // compute auto placement, store placement inside the data object,
2698 // modifiers will be able to edit `placement` if needed
2699 // and refer to originalPlacement to know the original value
2700 var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding);
2701
2702 popper.setAttribute('x-placement', placement);
2703
2704 // Apply `position` to popper before anything else because
2705 // without the position applied we can't guarantee correct computations
2706 setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' });
2707
2708 return options;
2709 }
2710
2711 /**
2712 * @function

Callers

nothing calls this directly

Calls 3

getReferenceOffsetsFunction · 0.85
computeAutoPlacementFunction · 0.85
setStylesFunction · 0.85

Tested by

no test coverage detected