(size, yAlign, paddingAndSize)
| 322 | } |
| 323 | |
| 324 | function alignY(size, yAlign, paddingAndSize) { |
| 325 | // eslint-disable-next-line prefer-const |
| 326 | let {y, height} = size; |
| 327 | if (yAlign === 'top') { |
| 328 | y += paddingAndSize; |
| 329 | } else if (yAlign === 'bottom') { |
| 330 | y -= height + paddingAndSize; |
| 331 | } else { |
| 332 | y -= (height / 2); |
| 333 | } |
| 334 | return y; |
| 335 | } |
| 336 | |
| 337 | /** |
| 338 | * 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