1 | "use strict";
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 | Object.defineProperty(exports, "__esModule", { value: true });
|
18 | exports.getPositionIgnoreAngles = exports.isPositionVertical = exports.isPositionHorizontal = exports.Position = void 0;
|
19 | exports.Position = {
|
20 | BOTTOM: "bottom",
|
21 | BOTTOM_LEFT: "bottom-left",
|
22 | BOTTOM_RIGHT: "bottom-right",
|
23 | LEFT: "left",
|
24 | LEFT_BOTTOM: "left-bottom",
|
25 | LEFT_TOP: "left-top",
|
26 | RIGHT: "right",
|
27 | RIGHT_BOTTOM: "right-bottom",
|
28 | RIGHT_TOP: "right-top",
|
29 | TOP: "top",
|
30 | TOP_LEFT: "top-left",
|
31 | TOP_RIGHT: "top-right",
|
32 | };
|
33 | function isPositionHorizontal(position) {
|
34 |
|
35 | return (position === exports.Position.TOP ||
|
36 | position === exports.Position.TOP_LEFT ||
|
37 | position === exports.Position.TOP_RIGHT ||
|
38 | position === exports.Position.BOTTOM ||
|
39 | position === exports.Position.BOTTOM_LEFT ||
|
40 | position === exports.Position.BOTTOM_RIGHT);
|
41 | }
|
42 | exports.isPositionHorizontal = isPositionHorizontal;
|
43 | function isPositionVertical(position) {
|
44 |
|
45 | return (position === exports.Position.LEFT ||
|
46 | position === exports.Position.LEFT_TOP ||
|
47 | position === exports.Position.LEFT_BOTTOM ||
|
48 | position === exports.Position.RIGHT ||
|
49 | position === exports.Position.RIGHT_TOP ||
|
50 | position === exports.Position.RIGHT_BOTTOM);
|
51 | }
|
52 | exports.isPositionVertical = isPositionVertical;
|
53 | function getPositionIgnoreAngles(position) {
|
54 | if (position === exports.Position.TOP || position === exports.Position.TOP_LEFT || position === exports.Position.TOP_RIGHT) {
|
55 | return exports.Position.TOP;
|
56 | }
|
57 | else if (position === exports.Position.BOTTOM ||
|
58 | position === exports.Position.BOTTOM_LEFT ||
|
59 | position === exports.Position.BOTTOM_RIGHT) {
|
60 | return exports.Position.BOTTOM;
|
61 | }
|
62 | else if (position === exports.Position.LEFT || position === exports.Position.LEFT_TOP || position === exports.Position.LEFT_BOTTOM) {
|
63 | return exports.Position.LEFT;
|
64 | }
|
65 | else {
|
66 | return exports.Position.RIGHT;
|
67 | }
|
68 | }
|
69 | exports.getPositionIgnoreAngles = getPositionIgnoreAngles;
|
70 |
|
\ | No newline at end of file |