mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Add return values to increment and adjustTicks
This commit is contained in:
parent
38a5f64150
commit
fac4abb0d5
1 changed files with 3 additions and 3 deletions
|
@ -92,10 +92,10 @@ export function prepareIntervalData(
|
|||
xMax = xMax! + 1;
|
||||
|
||||
// do not show the zero interval
|
||||
const increment = (x: number) => x + 1;
|
||||
const increment = (x: number): number => x + 1;
|
||||
|
||||
const adjustTicks = (x: number, idx: number, ticks: number[]) =>
|
||||
idx === ticks.length - 1 ? [x - (ticks[0] - 1), x + 1] : x - (ticks[0] - 1);
|
||||
const adjustTicks = (x: number, idx: number, ticks: number[]): number[] =>
|
||||
idx === ticks.length - 1 ? [x - (ticks[0] - 1), x + 1] : [x - (ticks[0] - 1)];
|
||||
|
||||
// cap bars to available range
|
||||
const desiredBars = Math.min(70, xMax! - xMin!);
|
||||
|
|
Loading…
Reference in a new issue