(useFinalPosition: boolean)
| 370 | } |
| 371 | |
| 372 | getCenterPoint(useFinalPosition: boolean) { |
| 373 | const {x, y, startAngle, endAngle, innerRadius, outerRadius} = this.getProps([ |
| 374 | 'x', |
| 375 | 'y', |
| 376 | 'startAngle', |
| 377 | 'endAngle', |
| 378 | 'innerRadius', |
| 379 | 'outerRadius' |
| 380 | ], useFinalPosition); |
| 381 | const {offset, spacing} = this.options; |
| 382 | const halfAngle = (startAngle + endAngle) / 2; |
| 383 | const halfRadius = (innerRadius + outerRadius + spacing + offset) / 2; |
| 384 | return { |
| 385 | x: x + Math.cos(halfAngle) * halfRadius, |
| 386 | y: y + Math.sin(halfAngle) * halfRadius |
| 387 | }; |
| 388 | } |
| 389 | |
| 390 | tooltipPosition(useFinalPosition: boolean) { |
| 391 | return this.getCenterPoint(useFinalPosition); |
no test coverage detected