source:
imaps-frontend/node_modules/@popperjs/core/lib/utils/getOppositePlacement.js
Last change on this file was 79a0317, checked in by , 6 months ago | |
---|---|
|
|
File size: 248 bytes |
Line | |
---|---|
1 | var hash = { |
2 | left: 'right', |
3 | right: 'left', |
4 | bottom: 'top', |
5 | top: 'bottom' |
6 | }; |
7 | export default function getOppositePlacement(placement) { |
8 | return placement.replace(/left|right|bottom|top/g, function (matched) { |
9 | return hash[matched]; |
10 | }); |
11 | } |
Note:
See TracBrowser
for help on using the repository browser.