(fill, scale)
| 78 | * @returns {number | null} |
| 79 | */ |
| 80 | export function _getTargetPixel(fill, scale) { |
| 81 | let pixel = null; |
| 82 | if (fill === 'start') { |
| 83 | pixel = scale.bottom; |
| 84 | } else if (fill === 'end') { |
| 85 | pixel = scale.top; |
| 86 | } else if (isObject(fill)) { |
| 87 | // @ts-ignore |
| 88 | pixel = scale.getPixelForValue(fill.value); |
| 89 | } else if (scale.getBasePixel) { |
| 90 | pixel = scale.getBasePixel(); |
| 91 | } |
| 92 | return pixel; |
| 93 | } |
| 94 | |
| 95 | /** |
| 96 | * @param {FillTarget | ComplexFillTarget} fill |
no test coverage detected