Function
doesNotFitWithAlign
(xAlign, chart, options, size)
Source from the content-addressed store, hash-verified
| 232 | } |
| 233 | |
| 234 | function doesNotFitWithAlign(xAlign, chart, options, size) { |
| 235 | const {x, width} = size; |
| 236 | const caret = options.caretSize + options.caretPadding; |
| 237 | if (xAlign === 'left' && x + width + caret > chart.width) { |
| 238 | return true; |
| 239 | } |
| 240 | |
| 241 | if (xAlign === 'right' && x - width - caret < 0) { |
| 242 | return true; |
| 243 | } |
| 244 | } |
| 245 | |
| 246 | function determineXAlign(chart, options, size, yAlign) { |
| 247 | const {x, width} = size; |
Tested by
no test coverage detected