mirror of
https://github.com/ankitects/anki.git
synced 2026-01-07 02:53:54 -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 tickSize = ticks[1] - ticks[0];
|
||||
|
||||
if (tickSize < 1) {
|
||||
ticks = range(min, max);
|
||||
const minBinSize = 1;
|
||||
if (tickSize < minBinSize) {
|
||||
ticks = range(min, max, minBinSize);
|
||||
}
|
||||
|
||||
if (minOffset === 0 || (minOffset % tickSize !== 0 && tickSize % minOffset !== 0)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue