MCPcopy Create free account
hub / github.com/docker/getting-started / getOppositePlacement

Function getOppositePlacement

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

* Get the opposite placement of the given one * @method * @memberof Popper.Utils * @argument {String} placement * @returns {String} flipped placement

(placement)

Source from the content-addressed store, hash-verified

3748
3749
3750function getOppositePlacement(placement) {
3751 var hash = {
3752 left: 'right',
3753 right: 'left',
3754 bottom: 'top',
3755 top: 'bottom'
3756 };
3757 return placement.replace(/left|right|bottom|top/g, function (matched) {
3758 return hash[matched];
3759 });
3760}
3761/**
3762 * Get offsets to the popper
3763 * @method

Callers 3

getPopperOffsetsFunction · 0.85
flipFunction · 0.85
innerFunction · 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…