* @public * @param {number} y * @param {number} height * @param {string} [textVerticalAlign='top'] * @return {number} Adjusted y.
(y, height, textVerticalAlign)
| 7702 | * @return {number} Adjusted y. |
| 7703 | */ |
| 7704 | function adjustTextY(y, height, textVerticalAlign) { |
| 7705 | if (textVerticalAlign === 'middle') { |
| 7706 | y -= height / 2; |
| 7707 | } |
| 7708 | else if (textVerticalAlign === 'bottom') { |
| 7709 | y -= height; |
| 7710 | } |
| 7711 | return y; |
| 7712 | } |
| 7713 | |
| 7714 | /** |
| 7715 | * Follow same interface to `Displayable.prototype.calculateTextPosition`. |
no outgoing calls
no test coverage detected