1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.toPopperPlacement = toPopperPlacement;
|
7 | exports.parsePopperOffset = parsePopperOffset;
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 | function toPopperPlacement(placement) {
|
16 | return placement.replace(/(Top|Left)$/, '-start').replace(/(Right|Bottom)$/, '-end');
|
17 | }
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 | function parsePopperOffset(offset) {
|
24 | return {
|
25 | top: Math.floor(offset.top || 0),
|
26 | left: Math.floor(offset.left || 0)
|
27 | };
|
28 | } |
\ | No newline at end of file |