(useFinalPosition: boolean)
| 446 | } |
| 447 | |
| 448 | getCenterPoint(useFinalPosition: boolean) { |
| 449 | const {x, y, startAngle, endAngle, innerRadius, outerRadius} = this.getProps([ |
| 450 | 'x', |
| 451 | 'y', |
| 452 | 'startAngle', |
| 453 | 'endAngle', |
| 454 | 'innerRadius', |
| 455 | 'outerRadius' |
| 456 | ], useFinalPosition); |
| 457 | const {offset, spacing} = this.options; |
| 458 | const halfAngle = (startAngle + endAngle) / 2; |
| 459 | const halfRadius = (innerRadius + outerRadius + spacing + offset) / 2; |
| 460 | return { |
| 461 | x: x + Math.cos(halfAngle) * halfRadius, |
| 462 | y: y + Math.sin(halfAngle) * halfRadius |
| 463 | }; |
| 464 | } |
| 465 | |
| 466 | tooltipPosition(useFinalPosition: boolean) { |
| 467 | return this.getCenterPoint(useFinalPosition); |
no test coverage detected