* Get the opposite placement of the given one * @method * @memberof Popper.Utils * @argument {String} placement * @returns {String} flipped placement
(placement)
| 3748 | |
| 3749 | |
| 3750 | function 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 |
no outgoing calls
no test coverage detected
searching dependent graphs…