1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- import { CircleType } from '../../constants/type';
- 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;
|