main
Last change
on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
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.