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

Function runModifiers

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

* Loop trough the list of modifiers and run them in order, * each of them will then edit the data object. * @method * @memberof Popper.Utils * @param {dataObject} data * @param {Array} modifiers * @param {String} ends - Optional modifier name used as stopper * @returns {dataObject}

(modifiers, data, ends)

Source from the content-addressed store, hash-verified

3853
3854
3855function runModifiers(modifiers, data, ends) {
3856 var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends));
3857 modifiersToRun.forEach(function (modifier) {
3858 if (modifier['function']) {
3859 // eslint-disable-line dot-notation
3860 console.warn('`modifier.function` is deprecated, use `modifier.fn`!');
3861 }
3862
3863 var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation
3864
3865 if (modifier.enabled && isFunction(fn)) {
3866 // Add properties to offsets to make them a complete clientRect object
3867 // we do this before each modifier to make sure the previous one doesn't
3868 // mess with these values
3869 data.offsets.popper = getClientRect(data.offsets.popper);
3870 data.offsets.reference = getClientRect(data.offsets.reference);
3871 data = fn(data, modifier);
3872 }
3873 });
3874 return data;
3875}
3876/**
3877 * Updates the position of the popper, computing the new offsets and applying
3878 * the new style.<br />

Callers 2

updateFunction · 0.85
flipFunction · 0.85

Calls 3

findIndexFunction · 0.85
isFunctionFunction · 0.85
getClientRectFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…