(size, yAlign, paddingAndSize)
| 286 | } |
| 287 | |
| 288 | function alignY(size, yAlign, paddingAndSize) { |
| 289 | // eslint-disable-next-line prefer-const |
| 290 | let {y, height} = size; |
| 291 | if (yAlign === 'top') { |
| 292 | y += paddingAndSize; |
| 293 | } else if (yAlign === 'bottom') { |
| 294 | y -= height + paddingAndSize; |
| 295 | } else { |
| 296 | y -= (height / 2); |
| 297 | } |
| 298 | return y; |
| 299 | } |
| 300 | |
| 301 | /** |
| 302 | * Helper to get the location a tooltip needs to be placed at given the initial position (via the vm) and the size and alignment |
no outgoing calls
no test coverage detected