* @public * @param {number} x * @param {number} width * @param {string} [textAlign='left'] * @return {number} Adjusted x.
(x, width, textAlign)
| 7684 | * @return {number} Adjusted x. |
| 7685 | */ |
| 7686 | function adjustTextX(x, width, textAlign) { |
| 7687 | // FIXME Right to left language |
| 7688 | if (textAlign === 'right') { |
| 7689 | x -= width; |
| 7690 | } |
| 7691 | else if (textAlign === 'center') { |
| 7692 | x -= width / 2; |
| 7693 | } |
| 7694 | return x; |
| 7695 | } |
| 7696 | |
| 7697 | /** |
| 7698 | * @public |
no outgoing calls
no test coverage detected