123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- const RADIUS = 6;
- const generateCirclesData = (
- width: number,
- height: number
- ): Array<CircleType> => [
- {
- direction: 'top-left',
- cx: RADIUS,
- cy: RADIUS,
- r: RADIUS,
- },
- {
- direction: 'left',
- cx: RADIUS,
- cy: height / 2 + 12,
- r: RADIUS,
- },
- {
- direction: 'bottom-left',
- cx: RADIUS,
- cy: height + 18,
- r: RADIUS,
- },
- {
- direction: 'bottom',
- cx: width / 2 + 12,
- cy: height + 18,
- r: RADIUS,
- },
- {
- direction: 'bottom-right',
- cx: width + 18,
- cy: height + 18,
- r: RADIUS,
- },
- {
- direction: 'right',
- cx: width + 18,
- cy: height / 2 + 12,
- r: RADIUS,
- },
- {
- direction: 'top-right',
- cx: width + 18,
- cy: RADIUS,
- r: RADIUS,
- },
- {
- direction: 'top',
- cx: width / 2 + 12,
- cy: RADIUS,
- r: RADIUS,
- },
- ];
- export default generateCirclesData;
|