1 | import { __assign } from "tslib";
|
2 | import { jsx } from '@antv/f-engine';
|
3 | import PolarX from './polar/polar-x';
|
4 | import PolarY from './polar/polar-y';
|
5 | import Top from './rect/top';
|
6 | import Bottom from './rect/bottom';
|
7 | import Right from './rect/right';
|
8 | import Left from './rect/left';
|
9 | function isPolar(props) {
|
10 | return props.coord.isPolar;
|
11 | }
|
12 | export default (function (props) {
|
13 |
|
14 | if (isPolar(props)) {
|
15 | var dimType = props.dimType;
|
16 | if (dimType === 'x') {
|
17 | return jsx(PolarX, __assign({}, props));
|
18 | }
|
19 | return jsx(PolarY, __assign({}, props));
|
20 | }
|
21 | var position = props.position;
|
22 |
|
23 | if (position === 'right') {
|
24 | return jsx(Right, __assign({}, props));
|
25 | }
|
26 | if (position === 'left') {
|
27 | return jsx(Left, __assign({}, props));
|
28 | }
|
29 | if (position === 'top') {
|
30 | return jsx(Top, __assign({}, props));
|
31 | }
|
32 | return jsx(Bottom, __assign({}, props));
|
33 | }); |
\ | No newline at end of file |