(tooltip, align, options)
| 365 | } |
| 366 | |
| 367 | function getAlignedX(tooltip, align, options) { |
| 368 | const padding = toPadding(options.padding); |
| 369 | |
| 370 | return align === 'center' |
| 371 | ? tooltip.x + tooltip.width / 2 |
| 372 | : align === 'right' |
| 373 | ? tooltip.x + tooltip.width - padding.right |
| 374 | : tooltip.x + padding.left; |
| 375 | } |
| 376 | |
| 377 | /** |
| 378 | * Helper to build before and after body lines |
no test coverage detected