diff options
author | afc163 <afc163@gmail.com> | 2016-11-11 12:10:26 +0800 |
---|---|---|
committer | afc163 <afc163@gmail.com> | 2016-11-11 12:10:26 +0800 |
commit | 614f6c90232d890984d0f4f2f13ff41fdb144b27 (patch) | |
tree | ce1a9be06b3264fd9fc09b3c2b028646db03a322 /src/placements.js | |
parent | cb5a445c75c7117c7c705d615099086274c2b254 (diff) | |
parent | f429b4a79df25c9eadc3901e2483716835cc7de7 (diff) | |
download | time-picker-614f6c90232d890984d0f4f2f13ff41fdb144b27.tar.gz time-picker-614f6c90232d890984d0f4f2f13ff41fdb144b27.tar.zst time-picker-614f6c90232d890984d0f4f2f13ff41fdb144b27.zip |
Merge branch 'master' of github.com:react-component/time-picker
Diffstat (limited to 'src/placements.js')
-rw-r--r-- | src/placements.js | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/placements.js b/src/placements.js new file mode 100644 index 0000000..6760286 --- /dev/null +++ b/src/placements.js | |||
@@ -0,0 +1,35 @@ | |||
1 | const autoAdjustOverflow = { | ||
2 | adjustX: 1, | ||
3 | adjustY: 1, | ||
4 | }; | ||
5 | |||
6 | const targetOffset = [0, 0]; | ||
7 | |||
8 | const placements = { | ||
9 | bottomLeft: { | ||
10 | points: ['tl', 'tl'], | ||
11 | overflow: autoAdjustOverflow, | ||
12 | offset: [0, -3], | ||
13 | targetOffset, | ||
14 | }, | ||
15 | bottomRight: { | ||
16 | points: ['tr', 'tr'], | ||
17 | overflow: autoAdjustOverflow, | ||
18 | offset: [0, -3], | ||
19 | targetOffset, | ||
20 | }, | ||
21 | topRight: { | ||
22 | points: ['br', 'br'], | ||
23 | overflow: autoAdjustOverflow, | ||
24 | offset: [0, 3], | ||
25 | targetOffset, | ||
26 | }, | ||
27 | topLeft: { | ||
28 | points: ['bl', 'bl'], | ||
29 | overflow: autoAdjustOverflow, | ||
30 | offset: [0, 3], | ||
31 | targetOffset, | ||
32 | }, | ||
33 | }; | ||
34 | |||
35 | export default placements; | ||