Skip to content

Commit c22b4be

Browse files
committed
refactor: set default timer params
1 parent 87bab9f commit c22b4be

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/components/Timer/drawer.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ class TimerDrawer {
5656
private svgCanvas: SVGSVGElement | null;
5757
private angle: number;
5858
private countdownText: string;
59-
private readonly timer: Timer = new Timer();
59+
private readonly timer: Timer = new Timer({
60+
countdown: true,
61+
startValues: [0, 0, 0, 1, 0],
62+
callback: this.tickCallback.bind(this),
63+
});
6064

6165
constructor() {
6266
this.svgCanvas = null;
@@ -65,11 +69,7 @@ class TimerDrawer {
6569
}
6670

6771
start(): void {
68-
this.timer.start({
69-
countdown: true,
70-
startValues: [0, 0, 0, 1, 0],
71-
callback: this.tickCallback.bind(this),
72-
});
72+
this.timer.start();
7373
}
7474

7575
pause(): void {

0 commit comments

Comments
 (0)