(value, minSpacing, {horizontal, minRotation})
| 145 | } |
| 146 | |
| 147 | function relativeLabelSize(value, minSpacing, {horizontal, minRotation}) { |
| 148 | const rad = toRadians(minRotation); |
| 149 | const ratio = (horizontal ? Math.sin(rad) : Math.cos(rad)) || 0.001; |
| 150 | const length = 0.75 * minSpacing * ('' + value).length; |
| 151 | return Math.min(minSpacing / ratio, length); |
| 152 | } |
| 153 | |
| 154 | export default class LinearScaleBase extends Scale { |
| 155 |
no test coverage detected