Function
doesNotFitWithAlign
(xAlign, chart, options, size)
Source from the content-addressed store, hash-verified
| 268 | } |
| 269 | |
| 270 | function doesNotFitWithAlign(xAlign, chart, options, size) { |
| 271 | const {x, width} = size; |
| 272 | const caret = options.caretSize + options.caretPadding; |
| 273 | if (xAlign === 'left' && x + width + caret > chart.width) { |
| 274 | return true; |
| 275 | } |
| 276 | |
| 277 | if (xAlign === 'right' && x - width - caret < 0) { |
| 278 | return true; |
| 279 | } |
| 280 | } |
| 281 | |
| 282 | function determineXAlign(chart, options, size, yAlign) { |
| 283 | const {x, width} = size; |
Tested by
no test coverage detected