mirror of
https://github.com/ankitects/anki.git
synced 2026-01-09 03:53:55 -05:00
Remove magic number
This commit is contained in:
parent
a2de76e94e
commit
defb0f599c
1 changed files with 3 additions and 2 deletions
|
|
@ -50,8 +50,9 @@ export function getAdjustedScaleAndTicks(
|
||||||
const minOffset = min - predomain[0];
|
const minOffset = min - predomain[0];
|
||||||
const tickSize = ticks[1] - ticks[0];
|
const tickSize = ticks[1] - ticks[0];
|
||||||
|
|
||||||
if (tickSize < 1) {
|
const minBinSize = 1;
|
||||||
ticks = range(min, max);
|
if (tickSize < minBinSize) {
|
||||||
|
ticks = range(min, max, minBinSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (minOffset === 0 || (minOffset % tickSize !== 0 && tickSize % minOffset !== 0)) {
|
if (minOffset === 0 || (minOffset % tickSize !== 0 && tickSize % minOffset !== 0)) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue